All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] clang warning
@ 2014-10-27 23:45 Jeroen Hofstee
  2014-10-28 12:58 ` Nikita Kiryanov
  0 siblings, 1 reply; 2+ messages in thread
From: Jeroen Hofstee @ 2014-10-27 23:45 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [U-Boot] clang warning
  2014-10-27 23:45 [U-Boot] clang warning Jeroen Hofstee
@ 2014-10-28 12:58 ` Nikita Kiryanov
  0 siblings, 0 replies; 2+ messages in thread
From: Nikita Kiryanov @ 2014-10-28 12:58 UTC (permalink / raw)
  To: u-boot

Hi Jeroen,

On 28/10/14 01:45, Jeroen Hofstee wrote:
> 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

Thanks for catching this. Indeed, this should be a bitwise AND. Patch
coming up.

-- 
Regards,
Nikita Kiryanov

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-28 12:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-27 23:45 [U-Boot] clang warning Jeroen Hofstee
2014-10-28 12:58 ` Nikita Kiryanov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.