LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] regulator: wm8350: Remove unused variable
@ 2015-02-26  4:54 Fabio Estevam
  2015-02-26  8:49 ` Geert Uytterhoeven
  2015-03-05 17:56 ` Mark Brown
  0 siblings, 2 replies; 6+ messages in thread
From: Fabio Estevam @ 2015-02-26  4:54 UTC (permalink / raw)
  To: broonie; +Cc: geert+renesas, linux-kernel, Fabio Estevam

From: Fabio Estevam <fabio.estevam@freescale.com>

Commit 8f45acb5f9f34eab ("regulator: wm8350: Pass NULL data with REGULATION_OUT
and UNDER_VOLTAGE events") introduced the following build warning:

drivers/regulator/wm8350-regulator.c: In function 'pmic_uv_handler':
drivers/regulator/wm8350-regulator.c:1154:17: warning: unused variable 'wm8350' [-Wunused-variable]

Remove 'wm8350' as it is unused now.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/regulator/wm8350-regulator.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c
index 78efead..95f6b04 100644
--- a/drivers/regulator/wm8350-regulator.c
+++ b/drivers/regulator/wm8350-regulator.c
@@ -1151,7 +1151,6 @@ static const struct regulator_desc wm8350_reg[NUM_WM8350_REGULATORS] = {
 static irqreturn_t pmic_uv_handler(int irq, void *data)
 {
 	struct regulator_dev *rdev = (struct regulator_dev *)data;
-	struct wm8350 *wm8350 = rdev_get_drvdata(rdev);
 
 	mutex_lock(&rdev->mutex);
 	if (irq == WM8350_IRQ_CS1 || irq == WM8350_IRQ_CS2)
-- 
1.9.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] regulator: wm8350: Remove unused variable
  2015-02-26  4:54 [PATCH] regulator: wm8350: Remove unused variable Fabio Estevam
@ 2015-02-26  8:49 ` Geert Uytterhoeven
  2015-03-05 17:56 ` Mark Brown
  1 sibling, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2015-02-26  8:49 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Mark Brown, Geert Uytterhoeven, linux-kernel, Fabio Estevam

On Thu, Feb 26, 2015 at 5:54 AM, Fabio Estevam <festevam@gmail.com> wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> Commit 8f45acb5f9f34eab ("regulator: wm8350: Pass NULL data with REGULATION_OUT
> and UNDER_VOLTAGE events") introduced the following build warning:
>
> drivers/regulator/wm8350-regulator.c: In function 'pmic_uv_handler':
> drivers/regulator/wm8350-regulator.c:1154:17: warning: unused variable 'wm8350' [-Wunused-variable]
>
> Remove 'wm8350' as it is unused now.

Thanks!

> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] regulator: wm8350: Remove unused variable
  2015-02-26  4:54 [PATCH] regulator: wm8350: Remove unused variable Fabio Estevam
  2015-02-26  8:49 ` Geert Uytterhoeven
@ 2015-03-05 17:56 ` Mark Brown
  1 sibling, 0 replies; 6+ messages in thread
From: Mark Brown @ 2015-03-05 17:56 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: geert+renesas, linux-kernel, Fabio Estevam

[-- Attachment #1: Type: text/plain, Size: 294 bytes --]

On Thu, Feb 26, 2015 at 01:54:51AM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Commit 8f45acb5f9f34eab ("regulator: wm8350: Pass NULL data with REGULATION_OUT
> and UNDER_VOLTAGE events") introduced the following build warning:

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] regulator: wm8350: remove unused variable
  2015-02-26 10:29 [PATCH] regulator: wm8350: remove " Arnd Bergmann
  2015-02-26 13:32 ` Geert Uytterhoeven
@ 2015-03-05 17:56 ` Mark Brown
  1 sibling, 0 replies; 6+ messages in thread
From: Mark Brown @ 2015-03-05 17:56 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: lgirdwood, linux-kernel, linux-arm-kernel, Geert Uytterhoeven

[-- Attachment #1: Type: text/plain, Size: 199 bytes --]

On Thu, Feb 26, 2015 at 11:29:29AM +0100, Arnd Bergmann wrote:
> After the only user of the variable has been removed, we get a valid gcc
> warning about it:

I applied another fix for this, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] regulator: wm8350: remove unused variable
  2015-02-26 10:29 [PATCH] regulator: wm8350: remove " Arnd Bergmann
@ 2015-02-26 13:32 ` Geert Uytterhoeven
  2015-03-05 17:56 ` Mark Brown
  1 sibling, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2015-02-26 13:32 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Mark Brown, Liam Girdwood, linux-kernel, linux-arm-kernel,
	Geert Uytterhoeven

On Thu, Feb 26, 2015 at 11:29 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> After the only user of the variable has been removed, we get a valid gcc
> warning about it:
>
> regulator/wm8350-regulator.c:1154:17: warning: unused variable 'wm8350' [-Wunused-variable]
>
> The obvious fix is to remove the variable as well.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 8f45acb5f9f34 ("regulator: wm8350: Pass NULL data with REGULATION_OUT and UNDER_VOLTAGE events")

Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>

Mea culpa. Second ack on the same patch today...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] regulator: wm8350: remove unused variable
@ 2015-02-26 10:29 Arnd Bergmann
  2015-02-26 13:32 ` Geert Uytterhoeven
  2015-03-05 17:56 ` Mark Brown
  0 siblings, 2 replies; 6+ messages in thread
From: Arnd Bergmann @ 2015-02-26 10:29 UTC (permalink / raw)
  To: broonie; +Cc: lgirdwood, linux-kernel, linux-arm-kernel, Geert Uytterhoeven

After the only user of the variable has been removed, we get a valid gcc
warning about it:

regulator/wm8350-regulator.c:1154:17: warning: unused variable 'wm8350' [-Wunused-variable]

The obvious fix is to remove the variable as well.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 8f45acb5f9f34 ("regulator: wm8350: Pass NULL data with REGULATION_OUT and UNDER_VOLTAGE events")

diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c
index 78efead3b39f..95f6b040186e 100644
--- a/drivers/regulator/wm8350-regulator.c
+++ b/drivers/regulator/wm8350-regulator.c
@@ -1151,7 +1151,6 @@ static const struct regulator_desc wm8350_reg[NUM_WM8350_REGULATORS] = {
 static irqreturn_t pmic_uv_handler(int irq, void *data)
 {
 	struct regulator_dev *rdev = (struct regulator_dev *)data;
-	struct wm8350 *wm8350 = rdev_get_drvdata(rdev);
 
 	mutex_lock(&rdev->mutex);
 	if (irq == WM8350_IRQ_CS1 || irq == WM8350_IRQ_CS2)


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-03-05 17:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-26  4:54 [PATCH] regulator: wm8350: Remove unused variable Fabio Estevam
2015-02-26  8:49 ` Geert Uytterhoeven
2015-03-05 17:56 ` Mark Brown
2015-02-26 10:29 [PATCH] regulator: wm8350: remove " Arnd Bergmann
2015-02-26 13:32 ` Geert Uytterhoeven
2015-03-05 17:56 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).