* [pwm:for-4.11/drivers 1/3] drivers/pwm/pwm-pca9685.c:171:15: error: 'offset' redeclared as different kind of symbol
@ 2017-01-18 14:43 kbuild test robot
2017-01-18 15:32 ` Mika Westerberg
0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2017-01-18 14:43 UTC (permalink / raw)
To: Mika Westerberg; +Cc: kbuild-all, linux-pwm, Thierry Reding
[-- Attachment #1: Type: text/plain, Size: 1588 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm.git for-4.11/drivers
head: 9a8be0b9496a69ac30a2b2529104459d944d6d6c
commit: aba48949e7d5f83dcf08924ce09dd8951b419222 [1/3] pwm: pca9685: Allow any of the 16 PWMs to be used as a GPIO
config: x86_64-randconfig-x014-201703 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
git checkout aba48949e7d5f83dcf08924ce09dd8951b419222
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
drivers/pwm/pwm-pca9685.c: In function 'pca9685_pwm_gpio_set':
>> drivers/pwm/pwm-pca9685.c:171:15: error: 'offset' redeclared as different kind of symbol
unsigned int offset;
^~~~~~
drivers/pwm/pwm-pca9685.c:166:71: note: previous definition of 'offset' was here
static void pca9685_pwm_gpio_set(struct gpio_chip *gpio, unsigned int offset,
^~~~~~
vim +/offset +171 drivers/pwm/pwm-pca9685.c
165
166 static void pca9685_pwm_gpio_set(struct gpio_chip *gpio, unsigned int offset,
167 int value)
168 {
169 struct pca9685 *pca = gpiochip_get_data(gpio);
170 struct pwm_device *pwm = &pca->chip.pwms[offset];
> 171 unsigned int offset;
172
173 /* Clear both OFF registers */
174 offset = LED_N_OFF_L(pwm->hwpwm);
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29016 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [pwm:for-4.11/drivers 1/3] drivers/pwm/pwm-pca9685.c:171:15: error: 'offset' redeclared as different kind of symbol 2017-01-18 14:43 [pwm:for-4.11/drivers 1/3] drivers/pwm/pwm-pca9685.c:171:15: error: 'offset' redeclared as different kind of symbol kbuild test robot @ 2017-01-18 15:32 ` Mika Westerberg 2017-01-18 23:56 ` Thierry Reding 0 siblings, 1 reply; 3+ messages in thread From: Mika Westerberg @ 2017-01-18 15:32 UTC (permalink / raw) To: kbuild test robot; +Cc: kbuild-all, linux-pwm, Thierry Reding On Wed, Jan 18, 2017 at 10:43:20PM +0800, kbuild test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm.git for-4.11/drivers > head: 9a8be0b9496a69ac30a2b2529104459d944d6d6c > commit: aba48949e7d5f83dcf08924ce09dd8951b419222 [1/3] pwm: pca9685: Allow any of the 16 PWMs to be used as a GPIO > config: x86_64-randconfig-x014-201703 (attached as .config) > compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 > reproduce: > git checkout aba48949e7d5f83dcf08924ce09dd8951b419222 > # save the attached .config to linux build tree > make ARCH=x86_64 > > All errors (new ones prefixed by >>): > > drivers/pwm/pwm-pca9685.c: In function 'pca9685_pwm_gpio_set': > >> drivers/pwm/pwm-pca9685.c:171:15: error: 'offset' redeclared as different kind of symbol > unsigned int offset; > ^~~~~~ > drivers/pwm/pwm-pca9685.c:166:71: note: previous definition of 'offset' was here > static void pca9685_pwm_gpio_set(struct gpio_chip *gpio, unsigned int offset, > ^~~~~~ This was due to the stylistic changes, I think. The original patch did compile ;-) Here is the fixup. Let me know if you prefer an incremental patch instead. diff --git a/drivers/pwm/pwm-pca9685.c b/drivers/pwm/pwm-pca9685.c index 019d0cc95d10..bbf408c332fa 100644 --- a/drivers/pwm/pwm-pca9685.c +++ b/drivers/pwm/pwm-pca9685.c @@ -168,17 +168,17 @@ static void pca9685_pwm_gpio_set(struct gpio_chip *gpio, unsigned int offset, { struct pca9685 *pca = gpiochip_get_data(gpio); struct pwm_device *pwm = &pca->chip.pwms[offset]; - unsigned int offset; + unsigned int reg; /* Clear both OFF registers */ - offset = LED_N_OFF_L(pwm->hwpwm); - regmap_write(pca->regmap, offset, 0); - offset = LED_N_OFF_H(pwm->hwpwm); - regmap_write(pca->regmap, offset, 0); + reg = LED_N_OFF_L(pwm->hwpwm); + regmap_write(pca->regmap, reg, 0); + reg = LED_N_OFF_H(pwm->hwpwm); + regmap_write(pca->regmap, reg, 0); /* Set the full ON bit */ - offset = LED_N_ON_H(pwm->hwpwm); - regmap_write(pca->regmap, offset, value ? LED_FULL : 0); + reg = LED_N_ON_H(pwm->hwpwm); + regmap_write(pca->regmap, reg, value ? LED_FULL : 0); } static int pca9685_pwm_gpio_get_direction(struct gpio_chip *chip, ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [pwm:for-4.11/drivers 1/3] drivers/pwm/pwm-pca9685.c:171:15: error: 'offset' redeclared as different kind of symbol 2017-01-18 15:32 ` Mika Westerberg @ 2017-01-18 23:56 ` Thierry Reding 0 siblings, 0 replies; 3+ messages in thread From: Thierry Reding @ 2017-01-18 23:56 UTC (permalink / raw) To: Mika Westerberg; +Cc: kbuild test robot, kbuild-all, linux-pwm [-- Attachment #1: Type: text/plain, Size: 1706 bytes --] On Wed, Jan 18, 2017 at 05:32:11PM +0200, Mika Westerberg wrote: > On Wed, Jan 18, 2017 at 10:43:20PM +0800, kbuild test robot wrote: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm.git for-4.11/drivers > > head: 9a8be0b9496a69ac30a2b2529104459d944d6d6c > > commit: aba48949e7d5f83dcf08924ce09dd8951b419222 [1/3] pwm: pca9685: Allow any of the 16 PWMs to be used as a GPIO > > config: x86_64-randconfig-x014-201703 (attached as .config) > > compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 > > reproduce: > > git checkout aba48949e7d5f83dcf08924ce09dd8951b419222 > > # save the attached .config to linux build tree > > make ARCH=x86_64 > > > > All errors (new ones prefixed by >>): > > > > drivers/pwm/pwm-pca9685.c: In function 'pca9685_pwm_gpio_set': > > >> drivers/pwm/pwm-pca9685.c:171:15: error: 'offset' redeclared as different kind of symbol > > unsigned int offset; > > ^~~~~~ > > drivers/pwm/pwm-pca9685.c:166:71: note: previous definition of 'offset' was here > > static void pca9685_pwm_gpio_set(struct gpio_chip *gpio, unsigned int offset, > > ^~~~~~ > > This was due to the stylistic changes, I think. The original patch did > compile ;-) > > Here is the fixup. Let me know if you prefer an incremental patch > instead. Yeah, that's what I get for trying to rush things. I've fixed it up by simply not using a local variable at all for the register offset. Looks like I might have missed today's linux-next fetch window, so the same report might come in for next-20160119. Thierry [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-19 0:03 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-01-18 14:43 [pwm:for-4.11/drivers 1/3] drivers/pwm/pwm-pca9685.c:171:15: error: 'offset' redeclared as different kind of symbol kbuild test robot 2017-01-18 15:32 ` Mika Westerberg 2017-01-18 23:56 ` Thierry Reding
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.