drm/msm: use BUG_ON macro for debugging.
Subsystems (4)
PATCH v2 1/1 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.
v2: format expression to less than 80 characters for each line.
Signed-off-by Wambui Karuga <[email protected]>
--- drivers/gpu/drm/msm/adreno/adreno_gpu.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/msm/adreno/adreno_gpu.h +2 -4
@@ -315,10 +315,8 @@ 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
Signature · 1 line
2.17.1