diff mbox

[gpio-next] gpio: mockup: remove unused variable gc

Message ID 20170824113422.22214-1-colin.king@canonical.com
State New
Headers show

Commit Message

Colin Ian King Aug. 24, 2017, 11:34 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

The variable gc is assigned but never read and is redundant. Remove it.
Cleans up clang warning:

drivers/gpio/gpio-mockup.c:169:2: warning: Value stored to 'gc' is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/gpio/gpio-mockup.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Linus Walleij Aug. 31, 2017, 1:21 p.m. UTC | #1
On Thu, Aug 24, 2017 at 1:34 PM, Colin King <colin.king@canonical.com> wrote:

> From: Colin Ian King <colin.king@canonical.com>
>
> The variable gc is assigned but never read and is redundant. Remove it.
> Cleans up clang warning:
>
> drivers/gpio/gpio-mockup.c:169:2: warning: Value stored to 'gc' is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Patch applied.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/gpio/gpio-mockup.c b/drivers/gpio/gpio-mockup.c
index 6db7163e6d98..9532d86a82f7 100644
--- a/drivers/gpio/gpio-mockup.c
+++ b/drivers/gpio/gpio-mockup.c
@@ -153,7 +153,6 @@  static ssize_t gpio_mockup_event_write(struct file *file,
 	struct gpio_mockup_chip *chip;
 	struct seq_file *sfile;
 	struct gpio_desc *desc;
-	struct gpio_chip *gc;
 	int rv, val;
 
 	rv = kstrtoint_from_user(usr_buf, size, 0, &val);
@@ -166,7 +165,6 @@  static ssize_t gpio_mockup_event_write(struct file *file,
 	priv = sfile->private;
 	desc = priv->desc;
 	chip = priv->chip;
-	gc = &chip->gc;
 
 	gpiod_set_value_cansleep(desc, val);
 	irq_sim_fire(&chip->irqsim, priv->offset);