From: kernel test robot <lkp@intel.com>
To: Otavio Salvador <otavio@ossystems.com.br>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [freescale-fslc:6.6-1.0.x-imx 3505/11728] drivers/pinctrl/devicetree.c:201:6: warning: variable 'index' set but not used
Date: Sun, 28 Apr 2024 09:45:08 +0800 [thread overview]
Message-ID: <202404280905.RCuGmtS8-lkp@intel.com> (raw)
tree: https://github.com/Freescale/linux-fslc 6.6-1.0.x-imx
head: 37770f55ac9c4f6cd958eb5544939207eed8478f
commit: 26bccb9f27ca09e8c00172691a23151779342d8a [3505/11728] MLK-11749: pinctrl: support pinctrl setting assertion via gpios
config: riscv-defconfig (https://download.01.org/0day-ci/archive/20240428/202404280905.RCuGmtS8-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 5ef5eb66fb428aaf61fb51b709f065c069c11242)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240428/202404280905.RCuGmtS8-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/202404280905.RCuGmtS8-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/pinctrl/devicetree.c:201:6: warning: variable 'index' set but not used [-Wunused-but-set-variable]
201 | int index = 0;
| ^
1 warning generated.
vim +/index +201 drivers/pinctrl/devicetree.c
196
197 static int dt_gpio_assert_pinctrl(struct pinctrl *p)
198 {
199 struct device_node *np = p->dev->of_node;
200 struct gpio_desc *gpio;
> 201 int index = 0;
202 int ret;
203
204 if (!of_find_property(np, "pinctrl-assert-gpios", NULL))
205 return 0; /* Missing the property, so nothing to be done */
206
207 for (;; index++) {
208 gpio = devm_gpiod_get_optional(p->dev, "pinctrl-assert",
209 GPIOD_OUT_HIGH);
210 ret = PTR_ERR(gpio);
211 if (ret < 0) {
212 if (PTR_ERR(gpio) == -EPROBE_DEFER)
213 return -EPROBE_DEFER;
214 break; /* End of the phandle list */
215 }
216 }
217
218 return 0;
219 }
220
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-04-28 1:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202404280905.RCuGmtS8-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=otavio@ossystems.com.br \
/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.