Re: [PATCH v3] usb: cdnsp: Add support for device-only configuration
From: kernel test robot
Date: Wed May 13 2026 - 22:50:04 EST
Hi Pawel,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 17c7841d09ee7d33557fd075562d9289b6018c90]
url: https://github.com/intel-lab-lkp/linux/commits/Pawel-Laszczak-via-B4-Relay/usb-cdnsp-Add-support-for-device-only-configuration/20260513-191545
base: 17c7841d09ee7d33557fd075562d9289b6018c90
patch link: https://lore.kernel.org/r/20260508-no_drd_config-v3-1-0614f5044721%40cadence.com
patch subject: [PATCH v3] usb: cdnsp: Add support for device-only configuration
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20260514/202605141023.18vWXyw3-lkp@xxxxxxxxx/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260514/202605141023.18vWXyw3-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605141023.18vWXyw3-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
>> drivers/usb/cdns3/drd.c:187:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
187 | if (cdns->no_drd)
| ^~~~~~~~~~~~
drivers/usb/cdns3/drd.c:209:9: note: uninitialized use occurs here
209 | return ret;
| ^~~
drivers/usb/cdns3/drd.c:187:2: note: remove the 'if' if its condition is always false
187 | if (cdns->no_drd)
| ^~~~~~~~~~~~~~~~~
188 | goto phy_set;
| ~~~~~~~~~~~~
drivers/usb/cdns3/drd.c:185:9: note: initialize the variable 'ret' to silence this warning
185 | int ret;
| ^
| = 0
1 warning generated.
vim +187 drivers/usb/cdns3/drd.c
175
176 /**
177 * cdns_drd_host_on - start host.
178 * @cdns: Pointer to controller context structure.
179 *
180 * Returns 0 on success otherwise negative errno.
181 */
182 int cdns_drd_host_on(struct cdns *cdns)
183 {
184 u32 val, ready_bit;
185 int ret;
186
> 187 if (cdns->no_drd)
188 goto phy_set;
189
190 /* Enable host mode. */
191 writel(OTGCMD_HOST_BUS_REQ | OTGCMD_OTG_DIS,
192 &cdns->otg_regs->cmd);
193
194 if (cdns->version == CDNSP_CONTROLLER_V2)
195 ready_bit = OTGSTS_CDNSP_XHCI_READY;
196 else
197 ready_bit = OTGSTS_CDNS3_XHCI_READY;
198
199 dev_dbg(cdns->dev, "Waiting till Host mode is turned on\n");
200 ret = readl_poll_timeout_atomic(&cdns->otg_regs->sts, val,
201 val & ready_bit, 1, 100000);
202
203 if (ret)
204 dev_err(cdns->dev, "timeout waiting for xhci_ready\n");
205
206 phy_set:
207 phy_set_mode(cdns->usb2_phy, PHY_MODE_USB_HOST);
208 phy_set_mode(cdns->usb3_phy, PHY_MODE_USB_HOST);
209 return ret;
210 }
211
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki