From: kernel test robot <lkp@intel.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>,
Linus Walleij <linus.walleij@linaro.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpio: ds4520: don't check the 'ngpios' property in the driver
Date: Tue, 8 Apr 2025 00:11:57 +0800 [thread overview]
Message-ID: <202504072320.SjnRj58d-lkp@intel.com> (raw)
In-Reply-To: <20250407-gpio-regmap-ngpios-v1-1-5ea63fcbde39@linaro.org>
Hi Bartosz,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 0af2f6be1b4281385b618cb86ad946eded089ac8]
url: https://github.com/intel-lab-lkp/linux/commits/Bartosz-Golaszewski/gpio-ds4520-don-t-check-the-ngpios-property-in-the-driver/20250407-150804
base: 0af2f6be1b4281385b618cb86ad946eded089ac8
patch link: https://lore.kernel.org/r/20250407-gpio-regmap-ngpios-v1-1-5ea63fcbde39%40linaro.org
patch subject: [PATCH] gpio: ds4520: don't check the 'ngpios' property in the driver
config: arm-randconfig-002-20250407 (https://download.01.org/0day-ci/archive/20250407/202504072320.SjnRj58d-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 92c93f5286b9ff33f27ff694d2dc33da1c07afdd)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250407/202504072320.SjnRj58d-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504072320.SjnRj58d-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/gpio/gpio-ds4520.c:43:17: warning: variable 'ngpio' is uninitialized when used here [-Wuninitialized]
43 | config.ngpio = ngpio;
| ^~~~~
drivers/gpio/gpio-ds4520.c:28:11: note: initialize the variable 'ngpio' to silence this warning
28 | u32 ngpio;
| ^
| = 0
1 warning generated.
vim +/ngpio +43 drivers/gpio/gpio-ds4520.c
659ad5f7efece8 Okan Sahin 2023-07-29 22
659ad5f7efece8 Okan Sahin 2023-07-29 23 static int ds4520_gpio_probe(struct i2c_client *client)
659ad5f7efece8 Okan Sahin 2023-07-29 24 {
659ad5f7efece8 Okan Sahin 2023-07-29 25 struct gpio_regmap_config config = { };
659ad5f7efece8 Okan Sahin 2023-07-29 26 struct device *dev = &client->dev;
659ad5f7efece8 Okan Sahin 2023-07-29 27 struct regmap *regmap;
659ad5f7efece8 Okan Sahin 2023-07-29 28 u32 ngpio;
659ad5f7efece8 Okan Sahin 2023-07-29 29 u32 base;
659ad5f7efece8 Okan Sahin 2023-07-29 30 int ret;
659ad5f7efece8 Okan Sahin 2023-07-29 31
659ad5f7efece8 Okan Sahin 2023-07-29 32 ret = device_property_read_u32(dev, "reg", &base);
659ad5f7efece8 Okan Sahin 2023-07-29 33 if (ret)
659ad5f7efece8 Okan Sahin 2023-07-29 34 return dev_err_probe(dev, ret, "Missing 'reg' property.\n");
659ad5f7efece8 Okan Sahin 2023-07-29 35
659ad5f7efece8 Okan Sahin 2023-07-29 36 regmap = devm_regmap_init_i2c(client, &ds4520_regmap_config);
659ad5f7efece8 Okan Sahin 2023-07-29 37 if (IS_ERR(regmap))
659ad5f7efece8 Okan Sahin 2023-07-29 38 return dev_err_probe(dev, PTR_ERR(regmap),
659ad5f7efece8 Okan Sahin 2023-07-29 39 "Failed to allocate register map\n");
659ad5f7efece8 Okan Sahin 2023-07-29 40
659ad5f7efece8 Okan Sahin 2023-07-29 41 config.regmap = regmap;
659ad5f7efece8 Okan Sahin 2023-07-29 42 config.parent = dev;
659ad5f7efece8 Okan Sahin 2023-07-29 @43 config.ngpio = ngpio;
659ad5f7efece8 Okan Sahin 2023-07-29 44
659ad5f7efece8 Okan Sahin 2023-07-29 45 config.reg_dat_base = base + DS4520_IO_STATUS0;
659ad5f7efece8 Okan Sahin 2023-07-29 46 config.reg_set_base = base + DS4520_PULLUP0;
659ad5f7efece8 Okan Sahin 2023-07-29 47 config.reg_dir_out_base = base + DS4520_IO_CONTROL0;
659ad5f7efece8 Okan Sahin 2023-07-29 48
659ad5f7efece8 Okan Sahin 2023-07-29 49 return PTR_ERR_OR_ZERO(devm_gpio_regmap_register(dev, &config));
659ad5f7efece8 Okan Sahin 2023-07-29 50 }
659ad5f7efece8 Okan Sahin 2023-07-29 51
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2025-04-07 16:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-07 7:06 Bartosz Golaszewski
2025-04-07 16:11 ` kernel test robot [this message]
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=202504072320.SjnRj58d-lkp@intel.com \
--to=lkp@intel.com \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®