[xilinx-xlnx:master 156/556] drivers/usb/dwc3/dwc3-xilinx.c:509:6: warning: no previous prototype for function 'dwc3_xilinx_wakeup_capable'

kernel test robot
2022-02-20T22:55:59Z

tree: https://github.com/Xilinx/linux-xlnx master
head: 0293811d1fb48202f60d63799ec58c3e44f83a55
commit: 6e383f53627b34b9aa1f149720de25f55b199d37 [156/556] usb: dwc3: Added remote wake-up in xilinx glue driver
config: arm64-randconfig-r031-20220220 (https://download.01.org/0day-ci/archive/20220221/202202210653.27JMaMlu-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/Xilinx/linux-xlnx/commit/6e383f53627b34b9aa1f149720de25f55b199d37
git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xilinx-xlnx master
git checkout 6e383f53627b34b9aa1f149720de25f55b199d37
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/usb/dwc3/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/usb/dwc3/dwc3-xilinx.c:509:6: warning: no previous prototype for function 'dwc3_xilinx_wakeup_capable' [-Wmissing-prototypes]
void dwc3_xilinx_wakeup_capable(struct device *dev, bool wakeup)
^
drivers/usb/dwc3/dwc3-xilinx.c:509:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void dwc3_xilinx_wakeup_capable(struct device *dev, bool wakeup)
^
static
1 warning generated.

vim +/dwc3_xilinx_wakeup_capable +509 drivers/usb/dwc3/dwc3-xilinx.c

507
508 /* xilinx feature support functions */
> 509 void dwc3_xilinx_wakeup_capable(struct device *dev, bool wakeup)
510 {
511 struct device_node *node = of_node_get(dev->parent->of_node);
512
513 /* check for valid parent node */
514 while (node) {
515 if (of_device_is_compatible(node, "xlnx,zynqmp-dwc3") ||
516 of_device_is_compatible(node, "xlnx,versal-dwc3"))
517 break;
518
519 /* get the next parent node */
520 node = of_get_next_parent(node);
521 }
522
523 if (node) {
524 struct platform_device *pdev_parent;
525 struct dwc3_xlnx *priv_data;
526
527 pdev_parent = of_find_device_by_node(node);
528 priv_data = platform_get_drvdata(pdev_parent);
529
530 /* Set wakeup capable as true or false */
531 priv_data->wakeup_capable = wakeup;
532
533 /* Allow D3 state if wakeup capable only */
534 priv_data->enable_d3_suspend = wakeup;
535 }
536 }
537

---
0-DAY CI Kernel Test Service, Intel Corporation