[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202204270151.wJnsbJBF-lkp@intel.com>
Date: Wed, 27 Apr 2022 01:55:10 +0800
From: kernel test robot <lkp@...el.com>
To: Daehwan Jung <dh10.jung@...sung.com>,
Mathias Nyman <mathias.nyman@...el.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: kbuild-all@...ts.01.org, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org, Howard Yen <howardyen@...gle.com>,
Jack Pham <jackp@...eaurora.org>,
Puma Hsu <pumahsu@...gle.com>,
"J . Avila" <elavila@...gle.com>,
Daehwan Jung <dh10.jung@...sung.com>, sc.suh@...sung.com,
Krzysztof Kozlowski <krzk@...nel.org>
Subject: Re: [PATCH v4 5/5] usb: host: add xhci-exynos driver
Hi Daehwan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on usb/usb-testing]
[also build test WARNING on krzk/for-next char-misc/char-misc-testing v5.18-rc4 next-20220426]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/Daehwan-Jung/usb-host-export-symbols-for-xhci-exynos-to-use-xhci-hooks/20220426-181936
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220427/202204270151.wJnsbJBF-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 11.3.0
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
# https://github.com/intel-lab-lkp/linux/commit/6beb993f823c7c9a71f0b539a34d0ef5c64bd73d
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Daehwan-Jung/usb-host-export-symbols-for-xhci-exynos-to-use-xhci-hooks/20220426-181936
git checkout 6beb993f823c7c9a71f0b539a34d0ef5c64bd73d
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash drivers/usb/host/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/usb/host/xhci-exynos.c: In function 'xhci_exynos_address_device':
>> drivers/usb/host/xhci-exynos.c:112:26: warning: variable 'xhci' set but not used [-Wunused-but-set-variable]
112 | struct xhci_hcd *xhci;
| ^~~~
drivers/usb/host/xhci-exynos.c: In function 'xhci_exynos_vendor_init':
>> drivers/usb/host/xhci-exynos.c:205:34: warning: variable 'pdev' set but not used [-Wunused-but-set-variable]
205 | struct platform_device *pdev;
| ^~~~
drivers/usb/host/xhci-exynos.c: In function 'xhci_exynos_parse_endpoint':
>> drivers/usb/host/xhci-exynos.c:353:29: warning: variable 'ep_ctx' set but not used [-Wunused-but-set-variable]
353 | struct xhci_ep_ctx *ep_ctx;
| ^~~~~~
At top level:
drivers/usb/host/xhci-exynos.c:543:12: warning: 'xhci_exynos_resume' defined but not used [-Wunused-function]
543 | static int xhci_exynos_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~~~
drivers/usb/host/xhci-exynos.c:533:12: warning: 'xhci_exynos_suspend' defined but not used [-Wunused-function]
533 | static int xhci_exynos_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~
drivers/usb/host/xhci-exynos.c:30:12: warning: 'xhci_exynos_register_vendor_ops' defined but not used [-Wunused-function]
30 | static int xhci_exynos_register_vendor_ops(struct xhci_vendor_ops *vendor_ops)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/xhci +112 drivers/usb/host/xhci-exynos.c
109
110 static int xhci_exynos_address_device(struct usb_hcd *hcd, struct usb_device *udev)
111 {
> 112 struct xhci_hcd *xhci;
113 int ret;
114
115 ret = xhci_address_device(hcd, udev);
116 xhci = hcd_to_xhci(hcd);
117
118 /* TODO: store and pass hw info to Co-Processor here*/
119
120 return ret;
121 }
122
123 static int xhci_exynos_wake_lock(struct xhci_hcd_exynos *xhci_exynos,
124 int is_main_hcd, int is_lock)
125 {
126 struct usb_hcd *hcd = xhci_exynos->hcd;
127 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
128 struct wakeup_source *main_wakelock, *shared_wakelock;
129
130 main_wakelock = xhci_exynos->main_wakelock;
131 shared_wakelock = xhci_exynos->shared_wakelock;
132
133 if (xhci->xhc_state & XHCI_STATE_REMOVING)
134 return -ESHUTDOWN;
135
136 if (is_lock) {
137 if (is_main_hcd)
138 __pm_stay_awake(main_wakelock);
139 else
140 __pm_stay_awake(shared_wakelock);
141 } else {
142 if (is_main_hcd)
143 __pm_relax(main_wakelock);
144 else
145 __pm_relax(shared_wakelock);
146 }
147
148 return 0;
149 }
150
151 static int xhci_exynos_bus_suspend(struct usb_hcd *hcd)
152 {
153 struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd);
154 struct xhci_hcd_exynos *xhci_exynos = priv->vendor_priv;
155 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
156
157
158 int ret, main_hcd;
159
160 if (hcd == xhci->main_hcd)
161 main_hcd = 1;
162 else
163 main_hcd = 0;
164
165 ret = xhci_bus_suspend(hcd);
166 xhci_exynos_wake_lock(xhci_exynos, main_hcd, 0);
167
168 return ret;
169 }
170
171 static int xhci_exynos_bus_resume(struct usb_hcd *hcd)
172 {
173 struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd);
174 struct xhci_hcd_exynos *xhci_exynos = priv->vendor_priv;
175 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
176
177 int ret, main_hcd;
178
179 if (hcd == xhci->main_hcd)
180 main_hcd = 1;
181 else
182 main_hcd = 0;
183
184 ret = xhci_bus_resume(hcd);
185 xhci_exynos_wake_lock(xhci_exynos, main_hcd, 1);
186
187 return ret;
188 }
189
190 const struct xhci_driver_overrides xhci_exynos_overrides = {
191 .reset = xhci_exynos_setup,
192 .start = xhci_exynos_start,
193 .add_endpoint = xhci_exynos_add_endpoint,
194 .address_device = xhci_exynos_address_device,
195 .bus_suspend = xhci_exynos_bus_suspend,
196 .bus_resume = xhci_exynos_bus_resume,
197 };
198
199 static int xhci_exynos_vendor_init(struct xhci_hcd *xhci, struct device *dev)
200 {
201 struct usb_hcd *hcd;
202 struct xhci_hcd_exynos *xhci_exynos;
203 struct xhci_plat_priv *priv;
204 struct wakeup_source *main_wakelock, *shared_wakelock;
> 205 struct platform_device *pdev;
206
207 pdev = to_platform_device(dev);
208
209 xhci_plat_override_driver(&xhci_exynos_overrides);
210 dev->driver->pm = &xhci_exynos_pm_ops;
211
212 main_wakelock = wakeup_source_register(dev, dev_name(dev));
213 __pm_stay_awake(main_wakelock);
214
215 /* Initialization shared wakelock for SS HCD */
216 shared_wakelock = wakeup_source_register(dev, dev_name(dev));
217 __pm_stay_awake(shared_wakelock);
218
219 hcd = xhci->main_hcd;
220
221 priv = hcd_to_xhci_priv(hcd);
222 xhci_exynos = priv->vendor_priv;
223 xhci_exynos->dev = dev;
224 xhci_exynos->main_wakelock = main_wakelock;
225 xhci_exynos->shared_wakelock = shared_wakelock;
226
227 return 0;
228 }
229
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists