All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next 1/3] spmi: pmic-arb: select IRQ_DOMAIN_HIERARCHY in Kconfig
@ 2019-02-14  1:36 Brian Masney
  2019-02-14  1:36 ` [PATCH -next 2/3] mfd: pm8xxx: " Brian Masney
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Brian Masney @ 2019-02-14  1:36 UTC (permalink / raw)
  To: linus.walleij
  Cc: sboyd, lee.jones, andy.gross, david.brown, bjorn.andersson,
	linux-arm-msm, linux-kernel, linux-gpio

Select IRQ_DOMAIN_HIERARCHY for pmic-arb in Kconfig since this driver
uses the version 2 IRQ interfaces. IRQ_DOMAIN_HIERARCHY selects
IRQ_DOMAIN, so it can be removed from here.

Signed-off-by: Brian Masney <masneyb@onstation.org>
---
This addresses a build failure found by make randconfig in linux-next:
https://lore.kernel.org/lkml/fb0508f1-131d-ff17-9b5d-123ec75275dd@infradead.org/

 drivers/spmi/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spmi/Kconfig b/drivers/spmi/Kconfig
index 0d3b70b3bda8..d48ed7c2c6c4 100644
--- a/drivers/spmi/Kconfig
+++ b/drivers/spmi/Kconfig
@@ -12,7 +12,7 @@ if SPMI
 
 config SPMI_MSM_PMIC_ARB
 	tristate "Qualcomm MSM SPMI Controller (PMIC Arbiter)"
-	select IRQ_DOMAIN
+	select IRQ_DOMAIN_HIERARCHY
 	depends on ARCH_QCOM || COMPILE_TEST
 	depends on HAS_IOMEM
 	default ARCH_QCOM
-- 
2.17.2

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

* [PATCH -next 2/3] mfd: pm8xxx: select IRQ_DOMAIN_HIERARCHY in Kconfig
  2019-02-14  1:36 [PATCH -next 1/3] spmi: pmic-arb: select IRQ_DOMAIN_HIERARCHY in Kconfig Brian Masney
@ 2019-02-14  1:36 ` Brian Masney
  2019-02-14  8:17   ` Linus Walleij
  2019-02-14  1:36 ` [PATCH -next 3/3] qcom: ssbi-gpio: correct boundary conditions in pm8xxx_domain_translate Brian Masney
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Brian Masney @ 2019-02-14  1:36 UTC (permalink / raw)
  To: linus.walleij
  Cc: sboyd, lee.jones, andy.gross, david.brown, bjorn.andersson,
	linux-arm-msm, linux-kernel, linux-gpio

Select IRQ_DOMAIN_HIERARCHY for pm8xxx in Kconfig since this driver uses
the version 2 IRQ interfaces. IRQ_DOMAIN_HIERARCHY selects IRQ_DOMAIN,
so it can be removed from here.

Signed-off-by: Brian Masney <masneyb@onstation.org>
---
Linus: For your ib-qcom-ssbi branch.

 drivers/mfd/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index c9ffe8efcbb6..8f316a820b38 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -927,7 +927,7 @@ config UCB1400_CORE
 config MFD_PM8XXX
 	tristate "Qualcomm PM8xxx PMIC chips driver"
 	depends on (ARM || HEXAGON || COMPILE_TEST)
-	select IRQ_DOMAIN
+	select IRQ_DOMAIN_HIERARCHY
 	select MFD_CORE
 	select REGMAP
 	help
-- 
2.17.2

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

* [PATCH -next 3/3] qcom: ssbi-gpio: correct boundary conditions in pm8xxx_domain_translate
  2019-02-14  1:36 [PATCH -next 1/3] spmi: pmic-arb: select IRQ_DOMAIN_HIERARCHY in Kconfig Brian Masney
  2019-02-14  1:36 ` [PATCH -next 2/3] mfd: pm8xxx: " Brian Masney
@ 2019-02-14  1:36 ` Brian Masney
  2019-02-14  8:18   ` Linus Walleij
  2019-02-14 12:22   ` Marc Gonzalez
  2019-02-14  1:54 ` [PATCH -next 1/3] spmi: pmic-arb: select IRQ_DOMAIN_HIERARCHY in Kconfig Randy Dunlap
  2019-02-14  8:15 ` Linus Walleij
  3 siblings, 2 replies; 10+ messages in thread
From: Brian Masney @ 2019-02-14  1:36 UTC (permalink / raw)
  To: linus.walleij
  Cc: sboyd, lee.jones, andy.gross, david.brown, bjorn.andersson,
	linux-arm-msm, linux-kernel, linux-gpio

SSBI GPIOs are numbered 1..ngpio, so the boundary check in
pm8xxx_domain_translate() is off by one. This patch corrects that check.

Signed-off-by: Brian Masney <masneyb@onstation.org>
---
Originally found by Bjorn Andersson in spmi-gpio.

Linus: For your ib-qcom-ssbi branch.

 drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c b/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
index 84a232450000..10575d6e2ba5 100644
--- a/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
+++ b/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
@@ -710,7 +710,8 @@ static int pm8xxx_domain_translate(struct irq_domain *domain,
 	struct pm8xxx_gpio *pctrl = container_of(domain->host_data,
 						 struct pm8xxx_gpio, chip);
 
-	if (fwspec->param_count != 2 || fwspec->param[0] >= pctrl->chip.ngpio)
+	if (fwspec->param_count != 2 || fwspec->param[0] < 1 ||
+	    fwspec->param[0] > pctrl->chip.ngpio)
 		return -EINVAL;
 
 	*hwirq = fwspec->param[0] - PM8XXX_GPIO_PHYSICAL_OFFSET;
-- 
2.17.2

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

* Re: [PATCH -next 1/3] spmi: pmic-arb: select IRQ_DOMAIN_HIERARCHY in Kconfig
  2019-02-14  1:36 [PATCH -next 1/3] spmi: pmic-arb: select IRQ_DOMAIN_HIERARCHY in Kconfig Brian Masney
  2019-02-14  1:36 ` [PATCH -next 2/3] mfd: pm8xxx: " Brian Masney
  2019-02-14  1:36 ` [PATCH -next 3/3] qcom: ssbi-gpio: correct boundary conditions in pm8xxx_domain_translate Brian Masney
@ 2019-02-14  1:54 ` Randy Dunlap
  2019-02-14  8:15 ` Linus Walleij
  3 siblings, 0 replies; 10+ messages in thread
From: Randy Dunlap @ 2019-02-14  1:54 UTC (permalink / raw)
  To: Brian Masney, linus.walleij
  Cc: sboyd, lee.jones, andy.gross, david.brown, bjorn.andersson,
	linux-arm-msm, linux-kernel, linux-gpio

On 2/13/19 5:36 PM, Brian Masney wrote:
> Select IRQ_DOMAIN_HIERARCHY for pmic-arb in Kconfig since this driver
> uses the version 2 IRQ interfaces. IRQ_DOMAIN_HIERARCHY selects
> IRQ_DOMAIN, so it can be removed from here.
> 
> Signed-off-by: Brian Masney <masneyb@onstation.org>

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested

Thanks.

> ---
> This addresses a build failure found by make randconfig in linux-next:
> https://lore.kernel.org/lkml/fb0508f1-131d-ff17-9b5d-123ec75275dd@infradead.org/
> 
>  drivers/spmi/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/spmi/Kconfig b/drivers/spmi/Kconfig
> index 0d3b70b3bda8..d48ed7c2c6c4 100644
> --- a/drivers/spmi/Kconfig
> +++ b/drivers/spmi/Kconfig
> @@ -12,7 +12,7 @@ if SPMI
>  
>  config SPMI_MSM_PMIC_ARB
>  	tristate "Qualcomm MSM SPMI Controller (PMIC Arbiter)"
> -	select IRQ_DOMAIN
> +	select IRQ_DOMAIN_HIERARCHY
>  	depends on ARCH_QCOM || COMPILE_TEST
>  	depends on HAS_IOMEM
>  	default ARCH_QCOM
> 


-- 
~Randy

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

* Re: [PATCH -next 1/3] spmi: pmic-arb: select IRQ_DOMAIN_HIERARCHY in Kconfig
  2019-02-14  1:36 [PATCH -next 1/3] spmi: pmic-arb: select IRQ_DOMAIN_HIERARCHY in Kconfig Brian Masney
                   ` (2 preceding siblings ...)
  2019-02-14  1:54 ` [PATCH -next 1/3] spmi: pmic-arb: select IRQ_DOMAIN_HIERARCHY in Kconfig Randy Dunlap
@ 2019-02-14  8:15 ` Linus Walleij
  3 siblings, 0 replies; 10+ messages in thread
From: Linus Walleij @ 2019-02-14  8:15 UTC (permalink / raw)
  To: Brian Masney
  Cc: Stephen Boyd, Lee Jones, Andy Gross, David Brown,
	Bjorn Andersson, linux-arm-msm, linux-kernel,
	open list:GPIO SUBSYSTEM

On Thu, Feb 14, 2019 at 2:36 AM Brian Masney <masneyb@onstation.org> wrote:

> Select IRQ_DOMAIN_HIERARCHY for pmic-arb in Kconfig since this driver
> uses the version 2 IRQ interfaces. IRQ_DOMAIN_HIERARCHY selects
> IRQ_DOMAIN, so it can be removed from here.
>
> Signed-off-by: Brian Masney <masneyb@onstation.org>

Patch applied on the devel branch with Randy's tags!

Yours,
Linus Walleij

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

* Re: [PATCH -next 2/3] mfd: pm8xxx: select IRQ_DOMAIN_HIERARCHY in Kconfig
  2019-02-14  1:36 ` [PATCH -next 2/3] mfd: pm8xxx: " Brian Masney
@ 2019-02-14  8:17   ` Linus Walleij
  2019-02-14  8:51     ` Lee Jones
  0 siblings, 1 reply; 10+ messages in thread
From: Linus Walleij @ 2019-02-14  8:17 UTC (permalink / raw)
  To: Brian Masney
  Cc: Stephen Boyd, Lee Jones, Andy Gross, David Brown,
	Bjorn Andersson, linux-arm-msm, linux-kernel,
	open list:GPIO SUBSYSTEM

On Thu, Feb 14, 2019 at 2:36 AM Brian Masney <masneyb@onstation.org> wrote:

> Select IRQ_DOMAIN_HIERARCHY for pm8xxx in Kconfig since this driver uses
> the version 2 IRQ interfaces. IRQ_DOMAIN_HIERARCHY selects IRQ_DOMAIN,
> so it can be removed from here.
>
> Signed-off-by: Brian Masney <masneyb@onstation.org>
> ---
> Linus: For your ib-qcom-ssbi branch.

OK applied it there (might fold it in with the original patch, let's see).

Yours,
Linus Walleij

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

* Re: [PATCH -next 3/3] qcom: ssbi-gpio: correct boundary conditions in pm8xxx_domain_translate
  2019-02-14  1:36 ` [PATCH -next 3/3] qcom: ssbi-gpio: correct boundary conditions in pm8xxx_domain_translate Brian Masney
@ 2019-02-14  8:18   ` Linus Walleij
  2019-02-14 12:22   ` Marc Gonzalez
  1 sibling, 0 replies; 10+ messages in thread
From: Linus Walleij @ 2019-02-14  8:18 UTC (permalink / raw)
  To: Brian Masney
  Cc: Stephen Boyd, Lee Jones, Andy Gross, David Brown,
	Bjorn Andersson, linux-arm-msm, linux-kernel,
	open list:GPIO SUBSYSTEM

On Thu, Feb 14, 2019 at 2:36 AM Brian Masney <masneyb@onstation.org> wrote:

> SSBI GPIOs are numbered 1..ngpio, so the boundary check in
> pm8xxx_domain_translate() is off by one. This patch corrects that check.
>
> Signed-off-by: Brian Masney <masneyb@onstation.org>
> ---
> Originally found by Bjorn Andersson in spmi-gpio.
>
> Linus: For your ib-qcom-ssbi branch.

Thanks applied it there!

This small bug stuff is sorting itself out nicely :)
Less stuff to deal with in the -rc phase.

Yours,
Linus Walleij

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

* Re: [PATCH -next 2/3] mfd: pm8xxx: select IRQ_DOMAIN_HIERARCHY in Kconfig
  2019-02-14  8:17   ` Linus Walleij
@ 2019-02-14  8:51     ` Lee Jones
  2019-02-14  9:02       ` Linus Walleij
  0 siblings, 1 reply; 10+ messages in thread
From: Lee Jones @ 2019-02-14  8:51 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Brian Masney, Stephen Boyd, Andy Gross, David Brown,
	Bjorn Andersson, linux-arm-msm, linux-kernel,
	open list:GPIO SUBSYSTEM

On Thu, 14 Feb 2019, Linus Walleij wrote:

> On Thu, Feb 14, 2019 at 2:36 AM Brian Masney <masneyb@onstation.org> wrote:
> 
> > Select IRQ_DOMAIN_HIERARCHY for pm8xxx in Kconfig since this driver uses
> > the version 2 IRQ interfaces. IRQ_DOMAIN_HIERARCHY selects IRQ_DOMAIN,
> > so it can be removed from here.
> >
> > Signed-off-by: Brian Masney <masneyb@onstation.org>
> > ---
> > Linus: For your ib-qcom-ssbi branch.
> 
> OK applied it there (might fold it in with the original patch, let's see).

Ah, we're applying patches from different SS without Acks now? ;)

FWIW:

  Acked-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH -next 2/3] mfd: pm8xxx: select IRQ_DOMAIN_HIERARCHY in Kconfig
  2019-02-14  8:51     ` Lee Jones
@ 2019-02-14  9:02       ` Linus Walleij
  0 siblings, 0 replies; 10+ messages in thread
From: Linus Walleij @ 2019-02-14  9:02 UTC (permalink / raw)
  To: Lee Jones
  Cc: Brian Masney, Stephen Boyd, Andy Gross, David Brown,
	Bjorn Andersson, linux-arm-msm, linux-kernel,
	open list:GPIO SUBSYSTEM

On Thu, Feb 14, 2019 at 9:51 AM Lee Jones <lee.jones@linaro.org> wrote:
> On Thu, 14 Feb 2019, Linus Walleij wrote:
> > On Thu, Feb 14, 2019 at 2:36 AM Brian Masney <masneyb@onstation.org> wrote:
> >
> > > Select IRQ_DOMAIN_HIERARCHY for pm8xxx in Kconfig since this driver uses
> > > the version 2 IRQ interfaces. IRQ_DOMAIN_HIERARCHY selects IRQ_DOMAIN,
> > > so it can be removed from here.
> > >
> > > Signed-off-by: Brian Masney <masneyb@onstation.org>
> > > ---
> > > Linus: For your ib-qcom-ssbi branch.
> >
> > OK applied it there (might fold it in with the original patch, let's see).
>
> Ah, we're applying patches from different SS without Acks now? ;)

Yeah when fixing onelined bugs I tend to do that sometimes,
usually better to ask forgiveness than permission if -next is broken.

> FWIW:
>
>   Acked-by: Lee Jones <lee.jones@linaro.org>

OK folding it in!

Yours,
Linus Walleij

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

* Re: [PATCH -next 3/3] qcom: ssbi-gpio: correct boundary conditions in pm8xxx_domain_translate
  2019-02-14  1:36 ` [PATCH -next 3/3] qcom: ssbi-gpio: correct boundary conditions in pm8xxx_domain_translate Brian Masney
  2019-02-14  8:18   ` Linus Walleij
@ 2019-02-14 12:22   ` Marc Gonzalez
  1 sibling, 0 replies; 10+ messages in thread
From: Marc Gonzalez @ 2019-02-14 12:22 UTC (permalink / raw)
  To: Brian Masney, linus.walleij
  Cc: sboyd, lee.jones, andy.gross, david.brown, bjorn.andersson,
	linux-arm-msm, linux-kernel, linux-gpio

On 14/02/2019 02:36, Brian Masney wrote:

> SSBI GPIOs are numbered 1..ngpio, so the boundary check in
> pm8xxx_domain_translate() is off by one. This patch corrects that check.
> 
> Signed-off-by: Brian Masney <masneyb@onstation.org>
> ---
> Originally found by Bjorn Andersson in spmi-gpio.
> 
> Linus: For your ib-qcom-ssbi branch.
> 
>  drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c b/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
> index 84a232450000..10575d6e2ba5 100644
> --- a/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
> +++ b/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
> @@ -710,7 +710,8 @@ static int pm8xxx_domain_translate(struct irq_domain *domain,
>  	struct pm8xxx_gpio *pctrl = container_of(domain->host_data,
>  						 struct pm8xxx_gpio, chip);
>  
> -	if (fwspec->param_count != 2 || fwspec->param[0] >= pctrl->chip.ngpio)
> +	if (fwspec->param_count != 2 || fwspec->param[0] < 1 ||
> +	    fwspec->param[0] > pctrl->chip.ngpio)
>  		return -EINVAL;
>  
>  	*hwirq = fwspec->param[0] - PM8XXX_GPIO_PHYSICAL_OFFSET;

I would write (using the wrap-around behavior for unsigned int)

	if (fwspec->param_count != 2 || fwspec->param[0] - 1 >= pctrl->chip.ngpio)
		return -EINVAL;

Regards.

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

end of thread, other threads:[~2019-02-14 12:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-14  1:36 [PATCH -next 1/3] spmi: pmic-arb: select IRQ_DOMAIN_HIERARCHY in Kconfig Brian Masney
2019-02-14  1:36 ` [PATCH -next 2/3] mfd: pm8xxx: " Brian Masney
2019-02-14  8:17   ` Linus Walleij
2019-02-14  8:51     ` Lee Jones
2019-02-14  9:02       ` Linus Walleij
2019-02-14  1:36 ` [PATCH -next 3/3] qcom: ssbi-gpio: correct boundary conditions in pm8xxx_domain_translate Brian Masney
2019-02-14  8:18   ` Linus Walleij
2019-02-14 12:22   ` Marc Gonzalez
2019-02-14  1:54 ` [PATCH -next 1/3] spmi: pmic-arb: select IRQ_DOMAIN_HIERARCHY in Kconfig Randy Dunlap
2019-02-14  8:15 ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.