* [PATCH 1/2] phy: rockchip: Fix return value of inno_dsidphy_probe()
@ 2020-05-25 4:08 Tiezhu Yang
2020-05-25 4:08 ` [PATCH 2/2] phy: Remove CONFIG_ARCH_ROCKCHIP check for subdir rockchip Tiezhu Yang
2020-05-25 10:43 ` [PATCH 1/2] phy: rockchip: Fix return value of inno_dsidphy_probe() Heiko Stübner
0 siblings, 2 replies; 5+ messages in thread
From: Tiezhu Yang @ 2020-05-25 4:08 UTC (permalink / raw)
To: Heiko Stuebner, Kishon Vijay Abraham I, Vinod Koul
Cc: linux-rockchip, 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: b7535a3bc0ba ("phy/rockchip: Add support for Innosilicon MIPI/LVDS/TTL PHY")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c b/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
index a7c6c94..8af8c6c 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
@@ -607,8 +607,8 @@ static int inno_dsidphy_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, inno);
inno->phy_base = devm_platform_ioremap_resource(pdev, 0);
- if (!inno->phy_base)
- return -ENOMEM;
+ if (IS_ERR(inno->phy_base))
+ return PTR_ERR(inno->phy_base);
inno->ref_clk = devm_clk_get(dev, "ref");
if (IS_ERR(inno->ref_clk)) {
--
2.1.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/2] phy: Remove CONFIG_ARCH_ROCKCHIP check for subdir rockchip
2020-05-25 4:08 [PATCH 1/2] phy: rockchip: Fix return value of inno_dsidphy_probe() Tiezhu Yang
@ 2020-05-25 4:08 ` Tiezhu Yang
2020-05-25 10:48 ` Heiko Stübner
2020-05-25 10:43 ` [PATCH 1/2] phy: rockchip: Fix return value of inno_dsidphy_probe() Heiko Stübner
1 sibling, 1 reply; 5+ messages in thread
From: Tiezhu Yang @ 2020-05-25 4:08 UTC (permalink / raw)
To: Heiko Stuebner, Kishon Vijay Abraham I, Vinod Koul
Cc: linux-rockchip, linux-kernel, Xuefeng Li, Tiezhu Yang
If CONFIG_ARCH_ROCKCHIP is not set but COMPILE_TEST is set, the file in
the subdir rockchip can not be built due to CONFIG_ARCH_ROCKCHIP check
in drivers/phy/Makefile.
Since the related configs in drivers/phy/rockchip/Kconfig depend on
ARCH_ROCKCHIP, so remove CONFIG_ARCH_ROCKCHIP check for subdir rockchip
in drivers/phy/Makefile.
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
drivers/phy/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/phy/Makefile b/drivers/phy/Makefile
index 310c149..e5b4f58 100644
--- a/drivers/phy/Makefile
+++ b/drivers/phy/Makefile
@@ -12,7 +12,7 @@ obj-$(CONFIG_ARCH_SUNXI) += allwinner/
obj-$(CONFIG_ARCH_MESON) += amlogic/
obj-$(CONFIG_ARCH_MEDIATEK) += mediatek/
obj-$(CONFIG_ARCH_RENESAS) += renesas/
-obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/
+obj-y += rockchip/
obj-$(CONFIG_ARCH_TEGRA) += tegra/
obj-y += broadcom/ \
cadence/ \
--
2.1.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] phy: Remove CONFIG_ARCH_ROCKCHIP check for subdir rockchip
2020-05-25 4:08 ` [PATCH 2/2] phy: Remove CONFIG_ARCH_ROCKCHIP check for subdir rockchip Tiezhu Yang
@ 2020-05-25 10:48 ` Heiko Stübner
2020-05-25 12:35 ` Tiezhu Yang
0 siblings, 1 reply; 5+ messages in thread
From: Heiko Stübner @ 2020-05-25 10:48 UTC (permalink / raw)
To: Tiezhu Yang
Cc: Kishon Vijay Abraham I, Vinod Koul, linux-rockchip, linux-kernel,
Xuefeng Li
Am Montag, 25. Mai 2020, 06:08:59 CEST schrieb Tiezhu Yang:
> If CONFIG_ARCH_ROCKCHIP is not set but COMPILE_TEST is set, the file in
> the subdir rockchip can not be built due to CONFIG_ARCH_ROCKCHIP check
> in drivers/phy/Makefile.
>
> Since the related configs in drivers/phy/rockchip/Kconfig depend on
> ARCH_ROCKCHIP, so remove CONFIG_ARCH_ROCKCHIP check for subdir rockchip
> in drivers/phy/Makefile.
>
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
wouldn't this make more sense to do for all subdirs?
- allwinner: also has arch_sunxi || compile_test in its Kconfig
- amlogic: same
- mediatek: same
- renesas: same
- tega: same
So I think the right way would be to drop all the obj-$(CONFIG_ARCH_...)
options and group the separate directories into the generic subdir
listing below them.
Heiko
> ---
> drivers/phy/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/phy/Makefile b/drivers/phy/Makefile
> index 310c149..e5b4f58 100644
> --- a/drivers/phy/Makefile
> +++ b/drivers/phy/Makefile
> @@ -12,7 +12,7 @@ obj-$(CONFIG_ARCH_SUNXI) += allwinner/
> obj-$(CONFIG_ARCH_MESON) += amlogic/
> obj-$(CONFIG_ARCH_MEDIATEK) += mediatek/
> obj-$(CONFIG_ARCH_RENESAS) += renesas/
> -obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/
> +obj-y += rockchip/
> obj-$(CONFIG_ARCH_TEGRA) += tegra/
> obj-y += broadcom/ \
> cadence/ \
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] phy: Remove CONFIG_ARCH_ROCKCHIP check for subdir rockchip
2020-05-25 10:48 ` Heiko Stübner
@ 2020-05-25 12:35 ` Tiezhu Yang
0 siblings, 0 replies; 5+ messages in thread
From: Tiezhu Yang @ 2020-05-25 12:35 UTC (permalink / raw)
To: Heiko Stübner
Cc: Kishon Vijay Abraham I, Vinod Koul, linux-rockchip, linux-kernel,
Xuefeng Li
On 05/25/2020 06:48 PM, Heiko Stübner wrote:
> Am Montag, 25. Mai 2020, 06:08:59 CEST schrieb Tiezhu Yang:
>> If CONFIG_ARCH_ROCKCHIP is not set but COMPILE_TEST is set, the file in
>> the subdir rockchip can not be built due to CONFIG_ARCH_ROCKCHIP check
>> in drivers/phy/Makefile.
>>
>> Since the related configs in drivers/phy/rockchip/Kconfig depend on
>> ARCH_ROCKCHIP, so remove CONFIG_ARCH_ROCKCHIP check for subdir rockchip
>> in drivers/phy/Makefile.
>>
>> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> wouldn't this make more sense to do for all subdirs?
>
> - allwinner: also has arch_sunxi || compile_test in its Kconfig
> - amlogic: same
> - mediatek: same
> - renesas: same
> - tega: same
>
> So I think the right way would be to drop all the obj-$(CONFIG_ARCH_...)
> options and group the separate directories into the generic subdir
> listing below them.
Hi Heiko,
Thanks for your suggestions. I will check it and then send v2.
Thanks,
Tiezhu Yang
>
> Heiko
>
>> ---
>> drivers/phy/Makefile | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/phy/Makefile b/drivers/phy/Makefile
>> index 310c149..e5b4f58 100644
>> --- a/drivers/phy/Makefile
>> +++ b/drivers/phy/Makefile
>> @@ -12,7 +12,7 @@ obj-$(CONFIG_ARCH_SUNXI) += allwinner/
>> obj-$(CONFIG_ARCH_MESON) += amlogic/
>> obj-$(CONFIG_ARCH_MEDIATEK) += mediatek/
>> obj-$(CONFIG_ARCH_RENESAS) += renesas/
>> -obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/
>> +obj-y += rockchip/
>> obj-$(CONFIG_ARCH_TEGRA) += tegra/
>> obj-y += broadcom/ \
>> cadence/ \
>>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] phy: rockchip: Fix return value of inno_dsidphy_probe()
2020-05-25 4:08 [PATCH 1/2] phy: rockchip: Fix return value of inno_dsidphy_probe() Tiezhu Yang
2020-05-25 4:08 ` [PATCH 2/2] phy: Remove CONFIG_ARCH_ROCKCHIP check for subdir rockchip Tiezhu Yang
@ 2020-05-25 10:43 ` Heiko Stübner
1 sibling, 0 replies; 5+ messages in thread
From: Heiko Stübner @ 2020-05-25 10:43 UTC (permalink / raw)
To: Tiezhu Yang
Cc: Kishon Vijay Abraham I, Vinod Koul, linux-rockchip, linux-kernel,
Xuefeng Li
Am Montag, 25. Mai 2020, 06:08:58 CEST schrieb 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: b7535a3bc0ba ("phy/rockchip: Add support for Innosilicon MIPI/LVDS/TTL PHY")
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-05-25 12:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-25 4:08 [PATCH 1/2] phy: rockchip: Fix return value of inno_dsidphy_probe() Tiezhu Yang
2020-05-25 4:08 ` [PATCH 2/2] phy: Remove CONFIG_ARCH_ROCKCHIP check for subdir rockchip Tiezhu Yang
2020-05-25 10:48 ` Heiko Stübner
2020-05-25 12:35 ` Tiezhu Yang
2020-05-25 10:43 ` [PATCH 1/2] phy: rockchip: Fix return value of inno_dsidphy_probe() Heiko Stübner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox