diff options
author | Wambui Karuga <wambui.karugax@gmail.com> | 2019-12-30 22:41:02 +0300 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2020-01-02 16:17:20 -0800 |
commit | e37b624d25139f8b9d4bdafb3ac5131f56d0e7bb (patch) | |
tree | cd46fbdaf3c334f9336fc94eb267c4ae2bba3f91 | |
parent | 89048dd010f00de0fd5129fb5bba2a20ca9ab70b (diff) | |
download | linux-e37b624d25139f8b9d4bdafb3ac5131f56d0e7bb.tar.gz linux-e37b624d25139f8b9d4bdafb3ac5131f56d0e7bb.tar.bz2 linux-e37b624d25139f8b9d4bdafb3ac5131f56d0e7bb.zip |
drm/msm: use BUG_ON macro for debugging.
As the if statement only checks for the value of the offset_name
variable, it can be replaced by the more conscise BUG_ON macro for error
reporting.
Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
Reviewed-by: Sean Paul <sean@poorly.run>
Signed-off-by: Rob Clark <robdclark@chromium.org>
-rw-r--r-- | drivers/gpu/drm/msm/adreno/adreno_gpu.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.h b/drivers/gpu/drm/msm/adreno/adreno_gpu.h index cd7ec020aa26..9ff4e550e7bd 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.h +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.h @@ -340,10 +340,7 @@ OUT_PKT7(struct msm_ringbuffer *ring, uint8_t opcode, uint16_t cnt) static inline bool adreno_reg_check(struct adreno_gpu *gpu, enum adreno_regs offset_name) { - if (offset_name >= REG_ADRENO_REGISTER_MAX || - !gpu->reg_offsets[offset_name]) { - BUG(); - } + BUG_ON(offset_name >= REG_ADRENO_REGISTER_MAX || !gpu->reg_offsets[offset_name]); /* * REG_SKIP is a special value that tell us that the register in |