From: Leon Romanovsky <leon@kernel•org>
To: Jakub Kicinski <kuba@kernel•org>,
"David S. Miller" <davem@davemloft•net>,
Saeed Mahameed <saeed@kernel•org>
Cc: Parav Pandit <parav@nvidia•com>,
Stephen Rothwell <sfr@canb•auug.org.au>,
netdev@vger•kernel.org
Subject: [PATCH net-next] net/mlx5: Fix compilation warning for 32-bit platform
Date: Sun, 13 Dec 2020 14:06:41 +0200 [thread overview]
Message-ID: <20201213120641.216032-1-leon@kernel.org> (raw)
From: Parav Pandit <parav@nvidia•com>
MLX5_GENERAL_OBJECT_TYPES types bitfield is 64-bit field.
Defining an enum for such bit fields on 32-bit platform results in below
warning.
./include/vdso/bits.h:7:26: warning: left shift count >= width of type [-Wshift-count-overflow]
^
./include/linux/mlx5/mlx5_ifc.h:10716:46: note: in expansion of macro ‘BIT’
MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_SAMPLER = BIT(0x20),
^~~
Use 32-bit friendly BIT_ULL macro.
Fixes: 2a2970891647 ("net/mlx5: Add sample offload hardware bits and structures")
Signed-off-by: Parav Pandit <parav@nvidia•com>
Reported-by: Stephen Rothwell <sfr@canb•auug.org.au>
Signed-off-by: Leon Romanovsky <leonro@nvidia•com>
---
include/linux/mlx5/mlx5_ifc.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h
index 2006795fd522..8a359b8bee52 100644
--- a/include/linux/mlx5/mlx5_ifc.h
+++ b/include/linux/mlx5/mlx5_ifc.h
@@ -10709,9 +10709,9 @@ struct mlx5_ifc_affiliated_event_header_bits {
};
enum {
- MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_ENCRYPTION_KEY = BIT(0xc),
- MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_IPSEC = BIT(0x13),
- MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_SAMPLER = BIT(0x20),
+ MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_ENCRYPTION_KEY = BIT_ULL(0xc),
+ MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_IPSEC = BIT_ULL(0x13),
+ MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_SAMPLER = BIT_ULL(0x20),
};
enum {
--
2.29.2
next reply other threads:[~2020-12-13 12:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-13 12:06 Leon Romanovsky [this message]
2020-12-13 12:36 ` [PATCH net-next] net/mlx5: Fix compilation warning for 32-bit platform Leon Romanovsky
2020-12-14 20:08 ` Saeed Mahameed
2020-12-17 0:14 ` Jakub Kicinski
2020-12-17 18:52 ` Jakub Kicinski
2020-12-17 19:53 ` Saeed Mahameed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201213120641.216032-1-leon@kernel.org \
--to=leon@kernel$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=kuba@kernel$(echo .)org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=parav@nvidia$(echo .)com \
--cc=saeed@kernel$(echo .)org \
--cc=sfr@canb$(echo .)auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox