]> git.baikalelectronics.ru Git - kernel.git/commit
drm/mipi_dbi: Use simple right shift instead of double negation
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 17 Oct 2019 11:49:12 +0000 (14:49 +0300)
committerNoralf Trønnes <noralf@tronnes.org>
Tue, 22 Oct 2019 13:09:15 +0000 (15:09 +0200)
commite74bbb640177836965466a9acf464d49bf84f88a
treee57ab5eb80e1a811a6f907e13ab917103ae70dbf
parent36f2601fdd28dc084cb2d774ab6bfe19bf26dcdb
drm/mipi_dbi: Use simple right shift instead of double negation

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>
Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
Tested-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20191017114912.61522-1-andriy.shevchenko@linux.intel.com
drivers/gpu/drm/drm_mipi_dbi.c