Thread (2 messages) 2 messages, 2 authors, 2016-08-01

Re: [PATCH] silence warning in drivers/ata/libata-scsi.c when building W=1

From: Tejun Heo <tj@kernel.org>
Date: 2016-08-01 15:04:38
Also in: lkml

On Sun, Jul 31, 2016 at 11:28:34PM -0400, Valdis Kletnieks wrote:
When building with W=1, we get these warnings:

drivers/ata/libata-scsi.c: In function 'ata_mselect_caching':
drivers/ata/libata-scsi.c:3637:28: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
    if (mpage[i + 2] & 0xfb != buf[i] & 0xfb) {
                       ~~~~~^~~~~~~~~
drivers/ata/libata-scsi.c: In function 'ata_mselect_control':
drivers/ata/libata-scsi.c:3702:28: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
    if (mpage[i + 2] & 0xfb != buf[i] & 0xfb) {
                       ~~~~~^~~~~~~~~

So give them the extra () and make things a bit clearer for both the
compiler and programmer...

Signed-off-by: Valdis Kletnieks <redacted>
The offending commit got already reverted.

Thanks!

-- 
tejun
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help