clang warning
Hello Nikita,
Commit dc383dd introduces the following clang warning:
drivers/block/dwc_ahsata.c:881:35: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
return readl(&(port_mmio->ssts)) && SATA_PORT_SSTS_DET_MASK;
^ ~~~~~~~~~~~~~~~~~~~~~~~drivers/block/dwc_ahsata.c:881:35: note: use '&' for a bitwise operation
Regards,
Jeroen
Hi Jeroen,
Quoted 6 lines · Jeroen Hofstee
Hello Nikita,
Commit dc383dd introduces the following clang warning:
drivers/block/dwc_ahsata.c:881:35: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
Quoted 7 lines
return readl(&(port_mmio->ssts)) && SATA_PORT_SSTS_DET_MASK; ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/block/dwc_ahsata.c:881:35: note: use '&' for a bitwise operationRegards,
Jeroen
Thanks for catching this. Indeed, this should be a bitwise AND. Patch coming up.
Signature · 2 lines
Regards, Nikita Kiryanov