linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] phy: samsung: Fix build break in USB2 PHY driver for Exynos5420 SoCs
       [not found] <CGME20201201170918eucas1p2a34ca6e90ec710400a7a5d7121197d85@eucas1p2.samsung.com>
@ 2020-12-01 17:09 ` Marek Szyprowski
  2020-12-01 20:00   ` Krzysztof Kozlowski
                     ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Marek Szyprowski @ 2020-12-01 17:09 UTC (permalink / raw)
  To: linux-samsung-soc
  Cc: linux-kernel, Sylwester Nawrocki, Marek Szyprowski,
	Krzysztof Kozlowski, Vinod Koul, Kishon Vijay Abraham I,
	Bartlomiej Zolnierkiewicz, Willy Wolff, Marian Mihailescu,
	Markus Reichl

Exynos5420 variant of USB2 PHY is handled by the same code as the
Exynos5250 one. Introducing a separate Kconfig symbol for it was an
over-engineering, which turned out to cause build break for certain
configurations:

ERROR: modpost: "exynos5420_usb2_phy_config" [drivers/phy/samsung/phy-exynos-usb2.ko] undefined!

Fix this by removing PHY_EXYNOS5420_USB2 symbol and using
PHY_EXYNOS5250_USB2 also for Exynos5420 SoCs.

Reported-by: Markus Reichl <m.reichl@fivetechno.de>
Fixes: 81b534f7e9b2 ("phy: samsung: Add support for the Exynos5420 variant of the USB2 PHY")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
Vinod: this a fix to the patch merged yesterday. If you want me to resend
a fixed initial patch, let me know.
---
 drivers/phy/samsung/Kconfig            | 7 +------
 drivers/phy/samsung/phy-samsung-usb2.c | 2 --
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/phy/samsung/Kconfig b/drivers/phy/samsung/Kconfig
index 0f51d3bf38cc..e20d2fcc9fe7 100644
--- a/drivers/phy/samsung/Kconfig
+++ b/drivers/phy/samsung/Kconfig
@@ -64,12 +64,7 @@ config PHY_EXYNOS4X12_USB2
 config PHY_EXYNOS5250_USB2
 	bool
 	depends on PHY_SAMSUNG_USB2
-	default SOC_EXYNOS5250
-
-config PHY_EXYNOS5420_USB2
-	bool
-	depends on PHY_SAMSUNG_USB2
-	default SOC_EXYNOS5420
+	default SOC_EXYNOS5250 || SOC_EXYNOS5420
 
 config PHY_S5PV210_USB2
 	bool "Support for S5PV210"
diff --git a/drivers/phy/samsung/phy-samsung-usb2.c b/drivers/phy/samsung/phy-samsung-usb2.c
index 3908153f2ce5..ec2befabeea6 100644
--- a/drivers/phy/samsung/phy-samsung-usb2.c
+++ b/drivers/phy/samsung/phy-samsung-usb2.c
@@ -127,8 +127,6 @@ static const struct of_device_id samsung_usb2_phy_of_match[] = {
 		.compatible = "samsung,exynos5250-usb2-phy",
 		.data = &exynos5250_usb2_phy_config,
 	},
-#endif
-#ifdef CONFIG_PHY_EXYNOS5420_USB2
 	{
 		.compatible = "samsung,exynos5420-usb2-phy",
 		.data = &exynos5420_usb2_phy_config,
-- 
2.17.1


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

* Re: [PATCH] phy: samsung: Fix build break in USB2 PHY driver for Exynos5420 SoCs
  2020-12-01 17:09 ` [PATCH] phy: samsung: Fix build break in USB2 PHY driver for Exynos5420 SoCs Marek Szyprowski
@ 2020-12-01 20:00   ` Krzysztof Kozlowski
  2020-12-01 23:32   ` Jaehoon Chung
  2020-12-02  4:21   ` Vinod Koul
  2 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2020-12-01 20:00 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: linux-samsung-soc, linux-kernel, Sylwester Nawrocki, Vinod Koul,
	Kishon Vijay Abraham I, Bartlomiej Zolnierkiewicz, Willy Wolff,
	Marian Mihailescu, Markus Reichl

On Tue, Dec 01, 2020 at 06:09:05PM +0100, Marek Szyprowski wrote:
> Exynos5420 variant of USB2 PHY is handled by the same code as the
> Exynos5250 one. Introducing a separate Kconfig symbol for it was an
> over-engineering, which turned out to cause build break for certain
> configurations:
> 
> ERROR: modpost: "exynos5420_usb2_phy_config" [drivers/phy/samsung/phy-exynos-usb2.ko] undefined!
> 
> Fix this by removing PHY_EXYNOS5420_USB2 symbol and using
> PHY_EXYNOS5250_USB2 also for Exynos5420 SoCs.
> 
> Reported-by: Markus Reichl <m.reichl@fivetechno.de>
> Fixes: 81b534f7e9b2 ("phy: samsung: Add support for the Exynos5420 variant of the USB2 PHY")
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> Vinod: this a fix to the patch merged yesterday. If you want me to resend
> a fixed initial patch, let me know.
> ---
>  drivers/phy/samsung/Kconfig            | 7 +------
>  drivers/phy/samsung/phy-samsung-usb2.c | 2 --
>  2 files changed, 1 insertion(+), 8 deletions(-)
> 

Acked-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

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

* Re: [PATCH] phy: samsung: Fix build break in USB2 PHY driver for Exynos5420 SoCs
  2020-12-01 17:09 ` [PATCH] phy: samsung: Fix build break in USB2 PHY driver for Exynos5420 SoCs Marek Szyprowski
  2020-12-01 20:00   ` Krzysztof Kozlowski
@ 2020-12-01 23:32   ` Jaehoon Chung
  2020-12-02  4:21   ` Vinod Koul
  2 siblings, 0 replies; 4+ messages in thread
From: Jaehoon Chung @ 2020-12-01 23:32 UTC (permalink / raw)
  To: Marek Szyprowski, linux-samsung-soc
  Cc: linux-kernel, Sylwester Nawrocki, Krzysztof Kozlowski,
	Vinod Koul, Kishon Vijay Abraham I, Bartlomiej Zolnierkiewicz,
	Willy Wolff, Marian Mihailescu, Markus Reichl

On 12/2/20 2:09 AM, Marek Szyprowski wrote:
> Exynos5420 variant of USB2 PHY is handled by the same code as the
> Exynos5250 one. Introducing a separate Kconfig symbol for it was an
> over-engineering, which turned out to cause build break for certain
> configurations:
> 
> ERROR: modpost: "exynos5420_usb2_phy_config" [drivers/phy/samsung/phy-exynos-usb2.ko] undefined!
> 
> Fix this by removing PHY_EXYNOS5420_USB2 symbol and using
> PHY_EXYNOS5250_USB2 also for Exynos5420 SoCs.
> 
> Reported-by: Markus Reichl <m.reichl@fivetechno.de>
> Fixes: 81b534f7e9b2 ("phy: samsung: Add support for the Exynos5420 variant of the USB2 PHY")
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>

Best Regards,
Jaehoon Chung

> ---
> Vinod: this a fix to the patch merged yesterday. If you want me to resend
> a fixed initial patch, let me know.
> ---
>  drivers/phy/samsung/Kconfig            | 7 +------
>  drivers/phy/samsung/phy-samsung-usb2.c | 2 --
>  2 files changed, 1 insertion(+), 8 deletions(-)
> 
> diff --git a/drivers/phy/samsung/Kconfig b/drivers/phy/samsung/Kconfig
> index 0f51d3bf38cc..e20d2fcc9fe7 100644
> --- a/drivers/phy/samsung/Kconfig
> +++ b/drivers/phy/samsung/Kconfig
> @@ -64,12 +64,7 @@ config PHY_EXYNOS4X12_USB2
>  config PHY_EXYNOS5250_USB2
>  	bool
>  	depends on PHY_SAMSUNG_USB2
> -	default SOC_EXYNOS5250
> -
> -config PHY_EXYNOS5420_USB2
> -	bool
> -	depends on PHY_SAMSUNG_USB2
> -	default SOC_EXYNOS5420
> +	default SOC_EXYNOS5250 || SOC_EXYNOS5420
>  
>  config PHY_S5PV210_USB2
>  	bool "Support for S5PV210"
> diff --git a/drivers/phy/samsung/phy-samsung-usb2.c b/drivers/phy/samsung/phy-samsung-usb2.c
> index 3908153f2ce5..ec2befabeea6 100644
> --- a/drivers/phy/samsung/phy-samsung-usb2.c
> +++ b/drivers/phy/samsung/phy-samsung-usb2.c
> @@ -127,8 +127,6 @@ static const struct of_device_id samsung_usb2_phy_of_match[] = {
>  		.compatible = "samsung,exynos5250-usb2-phy",
>  		.data = &exynos5250_usb2_phy_config,
>  	},
> -#endif
> -#ifdef CONFIG_PHY_EXYNOS5420_USB2
>  	{
>  		.compatible = "samsung,exynos5420-usb2-phy",
>  		.data = &exynos5420_usb2_phy_config,
> 


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

* Re: [PATCH] phy: samsung: Fix build break in USB2 PHY driver for Exynos5420 SoCs
  2020-12-01 17:09 ` [PATCH] phy: samsung: Fix build break in USB2 PHY driver for Exynos5420 SoCs Marek Szyprowski
  2020-12-01 20:00   ` Krzysztof Kozlowski
  2020-12-01 23:32   ` Jaehoon Chung
@ 2020-12-02  4:21   ` Vinod Koul
  2 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2020-12-02  4:21 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: linux-samsung-soc, linux-kernel, Sylwester Nawrocki,
	Krzysztof Kozlowski, Kishon Vijay Abraham I,
	Bartlomiej Zolnierkiewicz, Willy Wolff, Marian Mihailescu,
	Markus Reichl

On 01-12-20, 18:09, Marek Szyprowski wrote:
> Exynos5420 variant of USB2 PHY is handled by the same code as the
> Exynos5250 one. Introducing a separate Kconfig symbol for it was an
> over-engineering, which turned out to cause build break for certain
> configurations:
> 
> ERROR: modpost: "exynos5420_usb2_phy_config" [drivers/phy/samsung/phy-exynos-usb2.ko] undefined!
> 
> Fix this by removing PHY_EXYNOS5420_USB2 symbol and using
> PHY_EXYNOS5250_USB2 also for Exynos5420 SoCs.
> 
> Reported-by: Markus Reichl <m.reichl@fivetechno.de>
> Fixes: 81b534f7e9b2 ("phy: samsung: Add support for the Exynos5420 variant of the USB2 PHY")
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> Vinod: this a fix to the patch merged yesterday. If you want me to resend
> a fixed initial patch, let me know.

The fix is just fine :)

Although the patch subject line is not. It is supposed to talk about the
change done and not the effect.

Maybe "Merge kconfig for Exynos5420 and Exynos5250" would make better
sense

> ---
>  drivers/phy/samsung/Kconfig            | 7 +------
>  drivers/phy/samsung/phy-samsung-usb2.c | 2 --
>  2 files changed, 1 insertion(+), 8 deletions(-)
> 
> diff --git a/drivers/phy/samsung/Kconfig b/drivers/phy/samsung/Kconfig
> index 0f51d3bf38cc..e20d2fcc9fe7 100644
> --- a/drivers/phy/samsung/Kconfig
> +++ b/drivers/phy/samsung/Kconfig
> @@ -64,12 +64,7 @@ config PHY_EXYNOS4X12_USB2
>  config PHY_EXYNOS5250_USB2
>  	bool
>  	depends on PHY_SAMSUNG_USB2
> -	default SOC_EXYNOS5250
> -
> -config PHY_EXYNOS5420_USB2
> -	bool
> -	depends on PHY_SAMSUNG_USB2
> -	default SOC_EXYNOS5420
> +	default SOC_EXYNOS5250 || SOC_EXYNOS5420
>  
>  config PHY_S5PV210_USB2
>  	bool "Support for S5PV210"
> diff --git a/drivers/phy/samsung/phy-samsung-usb2.c b/drivers/phy/samsung/phy-samsung-usb2.c
> index 3908153f2ce5..ec2befabeea6 100644
> --- a/drivers/phy/samsung/phy-samsung-usb2.c
> +++ b/drivers/phy/samsung/phy-samsung-usb2.c
> @@ -127,8 +127,6 @@ static const struct of_device_id samsung_usb2_phy_of_match[] = {
>  		.compatible = "samsung,exynos5250-usb2-phy",
>  		.data = &exynos5250_usb2_phy_config,
>  	},
> -#endif
> -#ifdef CONFIG_PHY_EXYNOS5420_USB2
>  	{
>  		.compatible = "samsung,exynos5420-usb2-phy",
>  		.data = &exynos5420_usb2_phy_config,
> -- 
> 2.17.1

-- 
~Vinod

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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20201201170918eucas1p2a34ca6e90ec710400a7a5d7121197d85@eucas1p2.samsung.com>
2020-12-01 17:09 ` [PATCH] phy: samsung: Fix build break in USB2 PHY driver for Exynos5420 SoCs Marek Szyprowski
2020-12-01 20:00   ` Krzysztof Kozlowski
2020-12-01 23:32   ` Jaehoon Chung
2020-12-02  4:21   ` Vinod Koul

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).