[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202207061806.PD7mLTe7-lkp@intel.com>
Date: Wed, 6 Jul 2022 18:12:54 +0800
From: kernel test robot <lkp@...el.com>
To: Ratheesh Kannoth <rkannoth@...vell.com>
Cc: kbuild-all@...ts.01.org, netdev@...r.kernel.org
Subject: [net-next:master 5/16]
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:388:5: warning: no
previous prototype for 'rvu_exact_calculate_hash'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: 2ef8e39f58f08589ab035223c2687830c0eba30f
commit: 017691914c115903ee513d9ca058335bb35f8bd6 [5/16] octeontx2-af: Exact match support
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20220706/202207061806.PD7mLTe7-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/?id=017691914c115903ee513d9ca058335bb35f8bd6
git remote add net-next https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
git fetch --no-tags net-next master
git checkout 017691914c115903ee513d9ca058335bb35f8bd6
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=alpha SHELL=/bin/bash drivers/net/ethernet/marvell/octeontx2/af/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:388:5: warning: no previous prototype for 'rvu_exact_calculate_hash' [-Wmissing-prototypes]
388 | u32 rvu_exact_calculate_hash(struct rvu *rvu, u16 chan, u16 ctype, u8 *mac,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:1026:5: warning: no previous prototype for 'rvu_npc_exact_add_table_entry' [-Wmissing-prototypes]
1026 | int rvu_npc_exact_add_table_entry(struct rvu *rvu, u8 cgx_id, u8 lmac_id, u8 *mac,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c: In function 'rvu_npc_exact_add_table_entry':
>> drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:1032:33: warning: variable 'table' set but not used [-Wunused-but-set-variable]
1032 | struct npc_exact_table *table;
| ^~~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c: At top level:
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:1084:5: warning: no previous prototype for 'rvu_npc_exact_update_table_entry' [-Wmissing-prototypes]
1084 | int rvu_npc_exact_update_table_entry(struct rvu *rvu, u8 cgx_id, u8 lmac_id,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/rvu_exact_calculate_hash +388 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
378
379 /**
380 * rvu_exact_calculate_hash - calculate hash index to mem table.
381 * @rvu: resource virtualization unit.
382 * @chan: Channel number
383 * @ctype: Channel type.
384 * @mac: MAC address
385 * @mask: HASH mask.
386 * @table_depth: Depth of table.
387 */
> 388 u32 rvu_exact_calculate_hash(struct rvu *rvu, u16 chan, u16 ctype, u8 *mac,
389 u64 mask, u32 table_depth)
390 {
391 struct npc_exact_table *table = rvu->hw->table;
392 u64 hash_key[2];
393 u64 key_in[2];
394 u64 ldata;
395 u32 hash;
396
397 key_in[0] = RVU_NPC_HASH_SECRET_KEY0;
398 key_in[1] = RVU_NPC_HASH_SECRET_KEY2;
399
400 hash_key[0] = key_in[0] << 31;
401 hash_key[0] |= key_in[1];
402 hash_key[1] = key_in[0] >> 33;
403
404 ldata = rvu_exact_prepare_mdata(mac, chan, ctype, mask);
405
406 dev_dbg(rvu->dev, "%s: ldata=0x%llx hash_key0=0x%llx hash_key2=0x%llx\n", __func__,
407 ldata, hash_key[1], hash_key[0]);
408 hash = rvu_npc_toeplitz_hash(&ldata, (u64 *)hash_key, 64, 95);
409
410 hash &= table->mem_table.hash_mask;
411 hash += table->mem_table.hash_offset;
412 dev_dbg(rvu->dev, "%s: hash=%x\n", __func__, hash);
413
414 return hash;
415 }
416
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists