[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202305260541.tUXULCW2-lkp@intel.com>
Date: Fri, 26 May 2023 05:55:26 +0800
From: kernel test robot <lkp@...el.com>
To: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>,
Krzysztof Kozlowski <krzk@...nel.org>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
Rob Herring <robh@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, Philipp Marek <philipp@...ek.priv.at>
Subject: Re: [PATCH 3/3] w1: gpio: rename pointer to driver data from pdata
to ddata
Hi Uwe,
kernel test robot noticed the following build errors:
[auto build test ERROR on ac9a78681b921877518763ba0e89202254349d1b]
url: https://github.com/intel-lab-lkp/linux/commits/Uwe-Kleine-K-nig/w1-gpio-Drop-unused-enable_external_pullup-from-driver-data/20230525-180131
base: ac9a78681b921877518763ba0e89202254349d1b
patch link: https://lore.kernel.org/r/20230525095624.615350-3-u.kleine-koenig%40pengutronix.de
patch subject: [PATCH 3/3] w1: gpio: rename pointer to driver data from pdata to ddata
config: i386-randconfig-i094-20230525
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
mkdir -p ~/bin
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/898f3f43b021ad2f7960ffddb814ef5cf1e2753d
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Uwe-Kleine-K-nig/w1-gpio-Drop-unused-enable_external_pullup-from-driver-data/20230525-180131
git checkout 898f3f43b021ad2f7960ffddb814ef5cf1e2753d
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=i386 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/w1/masters/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202305260541.tUXULCW2-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/w1/masters/w1-gpio.c:84:43: error: use of undeclared identifier 'pdata'; did you mean 'ddata'?
ddata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
^~~~~
ddata
drivers/w1/masters/w1-gpio.c:77:24: note: 'ddata' declared here
struct w1_gpio_ddata *ddata;
^
1 error generated.
vim +84 drivers/w1/masters/w1-gpio.c
73
74 static int w1_gpio_probe(struct platform_device *pdev)
75 {
76 struct w1_bus_master *master;
77 struct w1_gpio_ddata *ddata;
78 struct device *dev = &pdev->dev;
79 struct device_node *np = dev->of_node;
80 /* Enforce open drain mode by default */
81 enum gpiod_flags gflags = GPIOD_OUT_LOW_OPEN_DRAIN;
82 int err;
83
> 84 ddata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
85 if (!ddata)
86 return -ENOMEM;
87
88 /*
89 * This parameter means that something else than the gpiolib has
90 * already set the line into open drain mode, so we should just
91 * driver it high/low like we are in full control of the line and
92 * open drain will happen transparently.
93 */
94 if (of_property_present(np, "linux,open-drain"))
95 gflags = GPIOD_OUT_LOW;
96
97 master = devm_kzalloc(dev, sizeof(struct w1_bus_master),
98 GFP_KERNEL);
99 if (!master)
100 return -ENOMEM;
101
102 ddata->gpiod = devm_gpiod_get_index(dev, NULL, 0, gflags);
103 if (IS_ERR(ddata->gpiod)) {
104 dev_err(dev, "gpio_request (pin) failed\n");
105 return PTR_ERR(ddata->gpiod);
106 }
107
108 ddata->pullup_gpiod =
109 devm_gpiod_get_index_optional(dev, NULL, 1, GPIOD_OUT_LOW);
110 if (IS_ERR(ddata->pullup_gpiod)) {
111 dev_err(dev, "gpio_request_one "
112 "(ext_pullup_enable_pin) failed\n");
113 return PTR_ERR(ddata->pullup_gpiod);
114 }
115
116 master->data = ddata;
117 master->read_bit = w1_gpio_read_bit;
118 gpiod_direction_output(ddata->gpiod, 1);
119 master->write_bit = w1_gpio_write_bit;
120
121 /*
122 * If we are using open drain emulation from the GPIO library,
123 * we need to use this pullup function that hammers the line
124 * high using a raw accessor to provide pull-up for the w1
125 * line.
126 */
127 if (gflags == GPIOD_OUT_LOW_OPEN_DRAIN)
128 master->set_pullup = w1_gpio_set_pullup;
129
130 err = w1_add_master_device(master);
131 if (err) {
132 dev_err(dev, "w1_add_master device failed\n");
133 return err;
134 }
135
136 if (ddata->pullup_gpiod)
137 gpiod_set_value(ddata->pullup_gpiod, 1);
138
139 platform_set_drvdata(pdev, master);
140
141 return 0;
142 }
143
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
View attachment "config" of type "text/plain" (142349 bytes)
Powered by blists - more mailing lists