[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202205130402.6UESZaCw-lkp@intel.com>
Date: Fri, 13 May 2022 05:00:30 +0800
From: kernel test robot <lkp@...el.com>
To: Sean Anderson <sean.anderson@...o.com>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: [linux-stable-rc:linux-5.10.y 5435/5609]
drivers/usb/phy/phy-generic.c:271:19: error: implicit declaration of
function 'devm_regulator_get_exclusive'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
head: e61686bb77c441d8e5f10dc063e2cea799e4aae6
commit: d22d92230ffbbfb696f3800bf53391bb2ef6a688 [5435/5609] usb: phy: generic: Get the vbus supply
config: arm64-buildonly-randconfig-r004-20220512 (https://download.01.org/0day-ci/archive/20220513/202205130402.6UESZaCw-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 9519dacab7b8afd537811fc2abaceb4d14f4e16a)
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://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=d22d92230ffbbfb696f3800bf53391bb2ef6a688
git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git fetch --no-tags linux-stable-rc linux-5.10.y
git checkout d22d92230ffbbfb696f3800bf53391bb2ef6a688
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/usb/phy/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All error/warnings (new ones prefixed by >>):
>> drivers/usb/phy/phy-generic.c:271:19: error: implicit declaration of function 'devm_regulator_get_exclusive' [-Werror,-Wimplicit-function-declaration]
nop->vbus_draw = devm_regulator_get_exclusive(dev, "vbus");
^
drivers/usb/phy/phy-generic.c:271:19: note: did you mean 'regulator_get_exclusive'?
include/linux/regulator/consumer.h:329:1: note: 'regulator_get_exclusive' declared here
regulator_get_exclusive(struct device *dev, const char *id)
^
>> drivers/usb/phy/phy-generic.c:271:17: warning: incompatible integer to pointer conversion assigning to 'struct regulator *' from 'int' [-Wint-conversion]
nop->vbus_draw = devm_regulator_get_exclusive(dev, "vbus");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
vim +/devm_regulator_get_exclusive +271 drivers/usb/phy/phy-generic.c
205
206 int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop)
207 {
208 enum usb_phy_type type = USB_PHY_TYPE_USB2;
209 int err = 0;
210
211 u32 clk_rate = 0;
212 bool needs_vcc = false, needs_clk = false;
213
214 if (dev->of_node) {
215 struct device_node *node = dev->of_node;
216
217 if (of_property_read_u32(node, "clock-frequency", &clk_rate))
218 clk_rate = 0;
219
220 needs_vcc = of_property_read_bool(node, "vcc-supply");
221 needs_clk = of_property_read_bool(node, "clocks");
222 }
223 nop->gpiod_reset = devm_gpiod_get_optional(dev, "reset",
224 GPIOD_ASIS);
225 err = PTR_ERR_OR_ZERO(nop->gpiod_reset);
226 if (!err) {
227 nop->gpiod_vbus = devm_gpiod_get_optional(dev,
228 "vbus-detect",
229 GPIOD_ASIS);
230 err = PTR_ERR_OR_ZERO(nop->gpiod_vbus);
231 }
232
233 if (err == -EPROBE_DEFER)
234 return -EPROBE_DEFER;
235 if (err) {
236 dev_err(dev, "Error requesting RESET or VBUS GPIO\n");
237 return err;
238 }
239 if (nop->gpiod_reset)
240 gpiod_direction_output(nop->gpiod_reset, 1);
241
242 nop->phy.otg = devm_kzalloc(dev, sizeof(*nop->phy.otg),
243 GFP_KERNEL);
244 if (!nop->phy.otg)
245 return -ENOMEM;
246
247 nop->clk = devm_clk_get(dev, "main_clk");
248 if (IS_ERR(nop->clk)) {
249 dev_dbg(dev, "Can't get phy clock: %ld\n",
250 PTR_ERR(nop->clk));
251 if (needs_clk)
252 return PTR_ERR(nop->clk);
253 }
254
255 if (!IS_ERR(nop->clk) && clk_rate) {
256 err = clk_set_rate(nop->clk, clk_rate);
257 if (err) {
258 dev_err(dev, "Error setting clock rate\n");
259 return err;
260 }
261 }
262
263 nop->vcc = devm_regulator_get(dev, "vcc");
264 if (IS_ERR(nop->vcc)) {
265 dev_dbg(dev, "Error getting vcc regulator: %ld\n",
266 PTR_ERR(nop->vcc));
267 if (needs_vcc)
268 return -EPROBE_DEFER;
269 }
270
> 271 nop->vbus_draw = devm_regulator_get_exclusive(dev, "vbus");
272 if (PTR_ERR(nop->vbus_draw) == -ENODEV)
273 nop->vbus_draw = NULL;
274 if (IS_ERR(nop->vbus_draw))
275 return dev_err_probe(dev, PTR_ERR(nop->vbus_draw),
276 "could not get vbus regulator\n");
277
278 nop->dev = dev;
279 nop->phy.dev = nop->dev;
280 nop->phy.label = "nop-xceiv";
281 nop->phy.set_suspend = nop_set_suspend;
282 nop->phy.type = type;
283
284 nop->phy.otg->state = OTG_STATE_UNDEFINED;
285 nop->phy.otg->usb_phy = &nop->phy;
286 nop->phy.otg->set_host = nop_set_host;
287 nop->phy.otg->set_peripheral = nop_set_peripheral;
288
289 return 0;
290 }
291 EXPORT_SYMBOL_GPL(usb_phy_gen_create_phy);
292
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists