2021-09-16 11:21:54

by Kunihiko Hayashi

[permalink] [raw]
Subject: [PATCH 0/3] gpio: uniphier: Misc fixes

This patch series includes fixes and changes for UniPhier GPIO driver.

Patch 1 is to remove the return value of each function according to
the return type of irq_chip callback functions.

Patch 2 is to replace direct access to IRQ hardware number with
helper functions.

Patch 3 is to replace direct access to private data from IRQ data
with helper functions.

Kunihiko Hayashi (3):
gpio: uniphier: Fix void functions to remove return value
gpio: uniphier: Use helper function to get IRQ hardware number
gpio: uniphier: Use helper functions to get private data from IRQ data

drivers/gpio/gpio-uniphier.c | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)

--
2.7.4


2021-09-16 11:22:31

by Kunihiko Hayashi

[permalink] [raw]
Subject: [PATCH 3/3] gpio: uniphier: Use helper functions to get private data from IRQ data

Use helper functions to get private data from IRQ data instead of direct
access. No functional changes intended.

Signed-off-by: Kunihiko Hayashi <[email protected]>
---
drivers/gpio/gpio-uniphier.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-uniphier.c b/drivers/gpio/gpio-uniphier.c
index dca96f5..19ce667 100644
--- a/drivers/gpio/gpio-uniphier.c
+++ b/drivers/gpio/gpio-uniphier.c
@@ -179,7 +179,7 @@ static int uniphier_gpio_to_irq(struct gpio_chip *chip, unsigned int offset)

static void uniphier_gpio_irq_mask(struct irq_data *data)
{
- struct uniphier_gpio_priv *priv = data->chip_data;
+ struct uniphier_gpio_priv *priv = irq_data_get_irq_chip_data(data);
u32 mask = BIT(irqd_to_hwirq(data));

uniphier_gpio_reg_update(priv, UNIPHIER_GPIO_IRQ_EN, mask, 0);
@@ -189,7 +189,7 @@ static void uniphier_gpio_irq_mask(struct irq_data *data)

static void uniphier_gpio_irq_unmask(struct irq_data *data)
{
- struct uniphier_gpio_priv *priv = data->chip_data;
+ struct uniphier_gpio_priv *priv = irq_data_get_irq_chip_data(data);
u32 mask = BIT(irqd_to_hwirq(data));

uniphier_gpio_reg_update(priv, UNIPHIER_GPIO_IRQ_EN, mask, mask);
@@ -199,7 +199,7 @@ static void uniphier_gpio_irq_unmask(struct irq_data *data)

static int uniphier_gpio_irq_set_type(struct irq_data *data, unsigned int type)
{
- struct uniphier_gpio_priv *priv = data->chip_data;
+ struct uniphier_gpio_priv *priv = irq_data_get_irq_chip_data(data);
u32 mask = BIT(irqd_to_hwirq(data));
u32 val = 0;

--
2.7.4

2021-09-22 09:24:20

by Bartosz Golaszewski

[permalink] [raw]
Subject: Re: [PATCH 0/3] gpio: uniphier: Misc fixes

On Thu, Sep 16, 2021 at 1:19 PM Kunihiko Hayashi
<[email protected]> wrote:
>
> This patch series includes fixes and changes for UniPhier GPIO driver.
>
> Patch 1 is to remove the return value of each function according to
> the return type of irq_chip callback functions.
>
> Patch 2 is to replace direct access to IRQ hardware number with
> helper functions.
>
> Patch 3 is to replace direct access to private data from IRQ data
> with helper functions.
>
> Kunihiko Hayashi (3):
> gpio: uniphier: Fix void functions to remove return value
> gpio: uniphier: Use helper function to get IRQ hardware number
> gpio: uniphier: Use helper functions to get private data from IRQ data
>
> drivers/gpio/gpio-uniphier.c | 22 ++++++++++++----------
> 1 file changed, 12 insertions(+), 10 deletions(-)
>
> --
> 2.7.4
>

All three applied. Thanks!

Bartosz