Den 17.10.2019 18.27, skrev Noralf Trønnes:
Den 17.10.2019 13.49, skrev Andy Shevchenko:
GCC complains about dubious bitwise OR operand:
drivers/gpu/drm/drm_mipi_dbi.c:1024:49: warning: dubious: x | !y CC [M] drivers/gpu/drm/drm_mipi_dbi.o
As long as buffer is consist of byte (u8) values, we may use simple right shift and satisfy compiler. It also reduces amount of operations needed.
Signed-off-by: Andy Shevchenko andriy.shevchenko@linux.intel.com
Thanks, it's even more readable now, for me at least. And since I don't trust my in-head C compiler/parser, I ran a test and /sys/kernel/debug/dri/0/command returns the same for commands 04H and 09h which are the ones affected by this change.
Reviewed-by: Noralf Trønnes noralf@tronnes.org Tested-by: Noralf Trønnes noralf@tronnes.org
Applied to drm-misc-next.
Noralf.