All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sanath S <Sanath.S@amd.com>,
	andreas.noever@gmail.com, michael.jamet@intel.com,
	mika.westerberg@linux.intel.com, YehezkelShB@gmail.com,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Sanath S <Sanath.S@amd.com>,
	Mario Limonciello <mario.limonciello@amd.com>,
	stable@vger.kernel.org
Subject: Re: [Patch] thunderbolt: Add quirk to reset downstream port
Date: Wed, 22 Nov 2023 09:24:43 +0800	[thread overview]
Message-ID: <202311220931.2IqiKNXr-lkp@intel.com> (raw)
In-Reply-To: <20231121174701.3922587-1-Sanath.S@amd.com>

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
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Sanath-S/thunderbolt-Add-quirk-to-reset-downstream-port/20231122-014913
base:   https://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt.git next
patch link:    https://lore.kernel.org/r/20231121174701.3922587-1-Sanath.S%40amd.com
patch subject: [Patch] thunderbolt: Add quirk to reset downstream port
config: x86_64-buildonly-randconfig-003-20231122 (https://download.01.org/0day-ci/archive/20231122/202311220931.2IqiKNXr-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231122/202311220931.2IqiKNXr-lkp@intel.com/reproduce)

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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311220931.2IqiKNXr-lkp@intel.com/

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

  1549	
  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;
  1555	
> 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	}
  1566	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

      parent reply	other threads:[~2023-11-22  1:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-21 17:47 [Patch] thunderbolt: Add quirk to reset downstream port Sanath S
2023-11-21 18:04 ` Greg KH
2023-11-21 18:33   ` Sanath S
2023-11-22  1:24 ` kernel test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202311220931.2IqiKNXr-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Sanath.S@amd.com \
    --cc=YehezkelShB@gmail.com \
    --cc=andreas.noever@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mario.limonciello@amd.com \
    --cc=michael.jamet@intel.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.