linux-pwm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers/gpio : Remove redundant clearing of IRQ_TYPE_SENSE_MASK
@ 2023-05-30 16:20 Lizhe
  2023-05-30 16:30 ` Bartosz Golaszewski
  2023-05-30 16:43 ` Russell King (Oracle)
  0 siblings, 2 replies; 5+ messages in thread
From: Lizhe @ 2023-05-30 16:20 UTC (permalink / raw)
  To: andrew, sebastian.hesselbarth, gregory.clement, linux,
	thierry.reding, u.kleine-koenig, linus.walleij, brgl
  Cc: linux-arm-kernel, linux-kernel, linux-pwm, linux-gpio, Lizhe

Before executing microchip_sgpio_irq_set_type(),
type has already been cleared IRQ_TYPE_SENSE_MASK, see __irq_set_trigger().

Signed-off-by: Lizhe <sensor1010@163.com>
---
 arch/arm/plat-orion/gpio.c | 1 -
 drivers/gpio/gpio-mvebu.c  | 1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c
index 595e9cb33c1d..863fa497b1a2 100644
--- a/arch/arm/plat-orion/gpio.c
+++ b/arch/arm/plat-orion/gpio.c
@@ -364,7 +364,6 @@ static int gpio_irq_set_type(struct irq_data *d, u32 type)
 		return -EINVAL;
 	}
 
-	type &= IRQ_TYPE_SENSE_MASK;
 	if (type == IRQ_TYPE_NONE)
 		return -EINVAL;
 
diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index a68f682aec01..34fd007b0308 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -505,7 +505,6 @@ static int mvebu_gpio_irq_set_type(struct irq_data *d, unsigned int type)
 	if ((u & BIT(pin)) == 0)
 		return -EINVAL;
 
-	type &= IRQ_TYPE_SENSE_MASK;
 	if (type == IRQ_TYPE_NONE)
 		return -EINVAL;
 
-- 
2.34.1


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

* Re: [PATCH] drivers/gpio : Remove redundant clearing of IRQ_TYPE_SENSE_MASK
  2023-05-30 16:20 [PATCH] drivers/gpio : Remove redundant clearing of IRQ_TYPE_SENSE_MASK Lizhe
@ 2023-05-30 16:30 ` Bartosz Golaszewski
  2023-05-30 16:43 ` Russell King (Oracle)
  1 sibling, 0 replies; 5+ messages in thread
From: Bartosz Golaszewski @ 2023-05-30 16:30 UTC (permalink / raw)
  To: Lizhe
  Cc: andrew, sebastian.hesselbarth, gregory.clement, linux,
	thierry.reding, u.kleine-koenig, linus.walleij, linux-arm-kernel,
	linux-kernel, linux-pwm, linux-gpio

On Tue, May 30, 2023 at 6:21 PM Lizhe <sensor1010@163.com> wrote:
>
> Before executing microchip_sgpio_irq_set_type(),
> type has already been cleared IRQ_TYPE_SENSE_MASK, see __irq_set_trigger().
>
> Signed-off-by: Lizhe <sensor1010@163.com>
> ---
>  arch/arm/plat-orion/gpio.c | 1 -
>  drivers/gpio/gpio-mvebu.c  | 1 -
>  2 files changed, 2 deletions(-)
>
> diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c
> index 595e9cb33c1d..863fa497b1a2 100644
> --- a/arch/arm/plat-orion/gpio.c
> +++ b/arch/arm/plat-orion/gpio.c
> @@ -364,7 +364,6 @@ static int gpio_irq_set_type(struct irq_data *d, u32 type)
>                 return -EINVAL;
>         }
>
> -       type &= IRQ_TYPE_SENSE_MASK;
>         if (type == IRQ_TYPE_NONE)
>                 return -EINVAL;
>

What have you not understood about splitting this into two patches?

Bart

> diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
> index a68f682aec01..34fd007b0308 100644
> --- a/drivers/gpio/gpio-mvebu.c
> +++ b/drivers/gpio/gpio-mvebu.c
> @@ -505,7 +505,6 @@ static int mvebu_gpio_irq_set_type(struct irq_data *d, unsigned int type)
>         if ((u & BIT(pin)) == 0)
>                 return -EINVAL;
>
> -       type &= IRQ_TYPE_SENSE_MASK;
>         if (type == IRQ_TYPE_NONE)
>                 return -EINVAL;
>
> --
> 2.34.1
>

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

* Re: [PATCH] drivers/gpio : Remove redundant clearing of IRQ_TYPE_SENSE_MASK
  2023-05-30 16:20 [PATCH] drivers/gpio : Remove redundant clearing of IRQ_TYPE_SENSE_MASK Lizhe
  2023-05-30 16:30 ` Bartosz Golaszewski
@ 2023-05-30 16:43 ` Russell King (Oracle)
  1 sibling, 0 replies; 5+ messages in thread
From: Russell King (Oracle) @ 2023-05-30 16:43 UTC (permalink / raw)
  To: Lizhe
  Cc: andrew, sebastian.hesselbarth, gregory.clement, thierry.reding,
	u.kleine-koenig, linus.walleij, brgl, linux-arm-kernel,
	linux-kernel, linux-pwm, linux-gpio

On Wed, May 31, 2023 at 12:20:34AM +0800, Lizhe wrote:
> Before executing microchip_sgpio_irq_set_type(),
> type has already been cleared IRQ_TYPE_SENSE_MASK, see __irq_set_trigger().
> 
> Signed-off-by: Lizhe <sensor1010@163.com>

Please do as Bart has requested.

Your patch touches two files, each of which are managed by *different*
people via *different* trees. Re-posting your patch will *not* get it
applied, because the reason it can't be applied is because you have not
split it as people have asked you to do.

So, there is no point you re-posting it in its current form. You will
only make people frustrated, and if that continues, you will end up
being ignored.

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

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

* Re: [PATCH] drivers/gpio : Remove redundant clearing of IRQ_TYPE_SENSE_MASK
  2023-05-19 17:16 Lizhe
@ 2023-05-23  8:29 ` Bartosz Golaszewski
  0 siblings, 0 replies; 5+ messages in thread
From: Bartosz Golaszewski @ 2023-05-23  8:29 UTC (permalink / raw)
  To: Lizhe
  Cc: andrew, sebastian.hesselbarth, gregory.clement, linux,
	thierry.reding, u.kleine-koenig, linus.walleij, linux-arm-kernel,
	linux-kernel, linux-pwm, linux-gpio

On Fri, May 19, 2023 at 7:17 PM Lizhe <sensor1010@163.com> wrote:
>
> Before executing microchip_sgpio_irq_set_type(),
> type has already been cleared IRQ_TYPE_SENSE_MASK, see __irq_set_trigger().
>
> Signed-off-by: Lizhe <sensor1010@163.com>
> ---
>  arch/arm/plat-orion/gpio.c | 1 -
>  drivers/gpio/gpio-mvebu.c  | 1 -
>  2 files changed, 2 deletions(-)
>
> diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c
> index 595e9cb33c1d..863fa497b1a2 100644
> --- a/arch/arm/plat-orion/gpio.c
> +++ b/arch/arm/plat-orion/gpio.c
> @@ -364,7 +364,6 @@ static int gpio_irq_set_type(struct irq_data *d, u32 type)
>                 return -EINVAL;
>         }
>
> -       type &= IRQ_TYPE_SENSE_MASK;
>         if (type == IRQ_TYPE_NONE)
>                 return -EINVAL;
>
> diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
> index a68f682aec01..34fd007b0308 100644
> --- a/drivers/gpio/gpio-mvebu.c
> +++ b/drivers/gpio/gpio-mvebu.c
> @@ -505,7 +505,6 @@ static int mvebu_gpio_irq_set_type(struct irq_data *d, unsigned int type)
>         if ((u & BIT(pin)) == 0)
>                 return -EINVAL;
>
> -       type &= IRQ_TYPE_SENSE_MASK;
>         if (type == IRQ_TYPE_NONE)
>                 return -EINVAL;
>
> --
> 2.34.1
>

Please split it into two patches. I can apply the second part but
arch/arm is beyond my jurisdiction.

While at it: is this platform even used at all? If so, then maybe we
could migrate this driver to drivers/gpio/?

Bart

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

* [PATCH] drivers/gpio : Remove redundant clearing of IRQ_TYPE_SENSE_MASK
@ 2023-05-19 17:16 Lizhe
  2023-05-23  8:29 ` Bartosz Golaszewski
  0 siblings, 1 reply; 5+ messages in thread
From: Lizhe @ 2023-05-19 17:16 UTC (permalink / raw)
  To: andrew, sebastian.hesselbarth, gregory.clement, linux,
	thierry.reding, u.kleine-koenig, linus.walleij, brgl
  Cc: linux-arm-kernel, linux-kernel, linux-pwm, linux-gpio, Lizhe

Before executing microchip_sgpio_irq_set_type(),
type has already been cleared IRQ_TYPE_SENSE_MASK, see __irq_set_trigger().

Signed-off-by: Lizhe <sensor1010@163.com>
---
 arch/arm/plat-orion/gpio.c | 1 -
 drivers/gpio/gpio-mvebu.c  | 1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c
index 595e9cb33c1d..863fa497b1a2 100644
--- a/arch/arm/plat-orion/gpio.c
+++ b/arch/arm/plat-orion/gpio.c
@@ -364,7 +364,6 @@ static int gpio_irq_set_type(struct irq_data *d, u32 type)
 		return -EINVAL;
 	}
 
-	type &= IRQ_TYPE_SENSE_MASK;
 	if (type == IRQ_TYPE_NONE)
 		return -EINVAL;
 
diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index a68f682aec01..34fd007b0308 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -505,7 +505,6 @@ static int mvebu_gpio_irq_set_type(struct irq_data *d, unsigned int type)
 	if ((u & BIT(pin)) == 0)
 		return -EINVAL;
 
-	type &= IRQ_TYPE_SENSE_MASK;
 	if (type == IRQ_TYPE_NONE)
 		return -EINVAL;
 
-- 
2.34.1


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

end of thread, other threads:[~2023-05-30 16:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-30 16:20 [PATCH] drivers/gpio : Remove redundant clearing of IRQ_TYPE_SENSE_MASK Lizhe
2023-05-30 16:30 ` Bartosz Golaszewski
2023-05-30 16:43 ` Russell King (Oracle)
  -- strict thread matches above, loose matches on Subject: below --
2023-05-19 17:16 Lizhe
2023-05-23  8:29 ` Bartosz Golaszewski

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).