* [PATCH] gpio: bcm281xx: Use "unsigned gpio" consistently throughout the code
@ 2014-01-28 1:32 Markus Mayer
2014-01-31 11:40 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: Markus Mayer @ 2014-01-28 1:32 UTC (permalink / raw)
To: Linus Walleij, Alexandre Courbot
Cc: Linaro Patches, Linux GPIO List, Linux Kernel Mailing List,
Tim Kryger, Markus Mayer
This patch removes some inconsistencies caused by the use of "int gpio"
in some parts of the code and "unsigned gpio" in others.
Signed-off-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
---
drivers/gpio/gpio-bcm-kona.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c
index e5aa4d0..b4f20f7 100644
--- a/drivers/gpio/gpio-bcm-kona.c
+++ b/drivers/gpio/gpio-bcm-kona.c
@@ -323,7 +323,7 @@ static void bcm_kona_gpio_irq_ack(struct irq_data *d)
{
struct bcm_kona_gpio *kona_gpio;
void __iomem *reg_base;
- int gpio = d->hwirq;
+ unsigned gpio = d->hwirq;
int bank_id = GPIO_BANK(gpio);
int bit = GPIO_BIT(gpio);
u32 val;
@@ -344,7 +344,7 @@ static void bcm_kona_gpio_irq_mask(struct irq_data *d)
{
struct bcm_kona_gpio *kona_gpio;
void __iomem *reg_base;
- int gpio = d->hwirq;
+ unsigned gpio = d->hwirq;
int bank_id = GPIO_BANK(gpio);
int bit = GPIO_BIT(gpio);
u32 val;
@@ -365,7 +365,7 @@ static void bcm_kona_gpio_irq_unmask(struct irq_data *d)
{
struct bcm_kona_gpio *kona_gpio;
void __iomem *reg_base;
- int gpio = d->hwirq;
+ unsigned gpio = d->hwirq;
int bank_id = GPIO_BANK(gpio);
int bit = GPIO_BIT(gpio);
u32 val;
@@ -386,7 +386,7 @@ static int bcm_kona_gpio_irq_set_type(struct irq_data *d, unsigned int type)
{
struct bcm_kona_gpio *kona_gpio;
void __iomem *reg_base;
- int gpio = d->hwirq;
+ unsigned gpio = d->hwirq;
u32 lvl_type;
u32 val;
unsigned long flags;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] gpio: bcm281xx: Use "unsigned gpio" consistently throughout the code
2014-01-28 1:32 [PATCH] gpio: bcm281xx: Use "unsigned gpio" consistently throughout the code Markus Mayer
@ 2014-01-31 11:40 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2014-01-31 11:40 UTC (permalink / raw)
To: Markus Mayer
Cc: Alexandre Courbot, Linaro Patches, Linux GPIO List,
Linux Kernel Mailing List, Tim Kryger
On Tue, Jan 28, 2014 at 2:32 AM, Markus Mayer <markus.mayer@linaro.org> wrote:
> This patch removes some inconsistencies caused by the use of "int gpio"
> in some parts of the code and "unsigned gpio" in others.
>
> Signed-off-by: Markus Mayer <markus.mayer@linaro.org>
> Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Patch applied, nice for static syntax checkers.
But the variable should probably be renamed from
"gpio" to "offset" since it's a local offset number on this
very GPIO block, not the global GPIO numberspace.
No big deal though.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-31 11:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-28 1:32 [PATCH] gpio: bcm281xx: Use "unsigned gpio" consistently throughout the code Markus Mayer
2014-01-31 11:40 ` Linus Walleij
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).