From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: drivers/regulator/max20086-regulator.c:217:26: error: storage size of 'flags' isn't known
Date: Thu, 13 Jan 2022 13:51:47 +0800 [thread overview]
Message-ID: <202201131324.vmxL1PCz-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5348 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 455e73a07f6e288b0061dfcf4fcf54fa9fe06458
commit: bfff546aae50ae68ed395bf0e0848188d27b0ba3 regulator: Add MAX20086-MAX20089 driver
date: 6 days ago
config: m68k-randconfig-r024-20220113 (https://download.01.org/0day-ci/archive/20220113/202201131324.vmxL1PCz-lkp(a)intel.com/config)
compiler: m68k-linux-gcc (GCC) 11.2.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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bfff546aae50ae68ed395bf0e0848188d27b0ba3
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout bfff546aae50ae68ed395bf0e0848188d27b0ba3
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash drivers/regulator/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/regulator/max20086-regulator.c: In function 'max20086_i2c_probe':
>> drivers/regulator/max20086-regulator.c:217:26: error: storage size of 'flags' isn't known
217 | enum gpiod_flags flags;
| ^~~~~
>> drivers/regulator/max20086-regulator.c:261:27: error: 'GPIOD_OUT_HIGH' undeclared (first use in this function); did you mean 'GPIOF_INIT_HIGH'?
261 | flags = boot_on ? GPIOD_OUT_HIGH : GPIOD_OUT_LOW;
| ^~~~~~~~~~~~~~
| GPIOF_INIT_HIGH
drivers/regulator/max20086-regulator.c:261:27: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/regulator/max20086-regulator.c:261:44: error: 'GPIOD_OUT_LOW' undeclared (first use in this function); did you mean 'GPIOF_INIT_LOW'?
261 | flags = boot_on ? GPIOD_OUT_HIGH : GPIOD_OUT_LOW;
| ^~~~~~~~~~~~~
| GPIOF_INIT_LOW
>> drivers/regulator/max20086-regulator.c:262:27: error: implicit declaration of function 'devm_gpiod_get'; did you mean 'devm_gpio_free'? [-Werror=implicit-function-declaration]
262 | chip->ena_gpiod = devm_gpiod_get(chip->dev, "enable", flags);
| ^~~~~~~~~~~~~~
| devm_gpio_free
drivers/regulator/max20086-regulator.c:217:26: warning: unused variable 'flags' [-Wunused-variable]
217 | enum gpiod_flags flags;
| ^~~~~
cc1: some warnings being treated as errors
vim +217 drivers/regulator/max20086-regulator.c
213
214 static int max20086_i2c_probe(struct i2c_client *i2c)
215 {
216 struct max20086 *chip;
> 217 enum gpiod_flags flags;
218 bool boot_on;
219 int ret;
220
221 chip = devm_kzalloc(&i2c->dev, sizeof(*chip), GFP_KERNEL);
222 if (!chip)
223 return -ENOMEM;
224
225 chip->dev = &i2c->dev;
226 chip->info = device_get_match_data(chip->dev);
227
228 i2c_set_clientdata(i2c, chip);
229
230 chip->regmap = devm_regmap_init_i2c(i2c, &max20086_regmap_config);
231 if (IS_ERR(chip->regmap)) {
232 ret = PTR_ERR(chip->regmap);
233 dev_err(chip->dev, "Failed to allocate register map: %d\n", ret);
234 return ret;
235 }
236
237 ret = max20086_parse_regulators_dt(chip, &boot_on);
238 if (ret < 0)
239 return ret;
240
241 ret = max20086_detect(chip);
242 if (ret < 0)
243 return ret;
244
245 /* Until IRQ support is added, just disable all interrupts. */
246 ret = regmap_update_bits(chip->regmap, MAX20086_REG_MASK,
247 MAX20086_INT_DISABLE_ALL,
248 MAX20086_INT_DISABLE_ALL);
249 if (ret < 0) {
250 dev_err(chip->dev, "Failed to disable interrupts: %d\n", ret);
251 return ret;
252 }
253
254 /*
255 * Get the enable GPIO. If any of the outputs is marked as being
256 * enabled at boot, request the GPIO with an initial high state to
257 * avoid disabling outputs that may have been turned on by the boot
258 * loader. Otherwise, request it with a low state to enter lower-power
259 * shutdown.
260 */
> 261 flags = boot_on ? GPIOD_OUT_HIGH : GPIOD_OUT_LOW;
> 262 chip->ena_gpiod = devm_gpiod_get(chip->dev, "enable", flags);
263 if (IS_ERR(chip->ena_gpiod)) {
264 ret = PTR_ERR(chip->ena_gpiod);
265 dev_err(chip->dev, "Failed to get enable GPIO: %d\n", ret);
266 return ret;
267 }
268
269 ret = max20086_regulators_register(chip);
270 if (ret < 0) {
271 dev_err(chip->dev, "Failed to register regulators: %d\n", ret);
272 return ret;
273 }
274
275 return 0;
276 }
277
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Watson Chow <watson.chow@avnet.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Mark Brown <broonie@kernel.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: drivers/regulator/max20086-regulator.c:217:26: error: storage size of 'flags' isn't known
Date: Thu, 13 Jan 2022 13:51:47 +0800 [thread overview]
Message-ID: <202201131324.vmxL1PCz-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 455e73a07f6e288b0061dfcf4fcf54fa9fe06458
commit: bfff546aae50ae68ed395bf0e0848188d27b0ba3 regulator: Add MAX20086-MAX20089 driver
date: 6 days ago
config: m68k-randconfig-r024-20220113 (https://download.01.org/0day-ci/archive/20220113/202201131324.vmxL1PCz-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 11.2.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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bfff546aae50ae68ed395bf0e0848188d27b0ba3
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout bfff546aae50ae68ed395bf0e0848188d27b0ba3
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash drivers/regulator/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/regulator/max20086-regulator.c: In function 'max20086_i2c_probe':
>> drivers/regulator/max20086-regulator.c:217:26: error: storage size of 'flags' isn't known
217 | enum gpiod_flags flags;
| ^~~~~
>> drivers/regulator/max20086-regulator.c:261:27: error: 'GPIOD_OUT_HIGH' undeclared (first use in this function); did you mean 'GPIOF_INIT_HIGH'?
261 | flags = boot_on ? GPIOD_OUT_HIGH : GPIOD_OUT_LOW;
| ^~~~~~~~~~~~~~
| GPIOF_INIT_HIGH
drivers/regulator/max20086-regulator.c:261:27: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/regulator/max20086-regulator.c:261:44: error: 'GPIOD_OUT_LOW' undeclared (first use in this function); did you mean 'GPIOF_INIT_LOW'?
261 | flags = boot_on ? GPIOD_OUT_HIGH : GPIOD_OUT_LOW;
| ^~~~~~~~~~~~~
| GPIOF_INIT_LOW
>> drivers/regulator/max20086-regulator.c:262:27: error: implicit declaration of function 'devm_gpiod_get'; did you mean 'devm_gpio_free'? [-Werror=implicit-function-declaration]
262 | chip->ena_gpiod = devm_gpiod_get(chip->dev, "enable", flags);
| ^~~~~~~~~~~~~~
| devm_gpio_free
drivers/regulator/max20086-regulator.c:217:26: warning: unused variable 'flags' [-Wunused-variable]
217 | enum gpiod_flags flags;
| ^~~~~
cc1: some warnings being treated as errors
vim +217 drivers/regulator/max20086-regulator.c
213
214 static int max20086_i2c_probe(struct i2c_client *i2c)
215 {
216 struct max20086 *chip;
> 217 enum gpiod_flags flags;
218 bool boot_on;
219 int ret;
220
221 chip = devm_kzalloc(&i2c->dev, sizeof(*chip), GFP_KERNEL);
222 if (!chip)
223 return -ENOMEM;
224
225 chip->dev = &i2c->dev;
226 chip->info = device_get_match_data(chip->dev);
227
228 i2c_set_clientdata(i2c, chip);
229
230 chip->regmap = devm_regmap_init_i2c(i2c, &max20086_regmap_config);
231 if (IS_ERR(chip->regmap)) {
232 ret = PTR_ERR(chip->regmap);
233 dev_err(chip->dev, "Failed to allocate register map: %d\n", ret);
234 return ret;
235 }
236
237 ret = max20086_parse_regulators_dt(chip, &boot_on);
238 if (ret < 0)
239 return ret;
240
241 ret = max20086_detect(chip);
242 if (ret < 0)
243 return ret;
244
245 /* Until IRQ support is added, just disable all interrupts. */
246 ret = regmap_update_bits(chip->regmap, MAX20086_REG_MASK,
247 MAX20086_INT_DISABLE_ALL,
248 MAX20086_INT_DISABLE_ALL);
249 if (ret < 0) {
250 dev_err(chip->dev, "Failed to disable interrupts: %d\n", ret);
251 return ret;
252 }
253
254 /*
255 * Get the enable GPIO. If any of the outputs is marked as being
256 * enabled at boot, request the GPIO with an initial high state to
257 * avoid disabling outputs that may have been turned on by the boot
258 * loader. Otherwise, request it with a low state to enter lower-power
259 * shutdown.
260 */
> 261 flags = boot_on ? GPIOD_OUT_HIGH : GPIOD_OUT_LOW;
> 262 chip->ena_gpiod = devm_gpiod_get(chip->dev, "enable", flags);
263 if (IS_ERR(chip->ena_gpiod)) {
264 ret = PTR_ERR(chip->ena_gpiod);
265 dev_err(chip->dev, "Failed to get enable GPIO: %d\n", ret);
266 return ret;
267 }
268
269 ret = max20086_regulators_register(chip);
270 if (ret < 0) {
271 dev_err(chip->dev, "Failed to register regulators: %d\n", ret);
272 return ret;
273 }
274
275 return 0;
276 }
277
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
next reply other threads:[~2022-01-13 5:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-13 5:51 kernel test robot [this message]
2022-01-13 5:51 ` drivers/regulator/max20086-regulator.c:217:26: error: storage size of 'flags' isn't known kernel test robot
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=202201131324.vmxL1PCz-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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.