drivers/usb/dwc2/core_intr.c:327: warning: Function parameter or struct member 'remotewakeup' not described in 'dwc2_wakeup_from_lpm_l1'

From: kernel test robot
Date: Sun Dec 22 2024 - 13:45:21 EST


Hi Minas,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 48f506ad0b683d3e7e794efa60c5785c4fdc86fa
commit: 5d69a3b54e5a630c90d82a4c2bdce3d53dc78710 usb: dwc2: gadget: LPM flow fix
date: 9 months ago
config: nios2-randconfig-001-20241220 (https://download.01.org/0day-ci/archive/20241223/202412230222.HhQkzBih-lkp@xxxxxxxxx/config)
compiler: nios2-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241223/202412230222.HhQkzBih-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/202412230222.HhQkzBih-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/usb/dwc2/core_intr.c:327: warning: Function parameter or struct member 'remotewakeup' not described in 'dwc2_wakeup_from_lpm_l1'


vim +327 drivers/usb/dwc2/core_intr.c

56f5b1cff22a1d drivers/staging/dwc2/core_intr.c Paul Zimmerman 2013-03-11 319
273d576c4d41d0 drivers/usb/dwc2/core_intr.c Sevak Arakelyan 2018-01-24 320 /**
273d576c4d41d0 drivers/usb/dwc2/core_intr.c Sevak Arakelyan 2018-01-24 321 * dwc2_wakeup_from_lpm_l1 - Exit the device from LPM L1 state
273d576c4d41d0 drivers/usb/dwc2/core_intr.c Sevak Arakelyan 2018-01-24 322 *
273d576c4d41d0 drivers/usb/dwc2/core_intr.c Sevak Arakelyan 2018-01-24 323 * @hsotg: Programming view of DWC_otg controller
273d576c4d41d0 drivers/usb/dwc2/core_intr.c Sevak Arakelyan 2018-01-24 324 *
273d576c4d41d0 drivers/usb/dwc2/core_intr.c Sevak Arakelyan 2018-01-24 325 */
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 326 void dwc2_wakeup_from_lpm_l1(struct dwc2_hsotg *hsotg, bool remotewakeup)
273d576c4d41d0 drivers/usb/dwc2/core_intr.c Sevak Arakelyan 2018-01-24 @327 {
273d576c4d41d0 drivers/usb/dwc2/core_intr.c Sevak Arakelyan 2018-01-24 328 u32 glpmcfg;
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 329 u32 pcgctl;
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 330 u32 dctl;
273d576c4d41d0 drivers/usb/dwc2/core_intr.c Sevak Arakelyan 2018-01-24 331
273d576c4d41d0 drivers/usb/dwc2/core_intr.c Sevak Arakelyan 2018-01-24 332 if (hsotg->lx_state != DWC2_L1) {
273d576c4d41d0 drivers/usb/dwc2/core_intr.c Sevak Arakelyan 2018-01-24 333 dev_err(hsotg->dev, "Core isn't in DWC2_L1 state\n");
273d576c4d41d0 drivers/usb/dwc2/core_intr.c Sevak Arakelyan 2018-01-24 334 return;
273d576c4d41d0 drivers/usb/dwc2/core_intr.c Sevak Arakelyan 2018-01-24 335 }
273d576c4d41d0 drivers/usb/dwc2/core_intr.c Sevak Arakelyan 2018-01-24 336
f25c42b8d604fb drivers/usb/dwc2/core_intr.c Gevorg Sahakyan 2018-07-26 337 glpmcfg = dwc2_readl(hsotg, GLPMCFG);
273d576c4d41d0 drivers/usb/dwc2/core_intr.c Sevak Arakelyan 2018-01-24 338 if (dwc2_is_device_mode(hsotg)) {
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 339 dev_dbg(hsotg->dev, "Exit from L1 state, remotewakeup=%d\n", remotewakeup);
273d576c4d41d0 drivers/usb/dwc2/core_intr.c Sevak Arakelyan 2018-01-24 340 glpmcfg &= ~GLPMCFG_ENBLSLPM;
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 341 glpmcfg &= ~GLPMCFG_HIRD_THRES_MASK;
f25c42b8d604fb drivers/usb/dwc2/core_intr.c Gevorg Sahakyan 2018-07-26 342 dwc2_writel(hsotg, glpmcfg, GLPMCFG);
273d576c4d41d0 drivers/usb/dwc2/core_intr.c Sevak Arakelyan 2018-01-24 343
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 344 pcgctl = dwc2_readl(hsotg, PCGCTL);
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 345 pcgctl &= ~PCGCTL_ENBL_SLEEP_GATING;
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 346 dwc2_writel(hsotg, pcgctl, PCGCTL);
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 347
f25c42b8d604fb drivers/usb/dwc2/core_intr.c Gevorg Sahakyan 2018-07-26 348 glpmcfg = dwc2_readl(hsotg, GLPMCFG);
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 349 if (glpmcfg & GLPMCFG_ENBESL) {
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 350 glpmcfg |= GLPMCFG_RSTRSLPSTS;
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 351 dwc2_writel(hsotg, glpmcfg, GLPMCFG);
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 352 }
273d576c4d41d0 drivers/usb/dwc2/core_intr.c Sevak Arakelyan 2018-01-24 353
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 354 if (remotewakeup) {
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 355 if (dwc2_hsotg_wait_bit_set(hsotg, GLPMCFG, GLPMCFG_L1RESUMEOK, 1000)) {
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 356 dev_warn(hsotg->dev, "%s: timeout GLPMCFG_L1RESUMEOK\n", __func__);
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 357 goto fail;
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 358 return;
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 359 }
273d576c4d41d0 drivers/usb/dwc2/core_intr.c Sevak Arakelyan 2018-01-24 360
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 361 dctl = dwc2_readl(hsotg, DCTL);
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 362 dctl |= DCTL_RMTWKUPSIG;
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 363 dwc2_writel(hsotg, dctl, DCTL);
273d576c4d41d0 drivers/usb/dwc2/core_intr.c Sevak Arakelyan 2018-01-24 364
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 365 if (dwc2_hsotg_wait_bit_set(hsotg, GINTSTS, GINTSTS_WKUPINT, 1000)) {
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 366 dev_warn(hsotg->dev, "%s: timeout GINTSTS_WKUPINT\n", __func__);
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 367 goto fail;
273d576c4d41d0 drivers/usb/dwc2/core_intr.c Sevak Arakelyan 2018-01-24 368 return;
273d576c4d41d0 drivers/usb/dwc2/core_intr.c Sevak Arakelyan 2018-01-24 369 }
273d576c4d41d0 drivers/usb/dwc2/core_intr.c Sevak Arakelyan 2018-01-24 370 }
273d576c4d41d0 drivers/usb/dwc2/core_intr.c Sevak Arakelyan 2018-01-24 371
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 372 glpmcfg = dwc2_readl(hsotg, GLPMCFG);
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 373 if (glpmcfg & GLPMCFG_COREL1RES_MASK || glpmcfg & GLPMCFG_SLPSTS ||
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 374 glpmcfg & GLPMCFG_L1RESUMEOK) {
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 375 goto fail;
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 376 return;
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 377 }
c655557c12ded7 drivers/usb/dwc2/core_intr.c Grigor Tovmasyan 2018-01-24 378
c655557c12ded7 drivers/usb/dwc2/core_intr.c Grigor Tovmasyan 2018-01-24 379 /* Inform gadget to exit from L1 */
c655557c12ded7 drivers/usb/dwc2/core_intr.c Grigor Tovmasyan 2018-01-24 380 call_gadget(hsotg, resume);
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 381 /* Change to L0 state */
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 382 hsotg->lx_state = DWC2_L0;
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 383 hsotg->bus_suspended = false;
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 384 fail: dwc2_gadget_init_lpm(hsotg);
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 385 } else {
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 386 /* TODO */
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 387 dev_err(hsotg->dev, "Host side LPM is not supported.\n");
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 388 return;
5d69a3b54e5a63 drivers/usb/dwc2/core_intr.c Minas Harutyunyan 2024-03-13 389 }
273d576c4d41d0 drivers/usb/dwc2/core_intr.c Sevak Arakelyan 2018-01-24 390 }
273d576c4d41d0 drivers/usb/dwc2/core_intr.c Sevak Arakelyan 2018-01-24 391

:::::: The code at line 327 was first introduced by commit
:::::: 273d576c4d41d0577551176040c9c78d30c0cf16 usb: dwc2: gadget: Add functionality to exit from LPM L1 state

:::::: TO: Sevak Arakelyan <sevaka@xxxxxxxxxxxx>
:::::: CC: Felipe Balbi <felipe.balbi@xxxxxxxxxxxxxxx>

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