* [xilinx-xlnx:lkp_test 333/504] drivers/usb/dwc3/gadget_hibernation.c:16: warning: cannot understand function prototype: 'u32 save_reg_addr[] = '
@ 2025-01-10 11:33 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-01-10 11:33 UTC (permalink / raw)
To: Manish Narani
Cc: oe-kbuild-all, git, Michal Simek, Piyush Mehta,
Radhey Shyam Pandey
tree: https://github.com/Xilinx/linux-xlnx lkp_test
head: 9ac6b4acf9144465ac1408d4d799635dec0223a0
commit: 852fef317cff07d1feee37e7d6ae013b9da7394e [333/504] usb: dwc3: Add power management support in DWC3 Xilinx driver
config: loongarch-randconfig-002-20250110 (https://download.01.org/0day-ci/archive/20250110/202501101920.3garS2Fm-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250110/202501101920.3garS2Fm-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/202501101920.3garS2Fm-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/usb/dwc3/gadget_hibernation.c:16: warning: cannot understand function prototype: 'u32 save_reg_addr[] = '
>> drivers/usb/dwc3/gadget_hibernation.c:74: warning: Function parameter or struct member 'epnum' not described in 'restart_ep0_trans'
>> drivers/usb/dwc3/gadget_hibernation.c:400: warning: Function parameter or struct member '_dwc' not described in 'dwc3_gadget_exit_hibernation'
>> drivers/usb/dwc3/gadget_hibernation.c:400: warning: Excess function parameter 'dwc' description in 'dwc3_gadget_exit_hibernation'
vim +16 drivers/usb/dwc3/gadget_hibernation.c
14
15 /* array of registers to save on hibernation and restore them on wakeup */
> 16 static u32 save_reg_addr[] = {
17 DWC3_DCTL,
18 DWC3_DCFG,
19 DWC3_DEVTEN
20 };
21
22 /**
23 * save_regs - Saves registers on hibernation
24 * @dwc: pointer to our controller context structure
25 *
26 * Returns 0 on success otherwise negative errno.
27 */
28 static int save_regs(struct dwc3 *dwc)
29 {
30 int i;
31
32 if (!dwc->saved_regs) {
33 dwc->saved_regs = devm_kmalloc(dwc->dev,
34 sizeof(save_reg_addr),
35 GFP_KERNEL);
36 if (!dwc->saved_regs) {
37 dev_err(dwc->dev, "Not enough memory to save regs\n");
38 return -ENOMEM;
39 }
40 }
41
42 for (i = 0; i < ARRAY_SIZE(save_reg_addr); i++)
43 dwc->saved_regs[i] = dwc3_readl(dwc->regs,
44 save_reg_addr[i]);
45 return 0;
46 }
47
48 /**
49 * restore_regs - Restores registers on wakeup
50 * @dwc: pointer to our controller context structure
51 */
52 static void restore_regs(struct dwc3 *dwc)
53 {
54 int i;
55
56 if (!dwc->saved_regs) {
57 dev_warn(dwc->dev, "Regs not saved\n");
58 return;
59 }
60
61 for (i = 0; i < ARRAY_SIZE(save_reg_addr); i++)
62 dwc3_writel(dwc->regs, save_reg_addr[i],
63 dwc->saved_regs[i]);
64 }
65
66 /**
67 * restart_ep0_trans - Restarts EP0 transfer on wakeup
68 * @dwc: pointer to our controller context structure
69 * epnum: endpoint number
70 *
71 * Returns 0 on success otherwise negative errno.
72 */
73 static int restart_ep0_trans(struct dwc3 *dwc, int epnum)
> 74 {
75 struct dwc3_ep *dep = dwc->eps[epnum];
76 struct dwc3_trb *trb = dwc->ep0_trb;
77 struct dwc3_gadget_ep_cmd_params params;
78 int ret;
79 u32 cmd;
80
81 memset(¶ms, 0, sizeof(params));
82 params.param0 = upper_32_bits(dwc->ep0_trb_addr);
83 params.param1 = lower_32_bits(dwc->ep0_trb_addr);
84
85 /* set HWO bit back to 1 and restart transfer */
86 trb->ctrl |= DWC3_TRB_CTRL_HWO;
87
88 /* Clear the TRBSTS feild */
89 trb->size &= ~(0x0F << 28);
90
91 cmd = DWC3_DEPCMD_STARTTRANSFER | DWC3_DEPCMD_PARAM(0);
92 ret = dwc3_send_gadget_ep_cmd(dep, cmd, ¶ms);
93 if (ret < 0) {
94 dev_err(dwc->dev, "failed to restart transfer on %s\n",
95 dep->name);
96 return ret;
97 }
98
99 dwc3_gadget_ep_get_transfer_index(dep);
100
101 return 0;
102 }
103
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-01-10 11:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-10 11:33 [xilinx-xlnx:lkp_test 333/504] drivers/usb/dwc3/gadget_hibernation.c:16: warning: cannot understand function prototype: 'u32 save_reg_addr[] = ' kernel test robot
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.