From: kernel test robot <lkp@intel.com>
To: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>,
Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Frank Rowand <frowand.list@gmail.com>,
Mika Westerberg <westeri@kernel.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Aaro Koskinen <aaro.koskinen@iki.fi>,
Janusz Krzysztofik <jmkrzyszt@gmail.com>,
Tony Lindgren <tony@atomide.com>,
Russell King <linux@armlinux.org.uk>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-omap@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH 2/6] gpio: move hogs into GPIO core
Date: Fri, 6 Mar 2026 09:06:24 +0800 [thread overview]
Message-ID: <202603060850.dUlmPBav-lkp@intel.com> (raw)
In-Reply-To: <20260305-gpio-hog-fwnode-v1-2-97d7df6bbd17@oss.qualcomm.com>
Hi Bartosz,
kernel test robot noticed the following build warnings:
[auto build test WARNING on c025f6cf4209e1542ec2afebe49f42bbaf1a5c7b]
url: https://github.com/intel-lab-lkp/linux/commits/Bartosz-Golaszewski/gpio-of-clear-OF_POPULATED-on-hog-nodes-in-remove-path/20260305-175735
base: c025f6cf4209e1542ec2afebe49f42bbaf1a5c7b
patch link: https://lore.kernel.org/r/20260305-gpio-hog-fwnode-v1-2-97d7df6bbd17%40oss.qualcomm.com
patch subject: [PATCH 2/6] gpio: move hogs into GPIO core
config: loongarch-allnoconfig (https://download.01.org/0day-ci/archive/20260306/202603060850.dUlmPBav-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project c32caeec8158d634bb71ab8911a6031248b9fc47)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260306/202603060850.dUlmPBav-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/202603060850.dUlmPBav-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/gpio/gpiolib.c:981:10: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
981 | return ret;
| ^~~
drivers/gpio/gpiolib.c:971:9: note: initialize the variable 'ret' to silence this warning
971 | int ret, argc;
| ^
| = 0
1 warning generated.
vim +/ret +981 drivers/gpio/gpiolib.c
962
963 int gpiochip_add_hog(struct gpio_chip *gc, struct fwnode_handle *fwnode)
964 {
965 struct fwnode_handle *gc_node = dev_fwnode(&gc->gpiodev->dev);
966 struct of_phandle_args gpiospec;
967 enum gpiod_flags dflags;
968 struct gpio_desc *desc;
969 unsigned long lflags;
970 const char *name;
971 int ret, argc;
972 u32 gpios[3]; /* We support up to three-cell bindings. */
973 u32 cells;
974
975 lflags = GPIO_LOOKUP_FLAGS_DEFAULT;
976 dflags = GPIOD_ASIS;
977 name = NULL;
978
979 argc = fwnode_property_count_u32(fwnode, "gpios");
980 if (argc < 0)
> 981 return ret;
982 if (argc > 3)
983 return -EINVAL;
984
985 ret = fwnode_property_read_u32_array(fwnode, "gpios", gpios, argc);
986 if (ret < 0)
987 return ret;
988
989 if (is_of_node(fwnode)) {
990 /*
991 * OF-nodes need some additional special handling for
992 * translating of devicetree flags.
993 */
994 ret = fwnode_property_read_u32(gc_node, "#gpio-cells", &cells);
995 if (ret)
996 return ret;
997 if (cells && argc != cells)
998 return -EINVAL;
999
1000 memset(&gpiospec, 0, sizeof(gpiospec));
1001 gpiospec.np = to_of_node(fwnode);
1002 gpiospec.args_count = argc;
1003 memcpy(&gpiospec.args, gpios, argc * sizeof(u32));
1004
1005 ret = of_gpiochip_get_lflags(gc, &gpiospec, &lflags);
1006 if (ret)
1007 return ret;
1008 } else {
1009 /*
1010 * GPIO_ACTIVE_LOW is currently the only lookup flag
1011 * supported for non-OF firmware nodes.
1012 */
1013 if (gpios[1])
1014 lflags |= GPIO_ACTIVE_LOW;
1015 }
1016
1017 if (fwnode_property_present(fwnode, "input"))
1018 dflags |= GPIOD_IN;
1019 else if (fwnode_property_present(fwnode, "output-low"))
1020 dflags |= GPIOD_OUT_LOW;
1021 else if (fwnode_property_present(fwnode, "output-high"))
1022 dflags |= GPIOD_OUT_HIGH;
1023 else
1024 return -EINVAL;
1025
1026 fwnode_property_read_string(fwnode, "line-name", &name);
1027
1028 desc = gpiochip_get_desc(gc, gpios[0]);
1029 if (IS_ERR(desc))
1030 return PTR_ERR(desc);
1031
1032 ret = gpiod_hog(desc, name, lflags, dflags);
1033 if (ret)
1034 return ret;
1035
1036 return 0;
1037 }
1038
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-03-06 1:06 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-05 9:51 [PATCH 0/6] gpiolib: unify gpio-hog code Bartosz Golaszewski
2026-03-05 9:51 ` [PATCH 1/6] gpio: of: clear OF_POPULATED on hog nodes in remove path Bartosz Golaszewski
2026-03-05 12:58 ` Linus Walleij
2026-03-05 9:51 ` [PATCH 2/6] gpio: move hogs into GPIO core Bartosz Golaszewski
2026-03-05 12:59 ` Linus Walleij
2026-03-05 14:25 ` Mika Westerberg
2026-03-06 1:06 ` kernel test robot [this message]
2026-03-06 11:53 ` Andy Shevchenko
2026-03-05 9:51 ` [PATCH 3/6] gpio: sim: use fwnode-based GPIO hogs Bartosz Golaszewski
2026-03-05 12:59 ` Linus Walleij
2026-03-05 9:51 ` [PATCH 4/6] ARM: omap1: ams-delta: convert GPIO hogs to using firmware nodes Bartosz Golaszewski
2026-03-05 12:59 ` Linus Walleij
2026-03-06 0:44 ` Kevin Hilman
2026-03-05 9:51 ` [PATCH 5/6] gpio: remove machine hogs Bartosz Golaszewski
2026-03-05 13:00 ` Linus Walleij
2026-03-05 9:51 ` [PATCH 6/6] gpio: sim: allow to define the active-low setting of a simulated hog Bartosz Golaszewski
2026-03-05 13:01 ` Linus Walleij
2026-03-06 11:58 ` [PATCH 0/6] gpiolib: unify gpio-hog code Andy Shevchenko
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=202603060850.dUlmPBav-lkp@intel.com \
--to=lkp@intel.com \
--cc=aaro.koskinen@iki.fi \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=brgl@kernel.org \
--cc=corbet@lwn.net \
--cc=frowand.list@gmail.com \
--cc=geert+renesas@glider.be \
--cc=jmkrzyszt@gmail.com \
--cc=linusw@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=skhan@linuxfoundation.org \
--cc=tony@atomide.com \
--cc=westeri@kernel.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.