* [PATCH] GPIO: Fix checkpatch.pl issues
@ 2015-06-08 19:03 Daniel Lockyer
2015-06-10 2:17 ` Alexandre Courbot
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Lockyer @ 2015-06-08 19:03 UTC (permalink / raw)
To: linus.walleij; +Cc: gnurou, linux-gpio
Fixed issues include indenting and spacing. Nothing particularly
notable.
Signed-off-by: Daniel Lockyer <thisisdaniellockyer@gmail.com>
---
drivers/gpio/gpio-altera.c | 3 ++-
drivers/gpio/gpio-crystalcove.c | 3 +--
drivers/gpio/gpio-f7188x.c | 4 ++--
drivers/gpio/gpio-it8761e.c | 2 +-
drivers/gpio/gpiolib.c | 19 ++++++++-----------
5 files changed, 14 insertions(+), 17 deletions(-)
diff --git a/drivers/gpio/gpio-altera.c b/drivers/gpio/gpio-altera.c
index 449fb46..0f3d336 100644
--- a/drivers/gpio/gpio-altera.c
+++ b/drivers/gpio/gpio-altera.c
@@ -107,7 +107,8 @@ static int altera_gpio_irq_set_type(struct irq_data *d,
return -EINVAL;
}
-static unsigned int altera_gpio_irq_startup(struct irq_data *d) {
+static unsigned int altera_gpio_irq_startup(struct irq_data *d)
+{
altera_gpio_irq_unmask(d);
return 0;
diff --git a/drivers/gpio/gpio-crystalcove.c b/drivers/gpio/gpio-crystalcove.c
index 91a7ffe..326f27b 100644
--- a/drivers/gpio/gpio-crystalcove.c
+++ b/drivers/gpio/gpio-crystalcove.c
@@ -94,9 +94,8 @@ static inline int to_reg(int gpio, enum ctrl_register reg_type)
{
int reg;
- if (gpio == 94) {
+ if (gpio == 94)
return GPIOPANELCTL;
- }
if (reg_type == CTRL_IN) {
if (gpio < 8)
diff --git a/drivers/gpio/gpio-f7188x.c b/drivers/gpio/gpio-f7188x.c
index dbda843..5e3c4fa 100644
--- a/drivers/gpio/gpio-f7188x.c
+++ b/drivers/gpio/gpio-f7188x.c
@@ -172,7 +172,7 @@ static struct f7188x_gpio_bank f71869a_gpio_bank[] = {
};
static struct f7188x_gpio_bank f71882_gpio_bank[] = {
- F7188X_GPIO_BANK(0 , 8, 0xF0),
+ F7188X_GPIO_BANK(0, 8, 0xF0),
F7188X_GPIO_BANK(10, 8, 0xE0),
F7188X_GPIO_BANK(20, 8, 0xD0),
F7188X_GPIO_BANK(30, 4, 0xC0),
@@ -180,7 +180,7 @@ static struct f7188x_gpio_bank f71882_gpio_bank[] = {
};
static struct f7188x_gpio_bank f71889_gpio_bank[] = {
- F7188X_GPIO_BANK(0 , 7, 0xF0),
+ F7188X_GPIO_BANK(0, 7, 0xF0),
F7188X_GPIO_BANK(10, 7, 0xE0),
F7188X_GPIO_BANK(20, 8, 0xD0),
F7188X_GPIO_BANK(30, 8, 0xC0),
diff --git a/drivers/gpio/gpio-it8761e.c b/drivers/gpio/gpio-it8761e.c
index dadfc24..30a8f24 100644
--- a/drivers/gpio/gpio-it8761e.c
+++ b/drivers/gpio/gpio-it8761e.c
@@ -123,7 +123,7 @@ static void it8761e_gpio_set(struct gpio_chip *gc,
curr_vals = inb(reg);
if (val)
- outb(curr_vals | (1 << bit) , reg);
+ outb(curr_vals | (1 << bit), reg);
else
outb(curr_vals & ~(1 << bit), reg);
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 6bc612b..f2cab60 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1300,9 +1300,8 @@ static void gpio_chip_set_multiple(struct gpio_chip *chip,
continue;
}
/* set outputs if the corresponding mask bit is set */
- if (__test_and_clear_bit(i, mask)) {
- chip->set(chip, i, test_bit(i, bits));
- }
+ if (__test_and_clear_bit(i, mask))
+ chip->set(chip, i, test_bit(i, bits));}
}
}
}
@@ -1320,9 +1319,9 @@ static void gpiod_set_array_priv(bool raw, bool can_sleep,
unsigned long bits[BITS_TO_LONGS(chip->ngpio)];
int count = 0;
- if (!can_sleep) {
+ if (!can_sleep)
WARN_ON(chip->can_sleep);
- }
+
memset(mask, 0, sizeof(mask));
do {
struct gpio_desc *desc = desc_array[i];
@@ -1337,24 +1336,22 @@ static void gpiod_set_array_priv(bool raw, bool can_sleep,
* open drain and open source outputs are set individually
*/
if (test_bit(FLAG_OPEN_DRAIN, &desc->flags)) {
- _gpio_set_open_drain_value(desc,value);
+ _gpio_set_open_drain_value(desc, value);
} else if (test_bit(FLAG_OPEN_SOURCE, &desc->flags)) {
_gpio_set_open_source_value(desc, value);
} else {
__set_bit(hwgpio, mask);
- if (value) {
+ if (value)
__set_bit(hwgpio, bits);
- } else {
+ else
__clear_bit(hwgpio, bits);
- }
count++;
}
i++;
} while ((i < array_size) && (desc_array[i]->chip == chip));
/* push collected bits to outputs */
- if (count != 0) {
+ if (count != 0)
gpio_chip_set_multiple(chip, mask, bits);
- }
}
}
--
2.4.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] GPIO: Fix checkpatch.pl issues
2015-06-08 19:03 [PATCH] GPIO: Fix checkpatch.pl issues Daniel Lockyer
@ 2015-06-10 2:17 ` Alexandre Courbot
2015-06-10 13:18 ` Daniel Lockyer
0 siblings, 1 reply; 3+ messages in thread
From: Alexandre Courbot @ 2015-06-10 2:17 UTC (permalink / raw)
To: Daniel Lockyer; +Cc: Linus Walleij, linux-gpio@vger.kernel.org
On Tue, Jun 9, 2015 at 4:03 AM, Daniel Lockyer
<thisisdaniellockyer@gmail.com> wrote:
> diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> index 6bc612b..f2cab60 100644
> --- a/drivers/gpio/gpiolib.c
> +++ b/drivers/gpio/gpiolib.c
> @@ -1300,9 +1300,8 @@ static void gpio_chip_set_multiple(struct gpio_chip *chip,
> continue;
> }
> /* set outputs if the corresponding mask bit is set */
> - if (__test_and_clear_bit(i, mask)) {
> - chip->set(chip, i, test_bit(i, bits));
> - }
> + if (__test_and_clear_bit(i, mask))
> + chip->set(chip, i, test_bit(i, bits));}
That closing bracket at the end of the line does not look like it
should be here. Does gpiolib even compile after this?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] GPIO: Fix checkpatch.pl issues
2015-06-10 2:17 ` Alexandre Courbot
@ 2015-06-10 13:18 ` Daniel Lockyer
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Lockyer @ 2015-06-10 13:18 UTC (permalink / raw)
To: Alexandre Courbot; +Cc: Linus Walleij, linux-gpio@vger.kernel.org
On Wed, Jun 10, 2015 at 11:17:10AM +0900, Alexandre Courbot wrote:
> On Tue, Jun 9, 2015 at 4:03 AM, Daniel Lockyer
> <thisisdaniellockyer@gmail.com> wrote:
> > diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> > index 6bc612b..f2cab60 100644
> > --- a/drivers/gpio/gpiolib.c
> > +++ b/drivers/gpio/gpiolib.c
> > @@ -1300,9 +1300,8 @@ static void gpio_chip_set_multiple(struct gpio_chip *chip,
> > continue;
> > }
> > /* set outputs if the corresponding mask bit is set */
> > - if (__test_and_clear_bit(i, mask)) {
> > - chip->set(chip, i, test_bit(i, bits));
> > - }
> > + if (__test_and_clear_bit(i, mask))
> > + chip->set(chip, i, test_bit(i, bits));}
>
> That closing bracket at the end of the line does not look like it
> should be here. Does gpiolib even compile after this?
I apologise... not sure what went on here.
New patch will be coming through soon.
Daniel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-06-10 13:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-08 19:03 [PATCH] GPIO: Fix checkpatch.pl issues Daniel Lockyer
2015-06-10 2:17 ` Alexandre Courbot
2015-06-10 13:18 ` Daniel Lockyer
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).