lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 11 Aug 2019 21:42:15 -0700 (PDT) From: David Miller <davem@...emloft.net> To: natechancellor@...il.com Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org, clang-built-linux@...glegroups.com Subject: Re: [PATCH] net: tc35815: Explicitly check NET_IP_ALIGN is not zero in tc35815_rx From: Nathan Chancellor <natechancellor@...il.com> Date: Sun, 11 Aug 2019 20:13:45 -0700 > clang warns: > > drivers/net/ethernet/toshiba/tc35815.c:1507:30: warning: use of logical > '&&' with constant operand [-Wconstant-logical-operand] > if (!HAVE_DMA_RXALIGN(lp) && NET_IP_ALIGN) > ^ ~~~~~~~~~~~~ > drivers/net/ethernet/toshiba/tc35815.c:1507:30: note: use '&' for a > bitwise operation > if (!HAVE_DMA_RXALIGN(lp) && NET_IP_ALIGN) > ^~ > & > drivers/net/ethernet/toshiba/tc35815.c:1507:30: note: remove constant to > silence this warning > if (!HAVE_DMA_RXALIGN(lp) && NET_IP_ALIGN) > ~^~~~~~~~~~~~~~~ > 1 warning generated. > > Explicitly check that NET_IP_ALIGN is not zero, which matches how this > is checked in other parts of the tree. Because NET_IP_ALIGN is a build > time constant, this check will be constant folded away during > optimization. > > Fixes: 82a9928db560 ("tc35815: Enable StripCRC feature") > Link: https://github.com/ClangBuiltLinux/linux/issues/608 > Signed-off-by: Nathan Chancellor <natechancellor@...il.com> Applied but I think clang is being rediculous.
Powered by blists - more mailing lists