Re: [PATCH 2/4] [media] imon: better code the pad_mouse toggling

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

 



On Thu, May 18, 2017 at 11:06:44AM -0300, Mauro Carvalho Chehab wrote:
> The logic with toggles the pad_mouse is confusing. Now, gcc 7.1
> complains about it:
> 
> drivers/media/rc/imon.c: In function 'imon_incoming_scancode':
> drivers/media/rc/imon.c:1725:23: warning: '~' on a boolean expression [-Wbool-operation]
>     ictx->pad_mouse = (~ictx->pad_mouse) & 0x1;
>                        ^
> drivers/media/rc/imon.c:1725:23: note: did you mean to use logical not?
>     ictx->pad_mouse = (~ictx->pad_mouse) & 0x1;
>                        ^
>                        !
> 
> Rewrite it to be clearer for both code reviewers and gcc.

This was already spotted by Arnd.

https://patchwork.linuxtv.org/patch/41270/

Thanks
Sean



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux