linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* drivers/net/ethernet/mellanox/mlx5/core/en_main.c:339 mlx5e_get_mpwqe_offset() warn: should '(wqe_ix * ((((((((((1))) << (((18 - 12 > 0) ?18 - 12:0))) + 1)) + (((8)) - 1)) & ~(((8)) - 1))))) << 12' be a 64 bit type?
@ 2021-08-06  7:38 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2021-08-06  7:38 UTC (permalink / raw)
  To: kbuild, Tariq Toukan; +Cc: lkp, kbuild-all, linux-kernel, Saeed Mahameed

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   902e7f373fff2476b53824264c12e4e76c7ec02a
commit: d5dd03b26ba49c4ffe67ee1937add82293c19794 net/mlx5e: RX, Mind the MPWQE gaps when calculating offsets
config: i386-randconfig-m021-20210804 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/net/ethernet/mellanox/mlx5/core/en_main.c:339 mlx5e_get_mpwqe_offset() warn: should '(wqe_ix * ((((((((((1))) << (((18 - 12 > 0) ?18 - 12:0))) + 1)) + (((8)) - 1)) & ~(((8)) - 1))))) << 12' be a 64 bit type?

vim +339 drivers/net/ethernet/mellanox/mlx5/core/en_main.c

d5dd03b26ba49c Tariq Toukan 2021-01-12  337  static u64 mlx5e_get_mpwqe_offset(u16 wqe_ix)
b8a98a4cf3221d Tariq Toukan 2017-12-20  338  {
d5dd03b26ba49c Tariq Toukan 2021-01-12 @339  	return MLX5E_REQUIRED_MTTS(wqe_ix) << PAGE_SHIFT;

This function returns u64 but only the lower 32 bits can be set.

b8a98a4cf3221d Tariq Toukan 2017-12-20  340  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-06  7:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06  7:38 drivers/net/ethernet/mellanox/mlx5/core/en_main.c:339 mlx5e_get_mpwqe_offset() warn: should '(wqe_ix * ((((((((((1))) << (((18 - 12 > 0) ?18 - 12:0))) + 1)) + (((8)) - 1)) & ~(((8)) - 1))))) << 12' be a 64 bit type? Dan Carpenter

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).