All of lore.kernel.org
 help / color / mirror / Atom feed
* [leon-rdma:auxbus 3/12] drivers/net/ethernet/mellanox/mlx5/core/main.c:239:74: sparse: sparse: cast truncates bits from constant value (50a becomes a)
@ 2020-11-03 17:41 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-11-03 17:41 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3041 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git auxbus
head:   ce7e1f65f7922627b386d5f30b1bbd54a456687b
commit: 7fcfbdeefb9326a73e4de5024aef37b9e36ff8aa [3/12] net/mlx5: Properly convey driver version to firmware
config: sparc64-randconfig-s032-20201103 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-76-gf680124b-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git/commit/?id=7fcfbdeefb9326a73e4de5024aef37b9e36ff8aa
        git remote add leon-rdma https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git
        git fetch --no-tags leon-rdma auxbus
        git checkout 7fcfbdeefb9326a73e4de5024aef37b9e36ff8aa
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=sparc64 

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


"sparse warnings: (new ones prefixed by >>)"
>> drivers/net/ethernet/mellanox/mlx5/core/main.c:239:74: sparse: sparse: cast truncates bits from constant value (50a becomes a)

vim +239 drivers/net/ethernet/mellanox/mlx5/core/main.c

   211	
   212	static void mlx5_set_driver_version(struct mlx5_core_dev *dev)
   213	{
   214		int driver_ver_sz = MLX5_FLD_SZ_BYTES(set_driver_version_in,
   215						      driver_version);
   216		u8 in[MLX5_ST_SZ_BYTES(set_driver_version_in)] = {};
   217		int remaining_size = driver_ver_sz;
   218		char *string;
   219	
   220		if (!MLX5_CAP_GEN(dev, driver_version))
   221			return;
   222	
   223		string = MLX5_ADDR_OF(set_driver_version_in, in, driver_version);
   224	
   225		strncpy(string, "Linux", remaining_size);
   226	
   227		remaining_size = max_t(int, 0, driver_ver_sz - strlen(string));
   228		strncat(string, ",", remaining_size);
   229	
   230		remaining_size = max_t(int, 0, driver_ver_sz - strlen(string));
   231		strncat(string, DRIVER_NAME, remaining_size);
   232	
   233		remaining_size = max_t(int, 0, driver_ver_sz - strlen(string));
   234		strncat(string, ",", remaining_size);
   235	
   236		remaining_size = max_t(int, 0, driver_ver_sz - strlen(string));
   237	
   238		snprintf(string + strlen(string), remaining_size, "%u.%u.%u",
 > 239			 (u8)(LINUX_VERSION_CODE >> 16), (u8)(LINUX_VERSION_CODE >> 8),
   240			 (u16)(LINUX_VERSION_CODE & 0xff));
   241	
   242		/*Send the command*/
   243		MLX5_SET(set_driver_version_in, in, opcode,
   244			 MLX5_CMD_OP_SET_DRIVER_VERSION);
   245	
   246		mlx5_cmd_exec_in(dev, set_driver_version, in);
   247	}
   248	

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34545 bytes --]

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

only message in thread, other threads:[~2020-11-03 17:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-03 17:41 [leon-rdma:auxbus 3/12] drivers/net/ethernet/mellanox/mlx5/core/main.c:239:74: sparse: sparse: cast truncates bits from constant value (50a becomes a) kernel test robot

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.