Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1732025 > unrolled thread

[PATCH] gpio: thunderx: remove unused .map() hook from irq_domain_ops

Started byMasahiro Yamada <yamada.masahiro@socionext.com>
First post2017-09-14 05:00 +0200
Last post2017-09-22 15:40 +0200
Articles 4 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] gpio: thunderx: remove unused .map() hook from irq_domain_ops Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-09-14 05:00 +0200
    Re: [PATCH] gpio: thunderx: remove unused .map() hook from irq_domain_ops Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-09-15 03:50 +0200
    Re: [PATCH] gpio: thunderx: remove unused .map() hook from irq_domain_ops Linus Walleij <linus.walleij@linaro.org> - 2017-09-21 13:40 +0200
    Re: [PATCH] gpio: thunderx: remove unused .map() hook from irq_domain_ops Linus Walleij <linus.walleij@linaro.org> - 2017-09-22 15:40 +0200

#1732025 — [PATCH] gpio: thunderx: remove unused .map() hook from irq_domain_ops

FromMasahiro Yamada <yamada.masahiro@socionext.com>
Date2017-09-14 05:00 +0200
Subject[PATCH] gpio: thunderx: remove unused .map() hook from irq_domain_ops
Message-ID<upsxI-7uE-9@gated-at.bofh.it>
This driver implements .alloc() hook, so .map() is not used.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/gpio/gpio-thunderx.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/drivers/gpio/gpio-thunderx.c b/drivers/gpio/gpio-thunderx.c
index 57efb25..b5adb79 100644
--- a/drivers/gpio/gpio-thunderx.c
+++ b/drivers/gpio/gpio-thunderx.c
@@ -417,18 +417,6 @@ static struct irq_chip thunderx_gpio_irq_chip = {
 	.flags			= IRQCHIP_SET_TYPE_MASKED
 };
 
-static int thunderx_gpio_irq_map(struct irq_domain *d, unsigned int irq,
-				 irq_hw_number_t hwirq)
-{
-	struct thunderx_gpio *txgpio = d->host_data;
-
-	if (hwirq >= txgpio->chip.ngpio)
-		return -EINVAL;
-	if (!thunderx_gpio_is_gpio_nowarn(txgpio, hwirq))
-		return -EPERM;
-	return 0;
-}
-
 static int thunderx_gpio_irq_translate(struct irq_domain *d,
 				       struct irq_fwspec *fwspec,
 				       irq_hw_number_t *hwirq,
@@ -455,7 +443,6 @@ static int thunderx_gpio_irq_alloc(struct irq_domain *d, unsigned int virq,
 }
 
 static const struct irq_domain_ops thunderx_gpio_irqd_ops = {
-	.map		= thunderx_gpio_irq_map,
 	.alloc		= thunderx_gpio_irq_alloc,
 	.translate	= thunderx_gpio_irq_translate
 };
-- 
2.7.4

[toc] | [next] | [standalone]


#1732671

FromMasahiro Yamada <yamada.masahiro@socionext.com>
Date2017-09-15 03:50 +0200
Message-ID<upNVv-4u2-1@gated-at.bofh.it>
In reply to#1732025
Hi David,

2017-09-15 1:59 GMT+09:00 David Daney <ddaney@caviumnetworks.com>:
> On 09/13/2017 07:37 PM, Masahiro Yamada wrote:
>>
>> This driver implements .alloc() hook, so .map() is not used.
>>
>
> Have you tested this?


No.  I do not have access to this hardware.

It is just, in my understanding,
.alloc() and .map() are exclusive.



> I will have to test this on a real system next week before I can really
> comment on it.
>
> David.
>
>
>
>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>> ---
>>
>>   drivers/gpio/gpio-thunderx.c | 13 -------------
>>   1 file changed, 13 deletions(-)
>>
>> diff --git a/drivers/gpio/gpio-thunderx.c b/drivers/gpio/gpio-thunderx.c
>> index 57efb25..b5adb79 100644
>> --- a/drivers/gpio/gpio-thunderx.c
>> +++ b/drivers/gpio/gpio-thunderx.c
>> @@ -417,18 +417,6 @@ static struct irq_chip thunderx_gpio_irq_chip = {
>>         .flags                  = IRQCHIP_SET_TYPE_MASKED
>>   };
>>   -static int thunderx_gpio_irq_map(struct irq_domain *d, unsigned int
>> irq,
>> -                                irq_hw_number_t hwirq)
>> -{
>> -       struct thunderx_gpio *txgpio = d->host_data;
>> -
>> -       if (hwirq >= txgpio->chip.ngpio)
>> -               return -EINVAL;
>> -       if (!thunderx_gpio_is_gpio_nowarn(txgpio, hwirq))
>> -               return -EPERM;
>> -       return 0;
>> -}
>> -
>>   static int thunderx_gpio_irq_translate(struct irq_domain *d,
>>                                        struct irq_fwspec *fwspec,
>>                                        irq_hw_number_t *hwirq,
>> @@ -455,7 +443,6 @@ static int thunderx_gpio_irq_alloc(struct irq_domain
>> *d, unsigned int virq,
>>   }
>>     static const struct irq_domain_ops thunderx_gpio_irqd_ops = {
>> -       .map            = thunderx_gpio_irq_map,
>>         .alloc          = thunderx_gpio_irq_alloc,
>>         .translate      = thunderx_gpio_irq_translate
>>   };
>>
> --
> 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



-- 
Best Regards
Masahiro Yamada

[toc] | [prev] | [next] | [standalone]


#1736585

FromLinus Walleij <linus.walleij@linaro.org>
Date2017-09-21 13:40 +0200
Message-ID<us7ZN-o2-23@gated-at.bofh.it>
In reply to#1732025
On Thu, Sep 14, 2017 at 4:37 AM, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:

> This driver implements .alloc() hook, so .map() is not used.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

Waiting for David to test this patch before applying.

Yours,
Linus Walleij

[toc] | [prev] | [next] | [standalone]


#1737505

FromLinus Walleij <linus.walleij@linaro.org>
Date2017-09-22 15:40 +0200
Message-ID<uswlr-6DX-9@gated-at.bofh.it>
In reply to#1732025
On Thu, Sep 14, 2017 at 4:37 AM, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:

> This driver implements .alloc() hook, so .map() is not used.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

Patch applied with David's Tested-by.

Yours,
Linus Walleij

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web