From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: kbuild test robot <fengguang.wu@intel.com>
Cc: kbuild-all@01.org, linux-pwm@vger.kernel.org,
Thierry Reding <thierry.reding@gmail.com>
Subject: Re: [pwm:for-4.11/drivers 1/3] drivers/pwm/pwm-pca9685.c:171:15: error: 'offset' redeclared as different kind of symbol
Date: Wed, 18 Jan 2017 17:32:11 +0200 [thread overview]
Message-ID: <20170118153211.GR2023@lahna.fi.intel.com> (raw)
In-Reply-To: <201701182217.IBub4l8v%fengguang.wu@intel.com>
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,
next prev parent reply other threads:[~2017-01-18 15:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2017-01-18 23:56 ` Thierry Reding
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=20170118153211.GR2023@lahna.fi.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=fengguang.wu@intel.com \
--cc=kbuild-all@01.org \
--cc=linux-pwm@vger.kernel.org \
--cc=thierry.reding@gmail.com \
/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.