spmi: pmic-arb: select IRQ_DOMAIN_HIERARCHY in Kconfig
Subsystems (7)
PATCH 1/3 spmi: pmic-arb: select IRQ_DOMAIN_HIERARCHY in Kconfig
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.
---
This addresses a build failure found by make randconfig in linux-next:
https://lore.kernel.org/lkml/[email protected]/
drivers/spmi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spmi/Kconfig +1 -1
@@ -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
Signature · 1 line
2.17.2
PATCH 2/3 mfd: pm8xxx: select IRQ_DOMAIN_HIERARCHY in Kconfig
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.
---
Linus: For your ib-qcom-ssbi branch.
drivers/mfd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/Kconfig +1 -1
@@ -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
Signature · 1 line
2.17.2
Re: [PATCH -next 2/3] mfd: pm8xxx: select IRQ_DOMAIN_HIERARCHY in Kconfig
Quoted 7 lines · Brian Masney
Select
IRQ_DOMAIN_HIERARCHYfor pm8xxx inKconfigsince this driver uses the version 2 IRQ interfaces.IRQ_DOMAIN_HIERARCHYselectsIRQ_DOMAIN, so it can be removed from here.Signed-off-by Brian Masney <[email protected]>---
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
Lee Jones
Acked-byRe: [PATCH -next 2/3] mfd: pm8xxx: select IRQ_DOMAIN_HIERARCHY in Kconfig
Quoted 11 lines · Linus Walleij
Quoted 7 lines · Brian Masney
Select
IRQ_DOMAIN_HIERARCHYfor pm8xxx inKconfigsince this driver uses the version 2 IRQ interfaces.IRQ_DOMAIN_HIERARCHYselectsIRQ_DOMAIN, so it can be removed from here.Signed-off-by Brian Masney <[email protected]>---
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:
Signature · 4 lines
Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH -next 2/3] mfd: pm8xxx: select IRQ_DOMAIN_HIERARCHY in Kconfig
Quoted 7 lines · Lee Jones
Quoted 6 lines · Linus Walleij
Quoted 4 lines · Brian Masney
Select
IRQ_DOMAIN_HIERARCHYfor pm8xxx inKconfigsince this driver uses the version 2 IRQ interfaces.IRQ_DOMAIN_HIERARCHYselectsIRQ_DOMAIN, so it can be removed from here.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Signed-off-by Brian Masney <[email protected]>---
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.
Quoted 3 lines
FWIW:
Acked-by Lee Jones <[email protected]>
OK folding it in!
Yours,
Linus Walleij
PATCH 3/3 qcom: ssbi-gpio: correct boundary conditions in pm8xxx_domain_translate
In reply to Brian MasneySSBI GPIOs are numbered 1..ngpio, so the boundary check in pm8xxx_domain_translate() is off by one. This patch corrects that check.
---
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(-)
drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c +2 -1
@@ -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 ;
Signature · 1 line
2.17.2
Linus Walleij
AppliedRe: [PATCH -next 3/3] qcom: ssbi-gpio: correct boundary conditions in pm8xxx_domain_translate
Quoted 8 lines · Brian Masney
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 <[email protected]>---
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
Re: [PATCH -next 3/3] qcom: ssbi-gpio: correct boundary conditions in pm8xxx_domain_translate
In reply to Brian MasneyQuoted 17 lines · Brian Masney
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 <[email protected]>---
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(-)drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c +0
-0
drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c static int pm8xxx_domain_translate(struct irq_domain *domain, · line 717
Quoted 9 lines
drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c +2
-1@@ -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.
Quoted 5 lines · Brian Masney
Select
IRQ_DOMAIN_HIERARCHYfor pmic-arb inKconfigsince this driver uses the version 2 IRQ interfaces.IRQ_DOMAIN_HIERARCHYselectsIRQ_DOMAIN, so it can be removed from here.Signed-off-by Brian Masney <[email protected]>
Thanks.
Quoted 21 lines
---
This addresses a build failure found by make randconfig in linux-next:
https://lore.kernel.org/lkml/[email protected]/drivers/spmi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/spmi/Kconfig +1
-1@@ -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
Signature · 1 line
~Randy
Quoted 5 lines · Brian Masney
Select
IRQ_DOMAIN_HIERARCHYfor pmic-arb inKconfigsince this driver uses the version 2 IRQ interfaces.IRQ_DOMAIN_HIERARCHYselectsIRQ_DOMAIN, so it can be removed from here.Signed-off-by Brian Masney <[email protected]>
Patch applied on the devel branch with Randy's tags!
Yours,
Linus Walleij