* [PATCH 1/2] pinctrl: Fix return value about devm_platform_ioremap_resource()
@ 2020-05-23 11:45 Tiezhu Yang
2020-05-23 11:45 ` [PATCH 2/2] pinctrl: at91-pio4: Add COMPILE_TEST support Tiezhu Yang
2020-05-25 11:41 ` [PATCH 1/2] pinctrl: Fix return value about devm_platform_ioremap_resource() Linus Walleij
0 siblings, 2 replies; 4+ messages in thread
From: Tiezhu Yang @ 2020-05-23 11:45 UTC (permalink / raw)
To: Linus Walleij; +Cc: linux-gpio, linux-kernel, Xuefeng Li, Tiezhu Yang
When call function devm_platform_ioremap_resource(), we should use IS_ERR()
to check the return value and return PTR_ERR() if failed.
Fixes: 4b024225c4a8 ("pinctrl: use devm_platform_ioremap_resource() to simplify code")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
drivers/pinctrl/bcm/pinctrl-bcm281xx.c | 2 +-
drivers/pinctrl/pinctrl-at91-pio4.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/bcm/pinctrl-bcm281xx.c b/drivers/pinctrl/bcm/pinctrl-bcm281xx.c
index f690fc5..71e6661 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm281xx.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm281xx.c
@@ -1406,7 +1406,7 @@ static int __init bcm281xx_pinctrl_probe(struct platform_device *pdev)
pdata->reg_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(pdata->reg_base)) {
dev_err(&pdev->dev, "Failed to ioremap MEM resource\n");
- return -ENODEV;
+ return PTR_ERR(pdata->reg_base);
}
/* Initialize the dynamic part of pinctrl_desc */
diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
index 6949124..54222ccd 100644
--- a/drivers/pinctrl/pinctrl-at91-pio4.c
+++ b/drivers/pinctrl/pinctrl-at91-pio4.c
@@ -1019,7 +1019,7 @@ static int atmel_pinctrl_probe(struct platform_device *pdev)
atmel_pioctrl->reg_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(atmel_pioctrl->reg_base))
- return -EINVAL;
+ return PTR_ERR(atmel_pioctrl->reg_base);
atmel_pioctrl->clk = devm_clk_get(dev, NULL);
if (IS_ERR(atmel_pioctrl->clk)) {
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] pinctrl: at91-pio4: Add COMPILE_TEST support
2020-05-23 11:45 [PATCH 1/2] pinctrl: Fix return value about devm_platform_ioremap_resource() Tiezhu Yang
@ 2020-05-23 11:45 ` Tiezhu Yang
2020-05-25 11:42 ` Linus Walleij
2020-05-25 11:41 ` [PATCH 1/2] pinctrl: Fix return value about devm_platform_ioremap_resource() Linus Walleij
1 sibling, 1 reply; 4+ messages in thread
From: Tiezhu Yang @ 2020-05-23 11:45 UTC (permalink / raw)
To: Linus Walleij; +Cc: linux-gpio, linux-kernel, Xuefeng Li, Tiezhu Yang
Add COMPILE_TEST support to the AT91 PIO4 pinctrl driver for better compile
testing coverage.
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
drivers/pinctrl/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index 834c599..649b700 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -82,7 +82,7 @@ config PINCTRL_AT91
config PINCTRL_AT91PIO4
bool "AT91 PIO4 pinctrl driver"
depends on OF
- depends on ARCH_AT91
+ depends on ARCH_AT91 || COMPILE_TEST
select PINMUX
select GENERIC_PINCONF
select GPIOLIB
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] pinctrl: Fix return value about devm_platform_ioremap_resource()
2020-05-23 11:45 [PATCH 1/2] pinctrl: Fix return value about devm_platform_ioremap_resource() Tiezhu Yang
2020-05-23 11:45 ` [PATCH 2/2] pinctrl: at91-pio4: Add COMPILE_TEST support Tiezhu Yang
@ 2020-05-25 11:41 ` Linus Walleij
1 sibling, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2020-05-25 11:41 UTC (permalink / raw)
To: Tiezhu Yang; +Cc: open list:GPIO SUBSYSTEM, linux-kernel, Xuefeng Li
On Sat, May 23, 2020 at 1:45 PM Tiezhu Yang <yangtiezhu@loongson.cn> wrote:
> When call function devm_platform_ioremap_resource(), we should use IS_ERR()
> to check the return value and return PTR_ERR() if failed.
>
> Fixes: 4b024225c4a8 ("pinctrl: use devm_platform_ioremap_resource() to simplify code")
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Patch applied!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] pinctrl: at91-pio4: Add COMPILE_TEST support
2020-05-23 11:45 ` [PATCH 2/2] pinctrl: at91-pio4: Add COMPILE_TEST support Tiezhu Yang
@ 2020-05-25 11:42 ` Linus Walleij
0 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2020-05-25 11:42 UTC (permalink / raw)
To: Tiezhu Yang; +Cc: open list:GPIO SUBSYSTEM, linux-kernel, Xuefeng Li
On Sat, May 23, 2020 at 1:45 PM Tiezhu Yang <yangtiezhu@loongson.cn> wrote:
> Add COMPILE_TEST support to the AT91 PIO4 pinctrl driver for better compile
> testing coverage.
>
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Patch applied, if there is some compile error we will notice shorty :D
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-05-25 11:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-23 11:45 [PATCH 1/2] pinctrl: Fix return value about devm_platform_ioremap_resource() Tiezhu Yang
2020-05-23 11:45 ` [PATCH 2/2] pinctrl: at91-pio4: Add COMPILE_TEST support Tiezhu Yang
2020-05-25 11:42 ` Linus Walleij
2020-05-25 11:41 ` [PATCH 1/2] pinctrl: Fix return value about devm_platform_ioremap_resource() Linus Walleij
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).