net: intel: igc_ptp: fix build for UML
Subsystems (4)
PATCH 1/1 net: intel: igc_ptp: fix build for UML
On a UML build, the igc_ptp driver uses CONFIG_X86_TSC for timestamp conversion. The function that is used is not available on UML builds, so have the function use the default system_counterval_t timestamp instead for UML builds.
Prevents this build error on UML:
../drivers/net/ethernet/intel/igc/igc_ptp.c: In function ?igc_device_tstamp_to_system?:../drivers/net/ethernet/intel/igc/igc_ptp.c:777:9: error: implicit declaration of function ?convert_art_ns_to_tsc? [-Werror=implicit-function-declaration]
return convert_art_ns_to_tsc(tstamp);../drivers/net/ethernet/intel/igc/igc_ptp.c:777:9: error: incompatible types when returning type ?int? but ?struct system_counterval_t? was expected
return convert_art_ns_to_tsc(tstamp);
--- drivers/net/ethernet/intel/igc/igc_ptp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/igc/igc_ptp.c +1 -1
@@ -773,7 +773,7 @@ static bool igc_is_crosststamp_supportedstatic struct system_counterval_t igc_device_tstamp_to_system (u64 tstamp) { -#if IS_ENABLED (CONFIG_X86_TSC ) +#if IS_ENABLED (CONFIG_X86_TSC ) && !defined(CONFIG_UML )return convert_art_ns_to_tsc (tstamp);#else return (struct system_counterval_t ) { };
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Wed, 13 Oct 2021 22:05:16 -0700 you wrote:
On a UML build, the
igc_ptpdriver usesCONFIG_X86_TSCfor timestamp conversion. The function that is used is not available on UML builds, so have the function use the defaultsystem_counterval_ttimestamp instead for UML builds.Prevents this build error on UML:
[...]
Here is the summary with links:
- [net-next] net: intel: igc_ptp: fix build for UML
https://git.kernel.org/netdev/net-next/c/523994ba3ad1
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html