Re: [PATCH v1] drm/mipi_dbi: Use simple right shift instead of double negation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxxxxxxxx>
>> ---
> 
> 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@xxxxxxxxxxx>
> Tested-by: Noralf Trønnes <noralf@xxxxxxxxxxx>
> 

Applied to drm-misc-next.

Noralf.
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux