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: [linusw-gpio:b4/descriptors-regulators 3/6] drivers/regulator/da9055-regulator.c:481 da9055_gpio_init() error: uninitialized symbol 'ret'.
Date: Tue, 20 Feb 2024 06:14:53 +0800	[thread overview]
Message-ID: <202402200604.tilWhpaa-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-gpio@vger.kernel.org
TO: Linus Walleij <linus.walleij@linaro.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git b4/descriptors-regulators
head:   70f1ac1c0e32e3d7fb546eac70f113bd57b659fa
commit: db93c3de09384ee1d48a99bb103a49938f80e046 [3/6] regulator: da9055: Fully convert to GPIO descriptors
:::::: branch date: 22 hours ago
:::::: commit date: 4 days ago
config: nios2-randconfig-r071-20240219 (https://download.01.org/0day-ci/archive/20240220/202402200604.tilWhpaa-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 13.2.0

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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202402200604.tilWhpaa-lkp@intel.com/

smatch warnings:
drivers/regulator/da9055-regulator.c:481 da9055_gpio_init() error: uninitialized symbol 'ret'.

vim +/ret +481 drivers/regulator/da9055-regulator.c

f6130be652d0b4 Ashish Jangam 2012-11-01  409  
f6130be652d0b4 Ashish Jangam 2012-11-01  410  /*
f6130be652d0b4 Ashish Jangam 2012-11-01  411   * Configures regulator to be controlled either through GPIO 1 or 2.
f6130be652d0b4 Ashish Jangam 2012-11-01  412   * GPIO can control regulator state and/or select the regulator register
f6130be652d0b4 Ashish Jangam 2012-11-01  413   * set A/B for voltage ramping.
f6130be652d0b4 Ashish Jangam 2012-11-01  414   */
db93c3de09384e Linus Walleij 2024-02-15  415  static int da9055_gpio_init(struct device *dev,
db93c3de09384e Linus Walleij 2024-02-15  416  			    struct da9055_regulator *regulator,
f6130be652d0b4 Ashish Jangam 2012-11-01  417  			    struct regulator_config *config,
f6130be652d0b4 Ashish Jangam 2012-11-01  418  			    struct da9055_pdata *pdata, int id)
f6130be652d0b4 Ashish Jangam 2012-11-01  419  {
f6130be652d0b4 Ashish Jangam 2012-11-01  420  	struct da9055_regulator_info *info = regulator->info;
db93c3de09384e Linus Walleij 2024-02-15  421  	struct gpio_desc *ren;
db93c3de09384e Linus Walleij 2024-02-15  422  	struct gpio_desc *ena;
db93c3de09384e Linus Walleij 2024-02-15  423  	struct gpio_desc *rsel;
db93c3de09384e Linus Walleij 2024-02-15  424  	int ret;
f6130be652d0b4 Ashish Jangam 2012-11-01  425  
db93c3de09384e Linus Walleij 2024-02-15  426  	/* Look for "regulator-enable-gpios" GPIOs in the regulator node */
db93c3de09384e Linus Walleij 2024-02-15  427  	ren = devm_gpiod_get_optional(dev, "regulator-enable", GPIOD_IN);
db93c3de09384e Linus Walleij 2024-02-15  428  	if (IS_ERR(ren))
db93c3de09384e Linus Walleij 2024-02-15  429  		return PTR_ERR(ren);
8b61a28d616a34 Adam Thomson  2014-02-06  430  
db93c3de09384e Linus Walleij 2024-02-15  431  	if (ren) {
db93c3de09384e Linus Walleij 2024-02-15  432  		/* This GPIO is not optional at this point */
db93c3de09384e Linus Walleij 2024-02-15  433  		ena = devm_gpiod_get(dev, "enable", GPIOD_OUT_HIGH);
db93c3de09384e Linus Walleij 2024-02-15  434  		if (IS_ERR(ena))
db93c3de09384e Linus Walleij 2024-02-15  435  			return PTR_ERR(ena);
f6130be652d0b4 Ashish Jangam 2012-11-01  436  
db93c3de09384e Linus Walleij 2024-02-15  437  		config->ena_gpiod = ena;
f6130be652d0b4 Ashish Jangam 2012-11-01  438  
f6130be652d0b4 Ashish Jangam 2012-11-01  439  		/*
f6130be652d0b4 Ashish Jangam 2012-11-01  440  		 * GPI pin is muxed with regulator to control the
f6130be652d0b4 Ashish Jangam 2012-11-01  441  		 * regulator state.
f6130be652d0b4 Ashish Jangam 2012-11-01  442  		 */
db93c3de09384e Linus Walleij 2024-02-15  443  		gpiod_set_consumer_name(ren, "DA9055 ren GPI");
f6130be652d0b4 Ashish Jangam 2012-11-01  444  
f6130be652d0b4 Ashish Jangam 2012-11-01  445  		/*
f6130be652d0b4 Ashish Jangam 2012-11-01  446  		 * Let the regulator know that its state is controlled
f6130be652d0b4 Ashish Jangam 2012-11-01  447  		 * through GPI.
f6130be652d0b4 Ashish Jangam 2012-11-01  448  		 */
f6130be652d0b4 Ashish Jangam 2012-11-01  449  		ret = da9055_reg_update(regulator->da9055, info->conf.reg,
f6130be652d0b4 Ashish Jangam 2012-11-01  450  					DA9055_E_GPI_MASK,
f6130be652d0b4 Ashish Jangam 2012-11-01  451  					pdata->reg_ren[id]
f6130be652d0b4 Ashish Jangam 2012-11-01  452  					<< DA9055_E_GPI_SHIFT);
f6130be652d0b4 Ashish Jangam 2012-11-01  453  		if (ret < 0)
db93c3de09384e Linus Walleij 2024-02-15  454  			return ret;
f6130be652d0b4 Ashish Jangam 2012-11-01  455  	}
f6130be652d0b4 Ashish Jangam 2012-11-01  456  
db93c3de09384e Linus Walleij 2024-02-15  457  	/* Look for "regulator-select-gpios" GPIOs in the regulator node */
db93c3de09384e Linus Walleij 2024-02-15  458  	rsel = devm_gpiod_get_optional(dev, "regulator-select", GPIOD_IN);
db93c3de09384e Linus Walleij 2024-02-15  459  	if (IS_ERR(rsel))
db93c3de09384e Linus Walleij 2024-02-15  460  		return PTR_ERR(rsel);
f6130be652d0b4 Ashish Jangam 2012-11-01  461  
db93c3de09384e Linus Walleij 2024-02-15  462  	if (rsel) {
f6130be652d0b4 Ashish Jangam 2012-11-01  463  		regulator->reg_rselect = pdata->reg_rsel[id];
f6130be652d0b4 Ashish Jangam 2012-11-01  464  
f6130be652d0b4 Ashish Jangam 2012-11-01  465  		/*
f6130be652d0b4 Ashish Jangam 2012-11-01  466  		 * GPI pin is muxed with regulator to select the
f6130be652d0b4 Ashish Jangam 2012-11-01  467  		 * regulator register set A/B for voltage ramping.
f6130be652d0b4 Ashish Jangam 2012-11-01  468  		 */
db93c3de09384e Linus Walleij 2024-02-15  469  		gpiod_set_consumer_name(rsel, "DA9055 rsel GPI");
f6130be652d0b4 Ashish Jangam 2012-11-01  470  
f6130be652d0b4 Ashish Jangam 2012-11-01  471  		/*
f6130be652d0b4 Ashish Jangam 2012-11-01  472  		 * Let the regulator know that its register set A/B
f6130be652d0b4 Ashish Jangam 2012-11-01  473  		 * will be selected through GPI for voltage ramping.
f6130be652d0b4 Ashish Jangam 2012-11-01  474  		 */
f6130be652d0b4 Ashish Jangam 2012-11-01  475  		ret = da9055_reg_update(regulator->da9055, info->conf.reg,
f6130be652d0b4 Ashish Jangam 2012-11-01  476  					DA9055_V_GPI_MASK,
f6130be652d0b4 Ashish Jangam 2012-11-01  477  					pdata->reg_rsel[id]
f6130be652d0b4 Ashish Jangam 2012-11-01  478  					<< DA9055_V_GPI_SHIFT);
f6130be652d0b4 Ashish Jangam 2012-11-01  479  	}
f6130be652d0b4 Ashish Jangam 2012-11-01  480  
f6130be652d0b4 Ashish Jangam 2012-11-01 @481  	return ret;
f6130be652d0b4 Ashish Jangam 2012-11-01  482  }
f6130be652d0b4 Ashish Jangam 2012-11-01  483  

:::::: The code at line 481 was first introduced by commit
:::::: f6130be652d0b4fbf710d83a816298c007e59ed1 regulator: DA9055 regulator driver

:::::: TO: Ashish Jangam <ashish.jangam@kpitcummins.com>
:::::: CC: Mark Brown <broonie@opensource.wolfsonmicro.com>

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

             reply	other threads:[~2024-02-19 22:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-19 22:14 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-02-20  5:15 [linusw-gpio:b4/descriptors-regulators 3/6] drivers/regulator/da9055-regulator.c:481 da9055_gpio_init() error: uninitialized symbol 'ret' Dan Carpenter

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=202402200604.tilWhpaa-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.