[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <201511031529.kQjO7Bx0%fengguang.wu@intel.com>
Date: Tue, 3 Nov 2015 15:04:31 +0800
From: kbuild test robot <lkp@...el.com>
To: Mark Brown <broonie@...nel.org>
Cc: kbuild-all@...org, Liam Girdwood <lgirdwood@...il.com>,
John Stultz <john.stultz@...aro.org>,
linux-kernel@...r.kernel.org, Mark Brown <broonie@...nel.org>
Subject: Re: [PATCH] regulator: Use regulator_lock_supply() for get_voltage()
too
Hi Mark,
[auto build test WARNING on regulator/for-next -- if it's inappropriate base, please suggest rules for selecting the more suitable base]
url: https://github.com/0day-ci/linux/commits/Mark-Brown/regulator-Use-regulator_lock_supply-for-get_voltage-too/20151103-144509
config: x86_64-randconfig-x013-11022153 (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
drivers/regulator/core.c: In function '_regulator_get_voltage':
>> drivers/regulator/core.c:3113:32: warning: passing argument 1 of '_regulator_get_voltage' from incompatible pointer type [-Wincompatible-pointer-types]
ret = _regulator_get_voltage(rdev->supply);
^
drivers/regulator/core.c:3097:12: note: expected 'struct regulator_dev *' but argument is of type 'struct regulator *'
static int _regulator_get_voltage(struct regulator_dev *rdev)
^
drivers/regulator/core.c: In function 'regulator_get_voltage':
>> drivers/regulator/core.c:3140:26: warning: passing argument 1 of 'regulator_unlock_supply' from incompatible pointer type [-Wincompatible-pointer-types]
regulator_unlock_supply(®ulator->rdev->mutex);
^
drivers/regulator/core.c:159:13: note: expected 'struct regulator_dev *' but argument is of type 'struct mutex *'
static void regulator_unlock_supply(struct regulator_dev *rdev)
^
vim +/_regulator_get_voltage +3113 drivers/regulator/core.c
3107 ret = rdev->desc->ops->get_voltage(rdev);
3108 } else if (rdev->desc->ops->list_voltage) {
3109 ret = rdev->desc->ops->list_voltage(rdev, 0);
3110 } else if (rdev->desc->fixed_uV && (rdev->desc->n_voltages == 1)) {
3111 ret = rdev->desc->fixed_uV;
3112 } else if (rdev->supply) {
> 3113 ret = _regulator_get_voltage(rdev->supply);
3114 } else {
3115 return -EINVAL;
3116 }
3117
3118 if (ret < 0)
3119 return ret;
3120 return ret - rdev->constraints->uV_offset;
3121 }
3122
3123 /**
3124 * regulator_get_voltage - get regulator output voltage
3125 * @regulator: regulator source
3126 *
3127 * This returns the current regulator voltage in uV.
3128 *
3129 * NOTE: If the regulator is disabled it will return the voltage value. This
3130 * function should not be used to determine regulator state.
3131 */
3132 int regulator_get_voltage(struct regulator *regulator)
3133 {
3134 int ret;
3135
3136 regulator_lock_supply(regulator->rdev);
3137
3138 ret = _regulator_get_voltage(regulator->rdev);
3139
> 3140 regulator_unlock_supply(®ulator->rdev->mutex);
3141
3142 return ret;
3143 }
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/octet-stream" (26049 bytes)
Powered by blists - more mailing lists