[kbuild] Re: drivers/net/dsa/qca8k.c:944 qca8k_parse_port_config() error: testing array offset 'cpu_port_index' after use.

2021-11-15 Thread Dan Carpenter
On Mon, Nov 15, 2021 at 07:08:30PM +0100, Ansuel Smith wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git  
> > master
> > head:   debe436e77c72fcee804fb867f275e6d31aa999c
> > commit: 5654ec78dd7e64b1e04777b24007344329e6a63b net: dsa: qca8k: rework 
> > rgmii delay logic and scan for cpu port 6
> > config: i386-randconfig-m021-20211025 (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 
> > Reported-by: Dan Carpenter 
> >
> 
> This should already be fixed by 06dd34a628ae5b6a839b757e746de165d6789ca8
> Can you confirm this?
> 

No, it doesn't fix the problem.  The check is either useless and should
be removed or there is an out of bounds bug.  Checking for an out of
bounds *after* you've already written to the memory is *never* useful.

regards,
dan carpenter

> > smatch warnings:
> > drivers/net/dsa/qca8k.c:944 qca8k_parse_port_config() error: testing array 
> > offset 'cpu_port_index' after use.
> >
> > vim +/cpu_port_index +944 drivers/net/dsa/qca8k.c
> >
> > 6c43809bf1bee7 Ansuel Smith 2021-10-14   934  static int
> > 6c43809bf1bee7 Ansuel Smith 2021-10-14   935  
> > qca8k_parse_port_config(struct qca8k_priv *priv)
> > 6c43809bf1bee7 Ansuel Smith 2021-10-14   936  {
> > 5654ec78dd7e64 Ansuel Smith 2021-10-14   937int port, cpu_port_index = 
> > 0, ret;
> > 6c43809bf1bee7 Ansuel Smith 2021-10-14   938struct device_node *port_dn;
> > 6c43809bf1bee7 Ansuel Smith 2021-10-14   939phy_interface_t mode;
> > 6c43809bf1bee7 Ansuel Smith 2021-10-14   940struct dsa_port *dp;
> > 5654ec78dd7e64 Ansuel Smith 2021-10-14   941u32 delay;
> > 6c43809bf1bee7 Ansuel Smith 2021-10-14   942
> > 6c43809bf1bee7 Ansuel Smith 2021-10-14   943/* We have 2 CPU port. 
> > Check them */
> > 5654ec78dd7e64 Ansuel Smith 2021-10-14  @944for (port = 0; port < 
> > QCA8K_NUM_PORTS && cpu_port_index < QCA8K_NUM_CPU_PORTS; port++) {
> > 
> >  ^
> > Assume cpu_port_index = QCA8K_NUM_CPU_PORTS - 1;
> >
> >
> > 6c43809bf1bee7 Ansuel Smith 2021-10-14   945/* Skip every other 
> > port */
> > 6c43809bf1bee7 Ansuel Smith 2021-10-14   946if (port != 0 && 
> > port != 6)
> > 6c43809bf1bee7 Ansuel Smith 2021-10-14   947continue;
> > 6c43809bf1bee7 Ansuel Smith 2021-10-14   948
> > 6c43809bf1bee7 Ansuel Smith 2021-10-14   949dp = 
> > dsa_to_port(priv->ds, port);
> > 6c43809bf1bee7 Ansuel Smith 2021-10-14   950port_dn = dp->dn;
> > 5654ec78dd7e64 Ansuel Smith 2021-10-14   951cpu_port_index++;
> > ^
> > cpu_port_index is now out of bounds.
> >
> > 6c43809bf1bee7 Ansuel Smith 2021-10-14   952
> > 6c43809bf1bee7 Ansuel Smith 2021-10-14   953if 
> > (!of_device_is_available(port_dn))
> > 6c43809bf1bee7 Ansuel Smith 2021-10-14   954continue;
> > 6c43809bf1bee7 Ansuel Smith 2021-10-14   955
> > 6c43809bf1bee7 Ansuel Smith 2021-10-14   956ret = 
> > of_get_phy_mode(port_dn, );
> > 6c43809bf1bee7 Ansuel Smith 2021-10-14   957if (ret)
> > 6c43809bf1bee7 Ansuel Smith 2021-10-14   958continue;
> > 6c43809bf1bee7 Ansuel Smith 2021-10-14   959
> > 5654ec78dd7e64 Ansuel Smith 2021-10-14   960switch (mode) {
> > 5654ec78dd7e64 Ansuel Smith 2021-10-14   961case 
> > PHY_INTERFACE_MODE_RGMII:
> > 5654ec78dd7e64 Ansuel Smith 2021-10-14   962case 
> > PHY_INTERFACE_MODE_RGMII_ID:
> > 5654ec78dd7e64 Ansuel Smith 2021-10-14   963case 
> > PHY_INTERFACE_MODE_RGMII_TXID:
> > 5654ec78dd7e64 Ansuel Smith 2021-10-14   964case 
> > PHY_INTERFACE_MODE_RGMII_RXID:
> > 5654ec78dd7e64 Ansuel Smith 2021-10-14   965delay = 0;
> > 5654ec78dd7e64 Ansuel Smith 2021-10-14   966
> > 5654ec78dd7e64 Ansuel Smith 2021-10-14   967if 
> > (!of_property_read_u32(port_dn, "tx-internal-delay-ps", ))
> > 5654ec78dd7e64 Ansuel Smith 2021-10-14   968/* 
> > Switch regs accept value in ns, convert ps to ns */
> > 5654ec78dd7e64 Ansuel Smith 2021-10-14   969
> > delay = delay / 1000;
> > 5654ec78dd7e64 Ansuel Smith 2021-10-14   970else if 
> > (mode == PHY_INTERFACE_MODE_RGMII_ID ||
> > 5654ec78dd7e64 Ansuel Smith 2021-10-14   971 
> > mode == PHY_INTERFACE_MODE_RGMII_TXID)
> > 5654ec78dd7e64 Ansuel Smith 2021-10-14   972
> > delay = 1;
> > 5654ec78dd7e64 Ansuel Smith 2021-10-14   973
> > 5654ec78dd7e64 Ansuel Smith 2021-10-14   974if (delay > 
> > QCA8K_MAX_DELAY) {
> > 5654ec78dd7e64 Ansuel Smith 2021-10-14   975

[kbuild] arch/arm/kernel/module-plts.c:65 get_module_plt() warn: we never enter this loop

2021-11-15 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Alex Sverdlin 
CC: "Russell King (Oracle)" 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   8ab774587903771821b59471cc723bba6d893942
commit: 79f32b221b18c15a98507b101ef4beb52444cc6f ARM: 9079/1: ftrace: Add 
MODULE_PLTS support
date:   5 months ago
:: branch date: 25 hours ago
:: commit date: 5 months ago
config: arm-randconfig-m031-20211104 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 

smatch warnings:
arch/arm/kernel/module-plts.c:65 get_module_plt() warn: we never enter this loop

vim +65 arch/arm/kernel/module-plts.c

79f32b221b18c15 Alex Sverdlin  2021-05-05   50  
7d485f647c1f4a6 Ard Biesheuvel 2014-11-24   51  u32 get_module_plt(struct 
module *mod, unsigned long loc, Elf32_Addr val)
7d485f647c1f4a6 Ard Biesheuvel 2014-11-24   52  {
b7ede5a1f5905ac Ard Biesheuvel 2017-02-22   53  struct mod_plt_sec 
*pltsec = !in_init(mod, loc) ? >arch.core :
b7ede5a1f5905ac Ard Biesheuvel 2017-02-22   54  
  >arch.init;
79f32b221b18c15 Alex Sverdlin  2021-05-05   55  struct plt_entries *plt;
79f32b221b18c15 Alex Sverdlin  2021-05-05   56  int idx;
79f32b221b18c15 Alex Sverdlin  2021-05-05   57  
79f32b221b18c15 Alex Sverdlin  2021-05-05   58  /* cache the address, 
ELF header is available only during module load */
79f32b221b18c15 Alex Sverdlin  2021-05-05   59  if (!pltsec->plt_ent)
79f32b221b18c15 Alex Sverdlin  2021-05-05   60  pltsec->plt_ent 
= (struct plt_entries *)pltsec->plt->sh_addr;
79f32b221b18c15 Alex Sverdlin  2021-05-05   61  plt = pltsec->plt_ent;
b7ede5a1f5905ac Ard Biesheuvel 2017-02-22   62  
79f32b221b18c15 Alex Sverdlin  2021-05-05   63  prealloc_fixed(pltsec, 
plt);
79f32b221b18c15 Alex Sverdlin  2021-05-05   64  
79f32b221b18c15 Alex Sverdlin  2021-05-05  @65  for (idx = 0; idx < 
ARRAY_SIZE(fixed_plts); ++idx)
79f32b221b18c15 Alex Sverdlin  2021-05-05   66  if 
(plt->lit[idx] == val)
79f32b221b18c15 Alex Sverdlin  2021-05-05   67  return 
(u32)>ldr[idx];
35fa91eed817d2c Ard Biesheuvel 2016-08-16   68  
79f32b221b18c15 Alex Sverdlin  2021-05-05   69  idx = 0;
66e94ba3c8ea5ff Ard Biesheuvel 2016-08-18   70  /*
66e94ba3c8ea5ff Ard Biesheuvel 2016-08-18   71   * Look for an existing 
entry pointing to 'val'. Given that the
66e94ba3c8ea5ff Ard Biesheuvel 2016-08-18   72   * relocations are 
sorted, this will be the last entry we allocated.
66e94ba3c8ea5ff Ard Biesheuvel 2016-08-18   73   * (if one exists).
66e94ba3c8ea5ff Ard Biesheuvel 2016-08-18   74   */
b7ede5a1f5905ac Ard Biesheuvel 2017-02-22   75  if (pltsec->plt_count > 
0) {
b7ede5a1f5905ac Ard Biesheuvel 2017-02-22   76  plt += 
(pltsec->plt_count - 1) / PLT_ENT_COUNT;
b7ede5a1f5905ac Ard Biesheuvel 2017-02-22   77  idx = 
(pltsec->plt_count - 1) % PLT_ENT_COUNT;
7d485f647c1f4a6 Ard Biesheuvel 2014-11-24   78  
66e94ba3c8ea5ff Ard Biesheuvel 2016-08-18   79  if 
(plt->lit[idx] == val)
66e94ba3c8ea5ff Ard Biesheuvel 2016-08-18   80  return 
(u32)>ldr[idx];
66e94ba3c8ea5ff Ard Biesheuvel 2016-08-18   81  
66e94ba3c8ea5ff Ard Biesheuvel 2016-08-18   82  idx = (idx + 1) 
% PLT_ENT_COUNT;
66e94ba3c8ea5ff Ard Biesheuvel 2016-08-18   83  if (!idx)
66e94ba3c8ea5ff Ard Biesheuvel 2016-08-18   84  plt++;
66e94ba3c8ea5ff Ard Biesheuvel 2016-08-18   85  }
66e94ba3c8ea5ff Ard Biesheuvel 2016-08-18   86  
b7ede5a1f5905ac Ard Biesheuvel 2017-02-22   87  pltsec->plt_count++;
b7ede5a1f5905ac Ard Biesheuvel 2017-02-22   88  
BUG_ON(pltsec->plt_count * PLT_ENT_SIZE > pltsec->plt->sh_size);
7d485f647c1f4a6 Ard Biesheuvel 2014-11-24   89  
66e94ba3c8ea5ff Ard Biesheuvel 2016-08-18   90  if (!idx)
7d485f647c1f4a6 Ard Biesheuvel 2014-11-24   91  /* Populate a 
new set of entries */
7d485f647c1f4a6 Ard Biesheuvel 2014-11-24   92  *plt = (struct 
plt_entries){
7d485f647c1f4a6 Ard Biesheuvel 2014-11-24   93  { [0 
... PLT_ENT_COUNT - 1] = PLT_ENT_LDR, },
7d485f647c1f4a6 Ard Biesheuvel 2014-11-24   94  { val, }
7d485f647c1f4a6 Ard Biesheuvel 2014-11-24   95  };
66e94ba3c8ea5ff Ard Biesheuvel 2016-08-18   96  else
66e94ba3c8ea5ff Ard Biesheuvel 2016-08-18   97  plt->lit[idx] = 
val;
66e94ba3c8ea5ff Ard Biesheuvel 2016-08-18   98  
66e94ba3c8ea5ff Ard Biesheuvel 2016-08-18   99  return 
(u32)>ldr[idx];
7d485f647c1f4a6 Ard Biesheuvel 2014-11-24  100  }
7d485f647c1f4a6 Ard Biesheuvel 2014-11-24  101  

[kbuild] drivers/net/dsa/sja1105/sja1105_main.c:1818 sja1105_fast_age() warn: should '((((1))) << port)' be a 64 bit type?

2021-11-15 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Vladimir Oltean 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   8ab774587903771821b59471cc723bba6d893942
commit: 5126ec72a094bd3a721941323c48cc80c60139d9 net: dsa: sja1105: add FDB 
fast ageing support
date:   3 months ago
:: branch date: 23 hours ago
:: commit date: 3 months ago
config: i386-randconfig-m021-20211022 (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 
Reported-by: Dan Carpenter 

New smatch warnings:
drivers/net/dsa/sja1105/sja1105_main.c:1818 sja1105_fast_age() warn: should 
'1))) << port)' be a 64 bit type?

Old smatch warnings:
drivers/net/dsa/sja1105/sja1105_main.c:49 sja1105_port_allow_traffic() warn: 
should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:57 sja1105_can_forward() warn: should 
'1))) << to)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:129 sja1105_commit_pvid() warn: should 
'1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:255 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:267 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:276 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:285 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:291 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:298 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:530 sja1105_init_l2_forwarding() warn: 
should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:531 sja1105_init_l2_forwarding() warn: 
should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:552 sja1105_init_l2_forwarding() warn: 
should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:553 sja1105_init_l2_forwarding() warn: 
should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:676 sja1105_init_l2_forwarding_params() 
warn: is 'table->entries' large enough for 'struct 
sja1105_l2_forwarding_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:809 sja1105_init_topology() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:920 sja1105_init_avb_params() warn: is 
'table->entries' large enough for 'struct sja1105_avb_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:1387 sja1105_find_static_fdb_entry() 
warn: should '1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1506 sja1105et_fdb_add() warn: should 
'1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1508 sja1105et_fdb_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1516 sja1105et_fdb_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1619 sja1105pqrs_fdb_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1629 sja1105pqrs_fdb_add() warn: should 
'1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1637 sja1105pqrs_fdb_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1710 sja1105pqrs_fdb_del() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1779 sja1105_fdb_dump() warn: should 
'1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1871 sja1105_manage_flood_domains() 
warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1873 sja1105_manage_flood_domains() 
warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2367 sja1105_vlan_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2368 sja1105_vlan_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2372 sja1105_vlan_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2682 sja1105_mgmt_xmit() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2990 sja1105_port_mcast_flood() warn: 
should '(((1))) << to' be a 64 bit type?

vim +1818 drivers/net/dsa/sja1105/sja1105_main.c

291d1e72b75642 Vladimir Oltean 2019-05-02  1796  
5126ec72a094bd Vladimir Oltean 2021-08-08  1797  static 

[kbuild] drivers/firmware/cirrus/cs_dsp.c:1211:2: warning: Value stored to 'adsp1_sizes' is never read [clang-analyzer-deadcode.DeadStores]

2021-11-15 Thread kernel test robot
CC: l...@lists.linux.dev
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Simon Trimmer 
CC: Mark Brown 
CC: Charles Keepax 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   8ab774587903771821b59471cc723bba6d893942
commit: f6bc909e7673c30abcbdb329e7d0aa2e83c103d7 firmware: cs_dsp: add driver 
to support firmware loading on Cirrus Logic DSPs
date:   7 weeks ago
:: branch date: 22 hours ago
:: commit date: 7 weeks ago
config: riscv-randconfig-c006-20211101 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 
82ed106567063ea269c6d5669278b733e173a42f)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f6bc909e7673c30abcbdb329e7d0aa2e83c103d7
git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout f6bc909e7673c30abcbdb329e7d0aa2e83c103d7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 
clang-analyzer 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 


clang-analyzer warnings: (new ones prefixed by >>)
   const struct usb_device_descriptor *udesc = 
&(hid_to_usb_dev(hid)->descriptor);
 ^
   drivers/hid/usbhid/usbhid.h:94:2: note: expanded from macro 'hid_to_usb_dev'
   to_usb_device(hid_dev->dev.parent->parent)
   ^
   include/linux/usb.h:708:26: note: expanded from macro 'to_usb_device'
   #define to_usb_device(d) container_of(d, struct usb_device, dev)
^
   include/linux/kernel.h:495:61: note: expanded from macro 'container_of'
   BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&   \
  ^
   drivers/hid/hid-logitech-hidpp.c:2548:48: note: Taking false branch
   const struct usb_device_descriptor *udesc = 
&(hid_to_usb_dev(hid)->descriptor);
 ^
   drivers/hid/usbhid/usbhid.h:94:2: note: expanded from macro 'hid_to_usb_dev'
   to_usb_device(hid_dev->dev.parent->parent)
   ^
   include/linux/usb.h:708:26: note: expanded from macro 'to_usb_device'
   #define to_usb_device(d) container_of(d, struct usb_device, dev)
^
   include/linux/kernel.h:495:2: note: expanded from macro 'container_of'
   BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&   \
   ^
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to 
see all)
   include/linux/compiler_types.h:322:2: note: expanded from macro 
'compiletime_assert'
   _compiletime_assert(condition, msg, __compiletime_assert_, 
__COUNTER__)
   ^
   include/linux/compiler_types.h:310:2: note: expanded from macro 
'_compiletime_assert'
   __compiletime_assert(condition, msg, prefix, suffix)
   ^
   include/linux/compiler_types.h:302:3: note: expanded from macro 
'__compiletime_assert'
   if (!(condition))   \
   ^
   drivers/hid/hid-logitech-hidpp.c:2548:48: note: Loop condition is false.  
Exiting loop
   const struct usb_device_descriptor *udesc = 
&(hid_to_usb_dev(hid)->descriptor);
 ^
   drivers/hid/usbhid/usbhid.h:94:2: note: expanded from macro 'hid_to_usb_dev'
   to_usb_device(hid_dev->dev.parent->parent)
   ^
   include/linux/usb.h:708:26: note: expanded from macro 'to_usb_device'
   #define to_usb_device(d) container_of(d, struct usb_device, dev)
^
   include/linux/kernel.h:495:2: note: expanded from macro 'container_of'
   BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&   \
   ^
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to 
see all)
   include/linux/compiler_types.h:322:2: note: expanded from macro 
'compiletime_assert'
   _compiletime_assert(condition, msg, __compiletime_assert_, 
__COUNTER__)
   ^
   include/linux/compiler_types.h:310:2: note: expanded from macro 
'_compiletime_assert'
   __compiletime_assert(condition, msg, prefix, suffix)
   ^
   include/linux/compiler_types.h:300:2: note: expanded from macro 
'__compiletime_assert'
   do {\
   ^
   drivers/hid/hid-logitech-hidpp.c:2551:16: 

[kbuild] [intel-lts:5.10/yocto 17557/17586] arch/x86/mm/mmap.c:271 vm_start_gap() warn: bitwise AND condition is false here

2021-11-15 Thread kernel test robot
CC: kbuild-...@lists.01.org
TO: "Yu-cheng Yu" 
CC: gaojianf 
CC: "Kirill A. Shutemov" 

tree:   https://github.com/intel/linux-intel-lts.git 5.10/yocto
head:   2202f30edc3f9f14646647cd48c4bd4bfd12e9b7
commit: 933d01c9f63c0957cee5277f0054c32ca7b892c3 [17557/17586] mm: Add guard 
pages around a shadow stack.
:: branch date: 7 days ago
:: commit date: 13 days ago
config: x86_64-randconfig-m001-2025 (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 
Reported-by: Dan Carpenter 

New smatch warnings:
arch/x86/mm/mmap.c:271 vm_start_gap() warn: bitwise AND condition is false here
arch/x86/mm/mmap.c:289 vm_end_gap() warn: bitwise AND condition is false here

Old smatch warnings:
arch/x86/mm/mmap.c:168 arch_vma_name() warn: bitwise AND condition is false here

vim +271 arch/x86/mm/mmap.c

933d01c9f63c09 Yu-cheng Yu 2019-10-04  263  
933d01c9f63c09 Yu-cheng Yu 2019-10-04  264  unsigned long vm_start_gap(struct 
vm_area_struct *vma)
933d01c9f63c09 Yu-cheng Yu 2019-10-04  265  {
933d01c9f63c09 Yu-cheng Yu 2019-10-04  266  unsigned long vm_start = 
vma->vm_start;
933d01c9f63c09 Yu-cheng Yu 2019-10-04  267  unsigned long gap = 0;
933d01c9f63c09 Yu-cheng Yu 2019-10-04  268  
933d01c9f63c09 Yu-cheng Yu 2019-10-04  269  if (vma->vm_flags & 
VM_GROWSDOWN)
933d01c9f63c09 Yu-cheng Yu 2019-10-04  270  gap = stack_guard_gap;
933d01c9f63c09 Yu-cheng Yu 2019-10-04 @271  else if (vma->vm_flags & 
VM_SHADOW_STACK)
933d01c9f63c09 Yu-cheng Yu 2019-10-04  272  gap = 
SHADOW_STACK_GUARD_GAP;
933d01c9f63c09 Yu-cheng Yu 2019-10-04  273  
933d01c9f63c09 Yu-cheng Yu 2019-10-04  274  if (gap != 0) {
933d01c9f63c09 Yu-cheng Yu 2019-10-04  275  vm_start -= gap;
933d01c9f63c09 Yu-cheng Yu 2019-10-04  276  if (vm_start > 
vma->vm_start)
933d01c9f63c09 Yu-cheng Yu 2019-10-04  277  vm_start = 0;
933d01c9f63c09 Yu-cheng Yu 2019-10-04  278  }
933d01c9f63c09 Yu-cheng Yu 2019-10-04  279  return vm_start;
933d01c9f63c09 Yu-cheng Yu 2019-10-04  280  }
933d01c9f63c09 Yu-cheng Yu 2019-10-04  281  
933d01c9f63c09 Yu-cheng Yu 2019-10-04  282  unsigned long vm_end_gap(struct 
vm_area_struct *vma)
933d01c9f63c09 Yu-cheng Yu 2019-10-04  283  {
933d01c9f63c09 Yu-cheng Yu 2019-10-04  284  unsigned long vm_end = 
vma->vm_end;
933d01c9f63c09 Yu-cheng Yu 2019-10-04  285  unsigned long gap = 0;
933d01c9f63c09 Yu-cheng Yu 2019-10-04  286  
933d01c9f63c09 Yu-cheng Yu 2019-10-04  287  if (vma->vm_flags & VM_GROWSUP)
933d01c9f63c09 Yu-cheng Yu 2019-10-04  288  gap = stack_guard_gap;
933d01c9f63c09 Yu-cheng Yu 2019-10-04 @289  else if (vma->vm_flags & 
VM_SHADOW_STACK)

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


.config.gz
Description: application/gzip
___
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org


[kbuild] Re: [PATCH v4 06/10] hwmon: (tmp421) really disable channels

2021-11-15 Thread kernel test robot
CC: l...@lists.linux.dev
CC: kbuild-...@lists.01.org
In-Reply-To: 

References: 

TO: Krzysztof Adamski 

Hi Krzysztof,

I love your patch! Perhaps something to improve:

[auto build test WARNING on groeck-staging/hwmon-next]
[cannot apply to robh/for-next v5.16-rc1 next-2025]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Krzysztof-Adamski/Add-per-channel-properies-support-in-tmp421/20211012-173142
base:   
https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git 
hwmon-next
:: branch date: 5 weeks ago
:: commit date: 5 weeks ago
config: arm-randconfig-c002-20211013 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 
b6a8c695542b2987eb9a203d5663a0740cb4725f)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# 
https://github.com/0day-ci/linux/commit/4a0f8262fe071b0b27c6fba7455627f3c5a5209e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Krzysztof-Adamski/Add-per-channel-properies-support-in-tmp421/20211012-173142
git checkout 4a0f8262fe071b0b27c6fba7455627f3c5a5209e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 
clang-analyzer 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 


clang-analyzer warnings: (new ones prefixed by >>)
^
   include/linux/hid.h:1005:28: note: Assuming 'bmap' is null
   if (unlikely(c > limit || !bmap)) {
 ^
   include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
   # define unlikely(x)__builtin_expect(!!(x), 0)
   ^
   include/linux/hid.h:1005:2: note: Taking true branch
   if (unlikely(c > limit || !bmap)) {
   ^
   include/linux/hid.h:1006:3: note: Assuming the condition is true
   pr_warn_ratelimited("%s: Invalid code %d type %d\n",
   ^
   include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited'
   printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
   ^~~
   include/linux/printk.h:639:6: note: expanded from macro 'printk_ratelimited'
   if (__ratelimit(&_rs))  \
   ^
   include/linux/ratelimit_types.h:41:28: note: expanded from macro 
'__ratelimit'
   #define __ratelimit(state) ___ratelimit(state, __func__)
  ^
   include/linux/hid.h:1006:3: note: Taking true branch
   pr_warn_ratelimited("%s: Invalid code %d type %d\n",
   ^
   include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited'
   printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
   ^
   include/linux/printk.h:639:2: note: expanded from macro 'printk_ratelimited'
   if (__ratelimit(&_rs))  \
   ^
   include/linux/hid.h:1006:3: note: Loop condition is false.  Exiting loop
   pr_warn_ratelimited("%s: Invalid code %d type %d\n",
   ^
   include/linux/printk.h:656:2: note: expanded from macro 'pr_warn_ratelimited'
   printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
   ^
   include/linux/printk.h:640:3: note: expanded from macro 'printk_ratelimited'
   printk(fmt, ##__VA_ARGS__); \
   ^
   include/linux/printk.h:446:26: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
^
   include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap'
   __printk_index_emit(_fmt, NULL, NULL);  \
   ^
   include/linux/printk.h:392:34: note: expanded from macro 
'__printk_index_emit'
   #define __printk_index_emit(...) do {} while (0)
^
   include/linux/hid.h:1007:9: note: Access to field 'name' results in a 
dereference of a null pointer (loaded from variable 'input')
   input->name, c, type);
   ^
   include/linux/printk.h:656:49: note: expanded from macro 
'pr_warn_ratelimited'

[kbuild] drivers/net/dsa/sja1105/sja1105_main.c:521 sja1105_init_l2_forwarding() warn: should '(((1))) << to' be a 64 bit type?

2021-11-15 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Vladimir Oltean 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   8ab774587903771821b59471cc723bba6d893942
commit: 3fa212707b8e6026cea6a92faea87f556e0cba9b net: dsa: sja1105: manage the 
forwarding domain towards DSA ports
date:   3 months ago
:: branch date: 22 hours ago
:: commit date: 3 months ago
config: i386-randconfig-m021-20211022 (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 
Reported-by: Dan Carpenter 

New smatch warnings:
drivers/net/dsa/sja1105/sja1105_main.c:521 sja1105_init_l2_forwarding() warn: 
should '(((1))) << to' be a 64 bit type?

Old smatch warnings:
drivers/net/dsa/sja1105/sja1105_main.c:49 sja1105_port_allow_traffic() warn: 
should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:57 sja1105_can_forward() warn: should 
'1))) << to)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:129 sja1105_commit_pvid() warn: should 
'1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:248 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:260 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:269 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:278 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:284 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:291 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:522 sja1105_init_l2_forwarding() warn: 
should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:543 sja1105_init_l2_forwarding() warn: 
should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:544 sja1105_init_l2_forwarding() warn: 
should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:640 sja1105_init_l2_forwarding_params() 
warn: is 'table->entries' large enough for 'struct 
sja1105_l2_forwarding_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:773 sja1105_init_topology() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:884 sja1105_init_avb_params() warn: is 
'table->entries' large enough for 'struct sja1105_avb_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:1351 sja1105_find_static_fdb_entry() 
warn: should '1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1469 sja1105et_fdb_add() warn: should 
'1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1471 sja1105et_fdb_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1479 sja1105et_fdb_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1565 sja1105pqrs_fdb_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1573 sja1105pqrs_fdb_add() warn: should 
'1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1578 sja1105pqrs_fdb_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1628 sja1105pqrs_fdb_del() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1697 sja1105_fdb_dump() warn: should 
'1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1749 sja1105_manage_flood_domains() 
warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1751 sja1105_manage_flood_domains() 
warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2244 sja1105_vlan_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2245 sja1105_vlan_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2249 sja1105_vlan_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2558 sja1105_mgmt_xmit() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2876 sja1105_port_mcast_flood() warn: 
should '(((1))) << to' be a 64 bit type?

vim +521 drivers/net/dsa/sja1105/sja1105_main.c

8aa9ebccae8762 Vladimir Oltean 2019-05-02  472  
8aa9ebccae8762 Vladimir Oltean 2019-05-02  473  static int 
sja1105_init_l2_forwarding(struct sja1105_private *priv)
8aa9ebccae8762 Vladimir Oltean 

[kbuild] drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:236:9: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage [clang-analyzer-

2021-11-15 Thread kernel test robot
CC: l...@lists.linux.dev
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Arunpravin 
CC: 0day robot 

tree:   
https://github.com/0day-ci/linux/commits/Arunpravin/Enable-buddy-memory-manager-support/20210921-032602
head:   71b3775a5ce7b59e8c5292ae438284e8569c9e9f
commit: 71b3775a5ce7b59e8c5292ae438284e8569c9e9f Add drm buddy manager support 
to amdgpu driver
date:   8 weeks ago
:: branch date: 8 weeks ago
:: commit date: 8 weeks ago
config: riscv-randconfig-c006-20210927 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 
dc6e8dfdfe7efecfda318d43a06fae18b40eb498)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# 
https://github.com/0day-ci/linux/commit/71b3775a5ce7b59e8c5292ae438284e8569c9e9f
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Arunpravin/Enable-buddy-memory-manager-support/20210921-032602
git checkout 71b3775a5ce7b59e8c5292ae438284e8569c9e9f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 
clang-analyzer 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 


clang-analyzer warnings: (new ones prefixed by >>)
   ^
   kernel/sched/topology.c:2218:3: note: Loop condition is true.  Entering loop 
body
   for (sd = *per_cpu_ptr(d.sd, i); sd; sd = sd->parent) {
   ^
   kernel/sched/topology.c:2220:8: note: Assuming the condition is false
   if (sd->flags & SD_OVERLAP) {
   ^~
   kernel/sched/topology.c:2220:4: note: Taking false branch
   if (sd->flags & SD_OVERLAP) {
   ^
   kernel/sched/topology.c:2224:9: note: Calling 'build_sched_groups'
   if (build_sched_groups(sd, i))
   ^
   kernel/sched/topology.c:1194:37: note: 'last' initialized to a null pointer 
value
   struct sched_group *first = NULL, *last = NULL;
  ^~~~
   kernel/sched/topology.c:1200:2: note: Assuming 'debug_locks' is 0
   lockdep_assert_held(_domains_mutex);
   ^
   include/linux/lockdep.h:316:2: note: expanded from macro 
'lockdep_assert_held'
   lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
   ^
   include/linux/lockdep.h:310:15: note: expanded from macro 'lockdep_assert'
   do { WARN_ON(debug_locks && !(cond)); } while (0)
^~~
   include/asm-generic/bug.h:121:25: note: expanded from macro 'WARN_ON'
   int __ret_warn_on = !!(condition);  \
  ^
   kernel/sched/topology.c:1200:2: note: Left side of '&&' is false
   lockdep_assert_held(_domains_mutex);
   ^
   include/linux/lockdep.h:316:2: note: expanded from macro 
'lockdep_assert_held'
   lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
   ^
   include/linux/lockdep.h:310:27: note: expanded from macro 'lockdep_assert'
   do { WARN_ON(debug_locks && !(cond)); } while (0)
^
   kernel/sched/topology.c:1200:2: note: Taking false branch
   lockdep_assert_held(_domains_mutex);
   ^
   include/linux/lockdep.h:316:2: note: expanded from macro 
'lockdep_assert_held'
   lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
   ^
   include/linux/lockdep.h:310:7: note: expanded from macro 'lockdep_assert'
   do { WARN_ON(debug_locks && !(cond)); } while (0)
^
   include/asm-generic/bug.h:122:2: note: expanded from macro 'WARN_ON'
   if (unlikely(__ret_warn_on))\
   ^
   kernel/sched/topology.c:1200:2: note: Loop condition is false.  Exiting loop
   lockdep_assert_held(_domains_mutex);
   ^
   include/linux/lockdep.h:316:2: note: expanded from macro 
'lockdep_assert_held'
   lockdep_assert(lockdep_is_held(l) != LOCK_STATE_NOT_HELD)
   ^
   include/linux/lockdep.h:310:2: note: expanded from macro 'lockdep_assert'
   do { WARN_ON(debug_locks && !(cond)); } while (0)
   ^
   kernel/sched/topology.c:1205:2: note: Assuming 'i' is >= 8
   for_each_cpu_wrap(i, span, cpu) {
   ^
   include/linux/cpumask.h:271:7: note: expanded from macro 'for_each_cpu_wrap'

[kbuild] drivers/net/ethernet/marvell/prestera/prestera_span.c:95 prestera_span_get() warn: passing a valid pointer to 'PTR_ERR'

2021-11-15 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Serhiy Boiko 
CC: Volodymyr Mytnyk 
CC: Vadym Kochan 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   8ab774587903771821b59471cc723bba6d893942
commit: 13defa275eef90c07886dbd9e74e3dada8af7348 net: marvell: prestera: Add 
matchall support
date:   5 months ago
:: branch date: 21 hours ago
:: commit date: 5 months ago
config: arm-randconfig-m031-20211104 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 

smatch warnings:
drivers/net/ethernet/marvell/prestera/prestera_span.c:95 prestera_span_get() 
warn: passing a valid pointer to 'PTR_ERR'

vim +/PTR_ERR +95 drivers/net/ethernet/marvell/prestera/prestera_span.c

13defa275eef90 Serhiy Boiko 2021-06-16   73  
13defa275eef90 Serhiy Boiko 2021-06-16   74  static int 
prestera_span_get(struct prestera_port *port, u8 *span_id)
13defa275eef90 Serhiy Boiko 2021-06-16   75  {
13defa275eef90 Serhiy Boiko 2021-06-16   76 u8 new_span_id;
13defa275eef90 Serhiy Boiko 2021-06-16   77 struct prestera_switch *sw = 
port->sw;
13defa275eef90 Serhiy Boiko 2021-06-16   78 struct prestera_span_entry 
*entry;
13defa275eef90 Serhiy Boiko 2021-06-16   79 int err;
13defa275eef90 Serhiy Boiko 2021-06-16   80  
13defa275eef90 Serhiy Boiko 2021-06-16   81 entry = 
prestera_span_entry_find_by_port(sw->span, port);
13defa275eef90 Serhiy Boiko 2021-06-16   82 if (entry) {
13defa275eef90 Serhiy Boiko 2021-06-16   83 
refcount_inc(>ref_count);
13defa275eef90 Serhiy Boiko 2021-06-16   84 *span_id = entry->id;
13defa275eef90 Serhiy Boiko 2021-06-16   85 return 0;
13defa275eef90 Serhiy Boiko 2021-06-16   86 }
13defa275eef90 Serhiy Boiko 2021-06-16   87  
13defa275eef90 Serhiy Boiko 2021-06-16   88 err = 
prestera_hw_span_get(port, _span_id);
13defa275eef90 Serhiy Boiko 2021-06-16   89 if (err)
13defa275eef90 Serhiy Boiko 2021-06-16   90 return err;
13defa275eef90 Serhiy Boiko 2021-06-16   91  
13defa275eef90 Serhiy Boiko 2021-06-16   92 entry = 
prestera_span_entry_create(port, new_span_id);
13defa275eef90 Serhiy Boiko 2021-06-16   93 if (IS_ERR(entry)) {
13defa275eef90 Serhiy Boiko 2021-06-16   94 
prestera_hw_span_release(sw, new_span_id);
13defa275eef90 Serhiy Boiko 2021-06-16  @95 return PTR_ERR(entry);
13defa275eef90 Serhiy Boiko 2021-06-16   96 }
13defa275eef90 Serhiy Boiko 2021-06-16   97  
13defa275eef90 Serhiy Boiko 2021-06-16   98 *span_id = new_span_id;
13defa275eef90 Serhiy Boiko 2021-06-16   99 return 0;
13defa275eef90 Serhiy Boiko 2021-06-16  100  }
13defa275eef90 Serhiy Boiko 2021-06-16  101  

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


.config.gz
Description: application/gzip
___
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org


[kbuild] drivers/net/dsa/sja1105/sja1105_main.c:737 sja1105_init_topology() warn: should '(((1))) << port' be a 64 bit type?

2021-11-15 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Vladimir Oltean 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   8ab774587903771821b59471cc723bba6d893942
commit: 30a100e60cf36ade9902dc71610f93563d0bd7b0 net: dsa: sja1105: configure 
the cascade ports based on topology
date:   3 months ago
:: branch date: 20 hours ago
:: commit date: 3 months ago
config: i386-randconfig-m021-20211022 (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 
Reported-by: Dan Carpenter 

New smatch warnings:
drivers/net/dsa/sja1105/sja1105_main.c:737 sja1105_init_topology() warn: should 
'(((1))) << port' be a 64 bit type?

Old smatch warnings:
drivers/net/dsa/sja1105/sja1105_main.c:49 sja1105_port_allow_traffic() warn: 
should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:57 sja1105_can_forward() warn: should 
'1))) << to)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:129 sja1105_commit_pvid() warn: should 
'1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:248 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:260 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:269 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:278 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:284 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:291 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:518 sja1105_init_l2_forwarding() warn: 
should '(((1))) << upstream' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:519 sja1105_init_l2_forwarding() warn: 
should '(((1))) << upstream' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:604 sja1105_init_l2_forwarding_params() 
warn: is 'table->entries' large enough for 'struct 
sja1105_l2_forwarding_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:848 sja1105_init_avb_params() warn: is 
'table->entries' large enough for 'struct sja1105_avb_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:1315 sja1105_find_static_fdb_entry() 
warn: should '1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1433 sja1105et_fdb_add() warn: should 
'1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1435 sja1105et_fdb_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1443 sja1105et_fdb_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1529 sja1105pqrs_fdb_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1537 sja1105pqrs_fdb_add() warn: should 
'1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1542 sja1105pqrs_fdb_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1592 sja1105pqrs_fdb_del() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1661 sja1105_fdb_dump() warn: should 
'1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1713 sja1105_manage_flood_domains() 
warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1715 sja1105_manage_flood_domains() 
warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2208 sja1105_vlan_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2209 sja1105_vlan_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2213 sja1105_vlan_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2522 sja1105_mgmt_xmit() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2840 sja1105_port_mcast_flood() warn: 
should '(((1))) << to' be a 64 bit type?

vim +737 drivers/net/dsa/sja1105/sja1105_main.c

ceec8bc0988dca Vladimir Oltean 2021-06-08  690  
30a100e60cf36a Vladimir Oltean 2021-08-04  691  static int 
sja1105_init_topology(struct sja1105_private *priv,
30a100e60cf36a Vladimir Oltean 2021-08-04  692  
 struct sja1105_general_params_entry *general_params)
30a100e60cf36a Vladimir Oltean 2021-08-04  693  {
30a100e60cf36a Vladimir Oltean 2021-08-04  694  struct dsa_switch *ds = 

[kbuild] drivers/dma/xilinx/zynqmp_dma.c:359:2: warning: Value stored to 'val' is never read [clang-analyzer-deadcode.DeadStores]

2021-11-15 Thread kernel test robot
CC: l...@lists.linux.dev
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Michael Tretter 
CC: Vinod Koul 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   8ab774587903771821b59471cc723bba6d893942
commit: 7073b5a8bd6ea641b41568e2899b0977f79134e3 dmaengine: zynqmp_dma: enable 
COMPILE_TEST
date:   6 weeks ago
:: branch date: 20 hours ago
:: commit date: 6 weeks ago
config: riscv-randconfig-c006-2025 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 
fbe72e41b99dc7994daac300d208a955be3e4a0a)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7073b5a8bd6ea641b41568e2899b0977f79134e3
git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 7073b5a8bd6ea641b41568e2899b0977f79134e3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 
clang-analyzer 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 


clang-analyzer warnings: (new ones prefixed by >>)
   ret = cx24120_writereg(state, CX24120_REG_RATEDIV, ret);
   ^ ~
   drivers/media/dvb-frontends/cx24120.c:1229:2: note: Value stored to 'ret' is 
never read
   ret = cx24120_writereg(state, CX24120_REG_RATEDIV, ret);
   ^ ~
   drivers/media/dvb-frontends/cx24120.c:1471:24: warning: Value stored to 
'state' during its initialization is never read 
[clang-analyzer-deadcode.DeadStores]
   struct cx24120_state *state = fe->demodulator_priv;
 ^   
   drivers/media/dvb-frontends/cx24120.c:1471:24: note: Value stored to 'state' 
during its initialization is never read
   struct cx24120_state *state = fe->demodulator_priv;
 ^   
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   5 warnings generated.
   drivers/media/dvb-frontends/stv0900_sw.c:1978:4: warning: Value stored to 
'lock' is never read [clang-analyzer-deadcode.DeadStores]
   lock = TRUE;
   ^
   drivers/media/dvb-frontends/stv0900_sw.c:1978:4: note: Value stored to 
'lock' is never read
   drivers/media/dvb-frontends/stv0900_sw.c:1993:4: warning: Value stored to 
'lock' is never read [clang-analyzer-deadcode.DeadStores]
   lock = FALSE;
   ^
   drivers/media/dvb-frontends/stv0900_sw.c:1993:4: note: Value stored to 
'lock' is never read
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   5 warnings generated.
   Suppressed 5 warnings (5 in non-user code).
  

[kbuild] drivers/net/dsa/sja1105/sja1105_main.c:129 sja1105_commit_pvid() warn: should '((((1))) << port)' be a 64 bit type?

2021-11-15 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Vladimir Oltean 
CC: Florian Fainelli 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   8ab774587903771821b59471cc723bba6d893942
commit: bef0746cf4cce238b1943df5d5b8f3103da92ead net: dsa: sja1105: make sure 
untagged packets are dropped on ingress ports with no pvid
date:   4 months ago
:: branch date: 18 hours ago
:: commit date: 4 months ago
config: i386-randconfig-m021-20211022 (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 
Reported-by: Dan Carpenter 

New smatch warnings:
drivers/net/dsa/sja1105/sja1105_main.c:129 sja1105_commit_pvid() warn: should 
'1))) << port)' be a 64 bit type?

Old smatch warnings:
drivers/net/dsa/sja1105/sja1105_main.c:49 sja1105_port_allow_traffic() warn: 
should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:57 sja1105_can_forward() warn: should 
'1))) << to)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:248 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:260 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:269 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:278 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:284 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:291 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:518 sja1105_init_l2_forwarding() warn: 
should '(((1))) << upstream' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:519 sja1105_init_l2_forwarding() warn: 
should '(((1))) << upstream' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:604 sja1105_init_l2_forwarding_params() 
warn: is 'table->entries' large enough for 'struct 
sja1105_l2_forwarding_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:777 sja1105_init_general_params() warn: 
is 'table->entries' large enough for 'struct sja1105_general_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:805 sja1105_init_avb_params() warn: is 
'table->entries' large enough for 'struct sja1105_avb_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:1272 sja1105_find_static_fdb_entry() 
warn: should '1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1390 sja1105et_fdb_add() warn: should 
'1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1392 sja1105et_fdb_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1400 sja1105et_fdb_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1486 sja1105pqrs_fdb_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1494 sja1105pqrs_fdb_add() warn: should 
'1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1499 sja1105pqrs_fdb_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1549 sja1105pqrs_fdb_del() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1618 sja1105_fdb_dump() warn: should 
'1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1670 sja1105_manage_flood_domains() 
warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1672 sja1105_manage_flood_domains() 
warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2165 sja1105_vlan_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2166 sja1105_vlan_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2170 sja1105_vlan_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2479 sja1105_mgmt_xmit() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2797 sja1105_port_mcast_flood() warn: 
should '(((1))) << to' be a 64 bit type?

vim +129 drivers/net/dsa/sja1105/sja1105_main.c

cde8078e83e320 Vladimir Oltean 2021-07-29  106  
cde8078e83e320 Vladimir Oltean 2021-07-29  107  static int 
sja1105_commit_pvid(struct dsa_switch *ds, int port)
cde8078e83e320 Vladimir Oltean 2021-07-29  108  {
cde8078e83e320 Vladimir Oltean 2021-07-29  109  struct dsa_port *dp = 
dsa_to_port(ds, port);
cde8078e83e320 Vladimir Oltean 

[kbuild] drivers/net/dsa/sja1105/sja1105_main.c:2146 sja1105_vlan_add() warn: should '(((1))) << port' be a 64 bit type?

2021-11-15 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Vladimir Oltean 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   8ab774587903771821b59471cc723bba6d893942
commit: 6dfd23d35e75098ac61a605f6c591ce42e95cdcb net: dsa: sja1105: delete vlan 
delta save/restore logic
date:   4 months ago
:: branch date: 16 hours ago
:: commit date: 4 months ago
config: i386-randconfig-m021-20211022 (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 
Reported-by: Dan Carpenter 

New smatch warnings:
drivers/net/dsa/sja1105/sja1105_main.c:2146 sja1105_vlan_add() warn: should 
'(((1))) << port' be a 64 bit type?

Old smatch warnings:
drivers/net/dsa/sja1105/sja1105_main.c:49 sja1105_port_allow_traffic() warn: 
should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:57 sja1105_can_forward() warn: should 
'1))) << to)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:173 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:185 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:194 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:203 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:209 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:216 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:443 sja1105_init_l2_forwarding() warn: 
should '(((1))) << upstream' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:444 sja1105_init_l2_forwarding() warn: 
should '(((1))) << upstream' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:529 sja1105_init_l2_forwarding_params() 
warn: is 'table->entries' large enough for 'struct 
sja1105_l2_forwarding_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:702 sja1105_init_general_params() warn: 
is 'table->entries' large enough for 'struct sja1105_general_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:730 sja1105_init_avb_params() warn: is 
'table->entries' large enough for 'struct sja1105_avb_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:1197 sja1105_find_static_fdb_entry() 
warn: should '1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1315 sja1105et_fdb_add() warn: should 
'1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1317 sja1105et_fdb_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1325 sja1105et_fdb_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1411 sja1105pqrs_fdb_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1419 sja1105pqrs_fdb_add() warn: should 
'1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1424 sja1105pqrs_fdb_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1474 sja1105pqrs_fdb_del() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1558 sja1105_fdb_dump() warn: should 
'1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1610 sja1105_manage_flood_domains() 
warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1612 sja1105_manage_flood_domains() 
warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2147 sja1105_vlan_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2151 sja1105_vlan_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2417 sja1105_mgmt_xmit() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2735 sja1105_port_mcast_flood() warn: 
should '(((1))) << to' be a 64 bit type?

vim +2146 drivers/net/dsa/sja1105/sja1105_main.c

cebc5e306f Vladimir Oltean 2019-05-02  2123  
6dfd23d35e7509 Vladimir Oltean 2021-07-26  2124  static int 
sja1105_vlan_add(struct sja1105_private *priv, int port, u16 vid,
6dfd23d35e7509 Vladimir Oltean 2021-07-26  2125 u16 
flags)
cebc5e306f Vladimir Oltean 2019-05-02  2126  {
6dfd23d35e7509 Vladimir Oltean 2021-07-26  2127 struct 
sja1105_vlan_lookup_entry *vlan;
6dfd23d35e7509 Vladimir Oltean 2021-07-26  2128 struct sja1105_table 
*table;
6dfd23d35e7509 

[kbuild] mm/memcontrol.c:670 __mem_cgroup_flush_stats() error: uninitialized symbol 'flag'.

2021-11-15 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Shakeel Butt 
CC: Andrew Morton 
CC: Linux Memory Management List 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   8ab774587903771821b59471cc723bba6d893942
commit: fd25a9e0e23b995fd0ba5e2f00a1099452cbc3cf memcg: unify memcg stat 
flushing
date:   9 days ago
:: branch date: 16 hours ago
:: commit date: 9 days ago
config: nios2-randconfig-m031-2025 (attached as .config)
compiler: nios2-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 

New smatch warnings:
mm/memcontrol.c:670 __mem_cgroup_flush_stats() error: uninitialized symbol 
'flag'.

Old smatch warnings:
arch/nios2/include/asm/thread_info.h:71 current_thread_info() error: 
uninitialized symbol 'sp'.

vim +/flag +670 mm/memcontrol.c

11192d9c124d58 Shakeel Butt 2021-11-05  660  
11192d9c124d58 Shakeel Butt 2021-11-05  661  static void 
__mem_cgroup_flush_stats(void)
11192d9c124d58 Shakeel Butt 2021-11-05  662  {
fd25a9e0e23b99 Shakeel Butt 2021-11-05  663 unsigned long flag;
fd25a9e0e23b99 Shakeel Butt 2021-11-05  664  
fd25a9e0e23b99 Shakeel Butt 2021-11-05  665 if 
(!spin_trylock_irqsave(_flush_lock, flag))
11192d9c124d58 Shakeel Butt 2021-11-05  666 return;
11192d9c124d58 Shakeel Butt 2021-11-05  667  
11192d9c124d58 Shakeel Butt 2021-11-05  668 
cgroup_rstat_flush_irqsafe(root_mem_cgroup->css.cgroup);
11192d9c124d58 Shakeel Butt 2021-11-05  669 
atomic_set(_flush_threshold, 0);
fd25a9e0e23b99 Shakeel Butt 2021-11-05 @670 
spin_unlock_irqrestore(_flush_lock, flag);
11192d9c124d58 Shakeel Butt 2021-11-05  671  }
11192d9c124d58 Shakeel Butt 2021-11-05  672  

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


.config.gz
Description: application/gzip
___
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org


[kbuild] drivers/iio/adc/at91-sama5d2_adc.c:530:0: warning: syntax error [syntaxError]

2021-11-15 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Eugen Hristev 
CC: Jonathan Cameron 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   8ab774587903771821b59471cc723bba6d893942
commit: 8940de2e48902e95b588b6244d5a1b61a4d75c4a iio: adc: at91-sama5d2_adc: 
convert to platform specific data structures
date:   9 weeks ago
:: branch date: 16 hours ago
:: commit date: 9 weeks ago
compiler: s390-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> drivers/iio/adc/at91-sama5d2_adc.c:530:0: warning: syntax error [syntaxError]
   
   ^

vim +530 drivers/iio/adc/at91-sama5d2_adc.c

8940de2e48902e Eugen Hristev 2021-09-01  524  
8940de2e48902e Eugen Hristev 2021-09-01  525  static const struct 
at91_adc_platform sama5d2_platform = {
8940de2e48902e Eugen Hristev 2021-09-01  526.layout = _layout,
8940de2e48902e Eugen Hristev 2021-09-01  527.adc_channels = 
_sama5d2_adc_channels,
8940de2e48902e Eugen Hristev 2021-09-01  528  #define 
AT91_SAMA5D2_SINGLE_CHAN_CNT 12
8940de2e48902e Eugen Hristev 2021-09-01  529  #define 
AT91_SAMA5D2_DIFF_CHAN_CNT 6
8940de2e48902e Eugen Hristev 2021-09-01 @530.nr_channels = 
AT91_SAMA5D2_SINGLE_CHAN_CNT +
8940de2e48902e Eugen Hristev 2021-09-01  531   
AT91_SAMA5D2_DIFF_CHAN_CNT,
8940de2e48902e Eugen Hristev 2021-09-01  532  #define 
AT91_SAMA5D2_TOUCH_X_CHAN_IDX (AT91_SAMA5D2_SINGLE_CHAN_CNT + \
8940de2e48902e Eugen Hristev 2021-09-01  533
AT91_SAMA5D2_DIFF_CHAN_CNT * 2)
8940de2e48902e Eugen Hristev 2021-09-01  534.touch_chan_x = 
AT91_SAMA5D2_TOUCH_X_CHAN_IDX,
8940de2e48902e Eugen Hristev 2021-09-01  535  #define 
AT91_SAMA5D2_TOUCH_Y_CHAN_IDX (AT91_SAMA5D2_TOUCH_X_CHAN_IDX + 1)
8940de2e48902e Eugen Hristev 2021-09-01  536.touch_chan_y = 
AT91_SAMA5D2_TOUCH_Y_CHAN_IDX,
8940de2e48902e Eugen Hristev 2021-09-01  537  #define 
AT91_SAMA5D2_TOUCH_P_CHAN_IDX (AT91_SAMA5D2_TOUCH_Y_CHAN_IDX + 1)
8940de2e48902e Eugen Hristev 2021-09-01  538.touch_chan_p = 
AT91_SAMA5D2_TOUCH_P_CHAN_IDX,
8940de2e48902e Eugen Hristev 2021-09-01  539  #define AT91_SAMA5D2_MAX_CHAN_IDX 
AT91_SAMA5D2_TOUCH_P_CHAN_IDX
8940de2e48902e Eugen Hristev 2021-09-01  540.max_channels = 
ARRAY_SIZE(at91_sama5d2_adc_channels),
8940de2e48902e Eugen Hristev 2021-09-01  541.max_index = 
AT91_SAMA5D2_MAX_CHAN_IDX,
8940de2e48902e Eugen Hristev 2021-09-01  542  #define AT91_SAMA5D2_HW_TRIG_CNT  
3
8940de2e48902e Eugen Hristev 2021-09-01  543.hw_trig_cnt = 
AT91_SAMA5D2_HW_TRIG_CNT,
5e1a1da0f8c914 Eugen Hristev 2017-06-15  544  };
5e1a1da0f8c914 Eugen Hristev 2017-06-15  545  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org
___
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org


[kbuild] drivers/net/dsa/qca8k.c:944 qca8k_parse_port_config() error: testing array offset 'cpu_port_index' after use.

2021-11-15 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Ansuel Smith 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   8ab774587903771821b59471cc723bba6d893942
commit: 5654ec78dd7e64b1e04777b24007344329e6a63b net: dsa: qca8k: rework rgmii 
delay logic and scan for cpu port 6
date:   4 weeks ago
:: branch date: 16 hours ago
:: commit date: 4 weeks ago
config: x86_64-randconfig-m001-2023 (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 
Reported-by: Dan Carpenter 

smatch warnings:
drivers/net/dsa/qca8k.c:944 qca8k_parse_port_config() error: testing array 
offset 'cpu_port_index' after use.

vim +/cpu_port_index +944 drivers/net/dsa/qca8k.c

3fcf734aa48248 Ansuel Smith 2021-10-14   933  
6c43809bf1bee7 Ansuel Smith 2021-10-14   934  static int
6c43809bf1bee7 Ansuel Smith 2021-10-14   935  qca8k_parse_port_config(struct 
qca8k_priv *priv)
6c43809bf1bee7 Ansuel Smith 2021-10-14   936  {
5654ec78dd7e64 Ansuel Smith 2021-10-14   937int port, cpu_port_index = 0, 
ret;
6c43809bf1bee7 Ansuel Smith 2021-10-14   938struct device_node *port_dn;
6c43809bf1bee7 Ansuel Smith 2021-10-14   939phy_interface_t mode;
6c43809bf1bee7 Ansuel Smith 2021-10-14   940struct dsa_port *dp;
5654ec78dd7e64 Ansuel Smith 2021-10-14   941u32 delay;
6c43809bf1bee7 Ansuel Smith 2021-10-14   942  
6c43809bf1bee7 Ansuel Smith 2021-10-14   943/* We have 2 CPU port. Check 
them */
5654ec78dd7e64 Ansuel Smith 2021-10-14  @944for (port = 0; port < 
QCA8K_NUM_PORTS && cpu_port_index < QCA8K_NUM_CPU_PORTS; port++) {
6c43809bf1bee7 Ansuel Smith 2021-10-14   945/* Skip every other 
port */
6c43809bf1bee7 Ansuel Smith 2021-10-14   946if (port != 0 && port 
!= 6)
6c43809bf1bee7 Ansuel Smith 2021-10-14   947continue;
6c43809bf1bee7 Ansuel Smith 2021-10-14   948  
6c43809bf1bee7 Ansuel Smith 2021-10-14   949dp = 
dsa_to_port(priv->ds, port);
6c43809bf1bee7 Ansuel Smith 2021-10-14   950port_dn = dp->dn;
5654ec78dd7e64 Ansuel Smith 2021-10-14   951cpu_port_index++;
6c43809bf1bee7 Ansuel Smith 2021-10-14   952  
6c43809bf1bee7 Ansuel Smith 2021-10-14   953if 
(!of_device_is_available(port_dn))
6c43809bf1bee7 Ansuel Smith 2021-10-14   954continue;
6c43809bf1bee7 Ansuel Smith 2021-10-14   955  
6c43809bf1bee7 Ansuel Smith 2021-10-14   956ret = 
of_get_phy_mode(port_dn, );
6c43809bf1bee7 Ansuel Smith 2021-10-14   957if (ret)
6c43809bf1bee7 Ansuel Smith 2021-10-14   958continue;
6c43809bf1bee7 Ansuel Smith 2021-10-14   959  
5654ec78dd7e64 Ansuel Smith 2021-10-14   960switch (mode) {
5654ec78dd7e64 Ansuel Smith 2021-10-14   961case 
PHY_INTERFACE_MODE_RGMII:
5654ec78dd7e64 Ansuel Smith 2021-10-14   962case 
PHY_INTERFACE_MODE_RGMII_ID:
5654ec78dd7e64 Ansuel Smith 2021-10-14   963case 
PHY_INTERFACE_MODE_RGMII_TXID:
5654ec78dd7e64 Ansuel Smith 2021-10-14   964case 
PHY_INTERFACE_MODE_RGMII_RXID:
5654ec78dd7e64 Ansuel Smith 2021-10-14   965delay = 0;
5654ec78dd7e64 Ansuel Smith 2021-10-14   966  
5654ec78dd7e64 Ansuel Smith 2021-10-14   967if 
(!of_property_read_u32(port_dn, "tx-internal-delay-ps", ))
5654ec78dd7e64 Ansuel Smith 2021-10-14   968/* 
Switch regs accept value in ns, convert ps to ns */
5654ec78dd7e64 Ansuel Smith 2021-10-14   969delay = 
delay / 1000;
5654ec78dd7e64 Ansuel Smith 2021-10-14   970else if (mode 
== PHY_INTERFACE_MODE_RGMII_ID ||
5654ec78dd7e64 Ansuel Smith 2021-10-14   971 mode 
== PHY_INTERFACE_MODE_RGMII_TXID)
5654ec78dd7e64 Ansuel Smith 2021-10-14   972delay = 
1;
5654ec78dd7e64 Ansuel Smith 2021-10-14   973  
5654ec78dd7e64 Ansuel Smith 2021-10-14   974if (delay > 
QCA8K_MAX_DELAY) {
5654ec78dd7e64 Ansuel Smith 2021-10-14   975
dev_err(priv->dev, "rgmii tx delay is limited to a max value of 3ns, setting to 
the max value");
5654ec78dd7e64 Ansuel Smith 2021-10-14   976delay = 
3;
5654ec78dd7e64 Ansuel Smith 2021-10-14   977}
5654ec78dd7e64 Ansuel Smith 2021-10-14   978  
5654ec78dd7e64 Ansuel Smith 2021-10-14   979
priv->rgmii_tx_delay[cpu_port_index] = delay;
5654ec78dd7e64 Ansuel Smith 2021-10-14   980  
5654ec78dd7e64 Ansuel Smith 2021-10-14   981delay = 0;
5654ec78dd7e64 Ansuel Smith 2021-10-14   982  
5654ec78dd7e64 Ansuel Smith 2021-10-14   983if 
(!of_property_read_u32(port_dn, "rx-internal-delay-ps", ))
5654ec78dd7e64 Ansuel Smith 2021-10-14   984/* 
Switch regs accept 

[kbuild] drivers/net/dsa/sja1105/sja1105_main.c:493 sja1105_init_l2_forwarding_params() warn: is 'table->entries' large enough for 'struct sja1105_l2_forwarding_params_entry'? 0

2021-11-15 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Vladimir Oltean 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   8ab774587903771821b59471cc723bba6d893942
commit: 1bf658eefe38cc26801b5861bbb6dbf3259ba8c1 net: dsa: sja1105: allow the 
frame buffer size to be customized
date:   6 months ago
:: branch date: 15 hours ago
:: commit date: 6 months ago
config: i386-randconfig-m021-20211022 (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 
Reported-by: Dan Carpenter 

New smatch warnings:
drivers/net/dsa/sja1105/sja1105_main.c:493 sja1105_init_l2_forwarding_params() 
warn: is 'table->entries' large enough for 'struct 
sja1105_l2_forwarding_params_entry'? 0

Old smatch warnings:
drivers/net/dsa/sja1105/sja1105_main.c:48 sja1105_port_allow_traffic() warn: 
should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:56 sja1105_can_forward() warn: should 
'1))) << to)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:193 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:196 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:202 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:207 sja1105_init_mii_settings() warn: is 
'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:448 sja1105_init_l2_forwarding() warn: 
should '(((1))) << upstream' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:449 sja1105_init_l2_forwarding() warn: 
should '(((1))) << upstream' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:634 sja1105_init_avb_params() warn: is 
'table->entries' large enough for 'struct sja1105_avb_params_entry'? 0
drivers/net/dsa/sja1105/sja1105_main.c:1232 sja1105_find_static_fdb_entry() 
warn: should '1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1350 sja1105et_fdb_add() warn: should 
'1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1352 sja1105et_fdb_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1360 sja1105et_fdb_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1446 sja1105pqrs_fdb_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1454 sja1105pqrs_fdb_add() warn: should 
'1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1459 sja1105pqrs_fdb_add() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1509 sja1105pqrs_fdb_del() warn: should 
'(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1593 sja1105_fdb_dump() warn: should 
'1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1645 sja1105_manage_flood_domains() 
warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1647 sja1105_manage_flood_domains() 
warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2309 sja1105_build_bridge_vlans() warn: 
should '(((1))) << (v->port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2310 sja1105_build_bridge_vlans() warn: 
should '(((1))) << (v->port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2312 sja1105_build_bridge_vlans() warn: 
should '(((1))) << (v->port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2331 sja1105_build_dsa_8021q_vlans() 
warn: should '(((1))) << (v->port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2332 sja1105_build_dsa_8021q_vlans() 
warn: should '(((1))) << (v->port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2334 sja1105_build_dsa_8021q_vlans() 
warn: should '(((1))) << (v->port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2384 sja1105_build_subvlans() warn: 
should '(((1))) << (v->port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2385 sja1105_build_subvlans() warn: 
should '(((1))) << upstream' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2386 sja1105_build_subvlans() warn: 
should '(((1))) << (v->port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2387 sja1105_build_subvlans() warn: 
should '(((1))) << upstream' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2392 sja1105_build_subvlans() warn: 
should '(((1))) << (v->port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2394 sja1105_build_subvlans() warn: 
should '(((1))) << upstream' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2410 sja1105_build_subvlans() warn: 

[kbuild] fs/cifs/dfs_cache.c:1382 __refresh_tcon() warn: passing a valid pointer to 'PTR_ERR'

2021-11-15 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Paulo Alcantara 
CC: Steve French 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   8ab774587903771821b59471cc723bba6d893942
commit: c88f7dcd6d6429197fc2fd87b54a894ffcd48e8e cifs: support nested dfs links 
over reconnect
date:   5 days ago
:: branch date: 14 hours ago
:: commit date: 5 days ago
config: xtensa-randconfig-m031-2025 (attached as .config)
compiler: xtensa-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 

New smatch warnings:
fs/cifs/dfs_cache.c:1382 __refresh_tcon() warn: passing a valid pointer to 
'PTR_ERR'

Old smatch warnings:
arch/xtensa/include/asm/thread_info.h:91 current_thread_info() warn: 
inconsistent indenting
fs/cifs/dfs_cache.c:509 copy_ref_data() warn: passing a valid pointer to 
'PTR_ERR'

vim +/PTR_ERR +1382 fs/cifs/dfs_cache.c

5072010ccf0592 Paulo Alcantara (SUSE  2019-03-19  1365) 
b62366181a5e94 Paulo Alcantara2021-07-16  1366  /* Refresh dfs referral 
of tcon and mark it for reconnect if needed */
c88f7dcd6d6429 Paulo Alcantara2021-11-03  1367  static int 
__refresh_tcon(const char *path, struct cifs_ses **sessions, struct cifs_tcon 
*tcon,
c88f7dcd6d6429 Paulo Alcantara2021-11-03  1368  
  bool force_refresh)
b62366181a5e94 Paulo Alcantara2021-07-16  1369  {
b62366181a5e94 Paulo Alcantara2021-07-16  1370  struct cifs_ses 
*ses;
1023e90b733acd Paulo Alcantara2021-06-08  1371  struct 
cache_entry *ce;
1023e90b733acd Paulo Alcantara2021-06-08  1372  struct 
dfs_info3_param *refs = NULL;
1023e90b733acd Paulo Alcantara2021-06-08  1373  int numrefs = 0;
1023e90b733acd Paulo Alcantara2021-06-08  1374  bool 
needs_refresh = false;
b62366181a5e94 Paulo Alcantara2021-07-16  1375  struct 
dfs_cache_tgt_list tl = DFS_CACHE_TGT_LIST_INIT(tl);
c9f71103990591 Paulo Alcantara2021-06-04  1376  int rc = 0;
b62366181a5e94 Paulo Alcantara2021-07-16  1377  unsigned int 
xid;
1023e90b733acd Paulo Alcantara2021-06-08  1378  
c9f71103990591 Paulo Alcantara2021-06-04  1379  ses = 
find_ipc_from_server_path(sessions, path);
b62366181a5e94 Paulo Alcantara2021-07-16  1380  if 
(IS_ERR(ses)) {
b62366181a5e94 Paulo Alcantara2021-07-16  1381  
cifs_dbg(FYI, "%s: could not find ipc session\n", __func__);
b62366181a5e94 Paulo Alcantara2021-07-16 @1382  return 
PTR_ERR(ses);
b62366181a5e94 Paulo Alcantara2021-07-16  1383  }
1023e90b733acd Paulo Alcantara2021-06-08  1384  
1023e90b733acd Paulo Alcantara2021-06-08  1385  
down_read(_rw_lock);
1023e90b733acd Paulo Alcantara2021-06-08  1386  ce = 
lookup_cache_entry(path);
b62366181a5e94 Paulo Alcantara2021-07-16  1387  needs_refresh = 
force_refresh || IS_ERR(ce) || cache_entry_expired(ce);
b62366181a5e94 Paulo Alcantara2021-07-16  1388  if 
(!IS_ERR(ce)) {
b62366181a5e94 Paulo Alcantara2021-07-16  1389  rc = 
get_targets(ce, );
b62366181a5e94 Paulo Alcantara2021-07-16  1390  if (rc)
b62366181a5e94 Paulo Alcantara2021-07-16  1391  
cifs_dbg(FYI, "%s: could not get dfs targets: %d\n", __func__, rc);
b62366181a5e94 Paulo Alcantara2021-07-16  1392  }
1023e90b733acd Paulo Alcantara2021-06-08  1393  
up_read(_rw_lock);
1023e90b733acd Paulo Alcantara2021-06-08  1394  
b62366181a5e94 Paulo Alcantara2021-07-16  1395  if 
(!needs_refresh) {
b62366181a5e94 Paulo Alcantara2021-07-16  1396  rc = 0;
b62366181a5e94 Paulo Alcantara2021-07-16  1397  goto 
out;
b62366181a5e94 Paulo Alcantara2021-07-16  1398  }
1023e90b733acd Paulo Alcantara2021-06-08  1399  
c9f71103990591 Paulo Alcantara2021-06-04  1400  xid = get_xid();
1023e90b733acd Paulo Alcantara2021-06-08  1401  rc = 
get_dfs_referral(xid, ses, path, , );
c9f71103990591 Paulo Alcantara2021-06-04  1402  free_xid(xid);
1023e90b733acd Paulo Alcantara2021-06-08  1403  
1023e90b733acd Paulo Alcantara2021-06-08  1404  /* Create or 
update a cache entry with the new referral */
1023e90b733acd Paulo Alcantara2021-06-08  1405  if (!rc) {
b62366181a5e94 Paulo Alcantara2021-07-16  1406  
dump_refs(refs, numrefs);
b62366181a5e94 Paulo Alcantara2021-07-16  1407  
1023e90b733acd Paulo Alcantara2021-06-08  1408  
down_write(_rw_lock);
1023e90b733acd Paulo Alcantara2021-06-08  1409

[kbuild] [ast-bpf:relo_core 9/19] tools/lib/bpf/relo_core.c:1025:7: warning: Branch condition evaluates to a garbage value [clang-analyzer-core.uninitialized.Branch]

2021-11-15 Thread kernel test robot
CC: l...@lists.linux.dev
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Alexei Starovoitov 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git relo_core
head:   f17ef55e5e0bac0d11d3186cd1c468b5a1e047d7
commit: 03c354f8c71c2478c421d5552d284e0befb03861 [9/19] bpf: Prepare 
relo_core.c for kernel duty.
:: branch date: 20 hours ago
:: commit date: 3 days ago
config: arm-randconfig-c002-2024 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 
c3dddeeafb529e769cde87bd29ef6271ac6bfa5c)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# 
https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git/commit/?id=03c354f8c71c2478c421d5552d284e0befb03861
git remote add ast-bpf 
https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git
git fetch --no-tags ast-bpf relo_core
git checkout 03c354f8c71c2478c421d5552d284e0befb03861
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 
clang-analyzer 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 


clang-analyzer warnings: (new ones prefixed by >>)
   ^
   include/linux/compiler_types.h:305:2: note: expanded from macro 
'_compiletime_assert'
   __compiletime_assert(condition, msg, prefix, suffix)
   ^
   include/linux/compiler_types.h:297:3: note: expanded from macro 
'__compiletime_assert'
   if (!(condition))   \
   ^
   drivers/media/cec/core/cec-api.c:677:4: note: Loop condition is false.  
Exiting loop
   list_first_entry(>msgs, struct cec_msg_entry, 
list);
   ^
   include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
   list_entry((ptr)->next, type, member)
   ^
   include/linux/list.h:511:2: note: expanded from macro 'list_entry'
   container_of(ptr, type, member)
   ^
   include/linux/kernel.h:494:2: note: expanded from macro 'container_of'
   BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&   \
   ^
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to 
see all)
   include/linux/compiler_types.h:317:2: note: expanded from macro 
'compiletime_assert'
   _compiletime_assert(condition, msg, __compiletime_assert_, 
__COUNTER__)
   ^
   include/linux/compiler_types.h:305:2: note: expanded from macro 
'_compiletime_assert'
   __compiletime_assert(condition, msg, prefix, suffix)
   ^
   include/linux/compiler_types.h:295:2: note: expanded from macro 
'__compiletime_assert'
   do {\
   ^
   drivers/media/cec/core/cec-api.c:680:3: note: Memory is released
   kfree(entry);
   ^~~~
   drivers/media/cec/core/cec-api.c:675:2: note: Loop condition is true.  
Entering loop body
   while (!list_empty(>msgs)) {
   ^
   drivers/media/cec/core/cec-api.c:677:4: note: Left side of '&&' is false
   list_first_entry(>msgs, struct cec_msg_entry, 
list);
   ^
   include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
   list_entry((ptr)->next, type, member)
   ^
   include/linux/list.h:511:2: note: expanded from macro 'list_entry'
   container_of(ptr, type, member)
   ^
   include/linux/kernel.h:494:61: note: expanded from macro 'container_of'
   BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&   \
  ^
   drivers/media/cec/core/cec-api.c:677:4: note: Taking false branch
   list_first_entry(>msgs, struct cec_msg_entry, 
list);
   ^
   include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
   list_entry((ptr)->next, type, member)
   ^
   include/linux/list.h:511:2: note: expanded from macro 'list_entry'
   container_of(ptr, type, member)
   ^
   include/linux/kernel.h:494:2: note: expanded from macro 'container_of'
   BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&   \
   ^
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to 
see all)
   include/linux/compiler_types.h:317:2: note: expanded from macro 
'compiletime_assert'
   _compiletime_assert(condition, msg, __compiletime_assert_, 
__COUNTER__)
   ^
   include/linux/compiler_types.h:305:2: note: expanded from