* [PATCH net-next] cteontx2-pf: cn10k: Prevent harmless double shift bugs
@ 2021-02-17 6:16 Dan Carpenter
2021-02-17 22:40 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2021-02-17 6:16 UTC (permalink / raw)
To: Sunil Goutham
Cc: Geetha sowjanya, Subbaraya Sundeep, hariprasad, David S. Miller,
Jakub Kicinski, netdev, kernel-janitors
These defines are used with set_bit() and test_bit() which take a bit
number. In other words, the code is doing:
if (BIT(BIT(1)) & pf->hw.cap_flag) {
This was done consistently so it did not cause a problem at runtime but
it's still worth fixing.
Fixes: facede8209ef ("octeontx2-pf: cn10k: Add mbox support for CN10K")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
index 4c472646a0ac..19aef37b8ef9 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
@@ -210,9 +210,9 @@ struct otx2_hw {
u64 cgx_fec_uncorr_blks;
u8 cgx_links; /* No. of CGX links present in HW */
u8 lbk_links; /* No. of LBK links present in HW */
-#define HW_TSO BIT_ULL(0)
-#define CN10K_MBOX BIT_ULL(1)
-#define CN10K_LMTST BIT_ULL(2)
+#define HW_TSO 0
+#define CN10K_MBOX 1
+#define CN10K_LMTST 2
unsigned long cap_flag;
#define LMT_LINE_SIZE 128
--
2.30.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] cteontx2-pf: cn10k: Prevent harmless double shift bugs
2021-02-17 6:16 [PATCH net-next] cteontx2-pf: cn10k: Prevent harmless double shift bugs Dan Carpenter
@ 2021-02-17 22:40 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-02-17 22:40 UTC (permalink / raw)
To: Dan Carpenter
Cc: sgoutham, gakula, sbhatta, hkelam, davem, kuba, netdev, kernel-janitors
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Wed, 17 Feb 2021 09:16:20 +0300 you wrote:
> These defines are used with set_bit() and test_bit() which take a bit
> number. In other words, the code is doing:
>
> if (BIT(BIT(1)) & pf->hw.cap_flag) {
>
> This was done consistently so it did not cause a problem at runtime but
> it's still worth fixing.
>
> [...]
Here is the summary with links:
- [net-next] cteontx2-pf: cn10k: Prevent harmless double shift bugs
https://git.kernel.org/netdev/net-next/c/c77662605d8d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-17 22:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-17 6:16 [PATCH net-next] cteontx2-pf: cn10k: Prevent harmless double shift bugs Dan Carpenter
2021-02-17 22:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).