All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: drivers/gpio/gpiolib-of.c:232 of_gpio_set_polarity_by_property() warn: we never enter this loop
Date: Fri, 5 May 2023 04:15:50 +0800	[thread overview]
Message-ID: <202305050458.oPqINm1R-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1a5304fecee523060f26e2778d9d8e33c0562df3
commit: 34cb9352b62366038fd2d5b9d9f393f35d0be1e0 gpiolib: of: factor out quirk setting polarity via separate property
date:   6 months ago
:::::: branch date: 17 hours ago
:::::: commit date: 6 months ago
config: arm64-randconfig-m041-20230428 (https://download.01.org/0day-ci/archive/20230505/202305050458.oPqINm1R-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 12.1.0

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Link: https://lore.kernel.org/r/202305050458.oPqINm1R-lkp@intel.com/

smatch warnings:
drivers/gpio/gpiolib-of.c:232 of_gpio_set_polarity_by_property() warn: we never enter this loop

vim +232 drivers/gpio/gpiolib-of.c

99d18d42c94285 Dmitry Torokhov 2022-10-17  211  
a603a2b8d86ee9 Linus Walleij   2017-12-30  212  		/*
a603a2b8d86ee9 Linus Walleij   2017-12-30  213  		 * The regulator GPIO handles are specified such that the
a603a2b8d86ee9 Linus Walleij   2017-12-30  214  		 * presence or absence of "enable-active-high" solely controls
a603a2b8d86ee9 Linus Walleij   2017-12-30  215  		 * the polarity of the GPIO line. Any phandle flags must
a603a2b8d86ee9 Linus Walleij   2017-12-30  216  		 * be actively ignored.
a603a2b8d86ee9 Linus Walleij   2017-12-30  217  		 */
34cb9352b62366 Dmitry Torokhov 2022-10-29  218  #if IS_ENABLED(CONFIG_REGULATOR_FIXED_VOLTAGE)
34cb9352b62366 Dmitry Torokhov 2022-10-29  219  		{ "regulator-fixed",   "gpios",        "enable-active-high" },
34cb9352b62366 Dmitry Torokhov 2022-10-29  220  		{ "regulator-fixed",   "gpio",         "enable-active-high" },
34cb9352b62366 Dmitry Torokhov 2022-10-29  221  		{ "reg-fixed-voltage", "gpios",        "enable-active-high" },
34cb9352b62366 Dmitry Torokhov 2022-10-29  222  		{ "reg-fixed-voltage", "gpio",         "enable-active-high" },
34cb9352b62366 Dmitry Torokhov 2022-10-29  223  #endif
34cb9352b62366 Dmitry Torokhov 2022-10-29  224  #if IS_ENABLED(CONFIG_REGULATOR_GPIO)
34cb9352b62366 Dmitry Torokhov 2022-10-29  225  		{ "regulator-gpio",    "enable-gpio",  "enable-active-high" },
34cb9352b62366 Dmitry Torokhov 2022-10-29  226  		{ "regulator-gpio",    "enable-gpios", "enable-active-high" },
34cb9352b62366 Dmitry Torokhov 2022-10-29  227  #endif
34cb9352b62366 Dmitry Torokhov 2022-10-29  228  	};
34cb9352b62366 Dmitry Torokhov 2022-10-29  229  	unsigned int i;
34cb9352b62366 Dmitry Torokhov 2022-10-29  230  	bool active_high;
34cb9352b62366 Dmitry Torokhov 2022-10-29  231  
34cb9352b62366 Dmitry Torokhov 2022-10-29 @232  	for (i = 0; i < ARRAY_SIZE(gpios); i++) {
34cb9352b62366 Dmitry Torokhov 2022-10-29  233  		if (of_device_is_compatible(np, gpios[i].compatible) &&
34cb9352b62366 Dmitry Torokhov 2022-10-29  234  		    !strcmp(propname, gpios[i].gpio_propname)) {
34cb9352b62366 Dmitry Torokhov 2022-10-29  235  			active_high = of_property_read_bool(np,
34cb9352b62366 Dmitry Torokhov 2022-10-29  236  						gpios[i].polarity_propname);
e3186e36925fc1 Dmitry Torokhov 2022-10-17  237  			of_gpio_quirk_polarity(np, active_high, flags);
34cb9352b62366 Dmitry Torokhov 2022-10-29  238  			break;
34cb9352b62366 Dmitry Torokhov 2022-10-29  239  		}
34cb9352b62366 Dmitry Torokhov 2022-10-29  240  	}
a603a2b8d86ee9 Linus Walleij   2017-12-30  241  }
34cb9352b62366 Dmitry Torokhov 2022-10-29  242  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

             reply	other threads:[~2023-05-04 20:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-04 20:15 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-05-16  1:01 drivers/gpio/gpiolib-of.c:232 of_gpio_set_polarity_by_property() warn: we never enter this loop kernel test robot
2023-04-11  5:55 kernel test robot
2022-12-27  1:40 kernel test robot
2022-12-22 14:05 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=202305050458.oPqINm1R-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@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 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.