All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Manish Narani <manish.narani@xilinx.com>
Cc: oe-kbuild-all@lists.linux.dev, git@amd.com,
	Michal Simek <monstr@monstr.eu>,
	Piyush Mehta <piyush.mehta@amd.com>,
	Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Subject: [xilinx-xlnx:lkp_test 333/504] drivers/usb/dwc3/gadget_hibernation.c:16: warning: cannot understand function prototype: 'u32 save_reg_addr[] = '
Date: Fri, 10 Jan 2025 19:33:57 +0800	[thread overview]
Message-ID: <202501101920.3garS2Fm-lkp@intel.com> (raw)

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(&params, 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, &params);
    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

                 reply	other threads:[~2025-01-10 11:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202501101920.3garS2Fm-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=git@amd.com \
    --cc=manish.narani@xilinx.com \
    --cc=monstr@monstr.eu \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=piyush.mehta@amd.com \
    --cc=radhey.shyam.pandey@amd.com \
    /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.