diff mbox series

[net-next] net: ethernet: renesas: rcar_gen4_ptp: Depend on PTP_1588_CLOCK

Message ID 20231129111142.3322667-1-niklas.soderlund+renesas@ragnatech.se (mailing list archive)
State Accepted
Commit 078e07570359b77655d7e54a05153873f1d20648
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: ethernet: renesas: rcar_gen4_ptp: Depend on PTP_1588_CLOCK | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/codegen success Generated files up to date
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/cc_maintainers fail 1 blamed authors not CCed: horms@kernel.org; 3 maintainers not CCed: wsa+renesas@sang-engineering.com s.shtylyov@omp.ru horms@kernel.org
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 15 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Niklas Söderlund Nov. 29, 2023, 11:11 a.m. UTC
When breaking out the Gen4 gPTP support to its own module the dependency
on the PTP_1588_CLOCK framework was left as optional and only stated for
the driver using the module. This leads to issues when doing
COMPILE_TEST of RENESAS_GEN4_PTP separately and PTP_1588_CLOCK is built
as a module and the other as a built-in. Add an explicit depend on
PTP_1588_CLOCK.

While at it remove the optional support for PTP_1588_CLOCK from
RENESAS_ETHER_SWITCH as the driver unconditionally calls the Gen4 gPTP
module and thus also requires the PTP_1588_CLOCK framework.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 8c1c66235e03 ("net: ethernet: renesas: rcar_gen4_ptp: Break out to module")
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
 drivers/net/ethernet/renesas/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Arnd Bergmann Nov. 29, 2023, 12:01 p.m. UTC | #1
On Wed, Nov 29, 2023, at 12:11, Niklas Söderlund wrote:
> When breaking out the Gen4 gPTP support to its own module the dependency
> on the PTP_1588_CLOCK framework was left as optional and only stated for
> the driver using the module. This leads to issues when doing
> COMPILE_TEST of RENESAS_GEN4_PTP separately and PTP_1588_CLOCK is built
> as a module and the other as a built-in. Add an explicit depend on
> PTP_1588_CLOCK.
>
> While at it remove the optional support for PTP_1588_CLOCK from
> RENESAS_ETHER_SWITCH as the driver unconditionally calls the Gen4 gPTP
> module and thus also requires the PTP_1588_CLOCK framework.
>
> Reported-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 8c1c66235e03 ("net: ethernet: renesas: rcar_gen4_ptp: Break out 
> to module")
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

Reviewed-by: Arnd Bergmann <arnd@arndb.de>

Ideally someone should rework the driver (and the ravb one) to actually
leave out all the ptp related code when PTP is disabled, but this patch
avoids both the link failure and the possible logic issues for the moment.

     Arnd
patchwork-bot+netdevbpf@kernel.org Dec. 2, 2023, 4:30 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 29 Nov 2023 12:11:42 +0100 you wrote:
> When breaking out the Gen4 gPTP support to its own module the dependency
> on the PTP_1588_CLOCK framework was left as optional and only stated for
> the driver using the module. This leads to issues when doing
> COMPILE_TEST of RENESAS_GEN4_PTP separately and PTP_1588_CLOCK is built
> as a module and the other as a built-in. Add an explicit depend on
> PTP_1588_CLOCK.
> 
> [...]

Here is the summary with links:
  - [net-next] net: ethernet: renesas: rcar_gen4_ptp: Depend on PTP_1588_CLOCK
    https://git.kernel.org/netdev/net-next/c/078e07570359

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/renesas/Kconfig b/drivers/net/ethernet/renesas/Kconfig
index 733cbb6eb3ed..d6136fe5c206 100644
--- a/drivers/net/ethernet/renesas/Kconfig
+++ b/drivers/net/ethernet/renesas/Kconfig
@@ -40,7 +40,7 @@  config RAVB
 config RENESAS_ETHER_SWITCH
 	tristate "Renesas Ethernet Switch support"
 	depends on ARCH_RENESAS || COMPILE_TEST
-	depends on PTP_1588_CLOCK_OPTIONAL
+	depends on PTP_1588_CLOCK
 	select CRC32
 	select MII
 	select PHYLINK
@@ -50,6 +50,7 @@  config RENESAS_ETHER_SWITCH
 
 config RENESAS_GEN4_PTP
 	tristate "Renesas R-Car Gen4 gPTP support" if COMPILE_TEST
+	depends on PTP_1588_CLOCK
 	select CRC32
 	select MII
 	select PHYLIB