lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 22 Nov 2023 09:24:43 +0800
From:   kernel test robot <>
To:     Sanath S <>,,,,,,
        Sanath S <>,
        Mario Limonciello <>,
Subject: Re: [Patch] thunderbolt: Add quirk to reset downstream port

Hi Sanath,

kernel test robot noticed the following build warnings:

[auto build test WARNING on westeri-thunderbolt/next]
[also build test WARNING on linus/master v6.7-rc2 next-20231121]
[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]

base: next
patch link:
patch subject: [Patch] thunderbolt: Add quirk to reset downstream port
config: x86_64-buildonly-randconfig-003-20231122 (
compiler: clang version 16.0.4 ( ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <>
| Closes:

All warnings (new ones prefixed by >>):

>> drivers/thunderbolt/switch.c:1556:2: warning: variable 'ret' is used uninitialized whenever 'for' loop exits because its condition is false [-Wsometimes-uninitialized]
           tb_switch_for_each_port(sw, port) {
   drivers/thunderbolt/tb.h:821:7: note: expanded from macro 'tb_switch_for_each_port'
                (p) <= &(sw)->ports[(sw)->config.max_port_number]; (p)++)
   drivers/thunderbolt/switch.c:1564:9: note: uninitialized use occurs here
           return ret;
   drivers/thunderbolt/switch.c:1556:2: note: remove the condition if it is always true
           tb_switch_for_each_port(sw, port) {
   drivers/thunderbolt/tb.h:821:7: note: expanded from macro 'tb_switch_for_each_port'
                (p) <= &(sw)->ports[(sw)->config.max_port_number]; (p)++)
   drivers/thunderbolt/switch.c:1554:9: note: initialize the variable 'ret' to silence this warning
           int ret;
                   = 0
   1 warning generated.

vim +1556 drivers/thunderbolt/switch.c

  1550	static int tb_switch_reset_downstream_port(struct tb_switch *sw)
  1551	{
  1552		struct tb_port *port;
  1553		uint32_t val = 0;
  1554		int ret;
> 1556		tb_switch_for_each_port(sw, port) {
  1557			if (port->config.type == TB_TYPE_PORT) {
  1558				val = val | PORT_CS_19_DPR;
  1559				ret = tb_port_write(port, &val, TB_CFG_PORT,
  1560						port->cap_usb4 + PORT_CS_19, 1);
  1561				break;
  1562			}
  1563		}
  1564		return ret;
  1565	}

0-DAY CI Kernel Test Service

Powered by blists - more mailing lists