drivers/net/ethernet/intel/igc/igc_ptp.c:777:9: error: implicit declaration of function 'convert_art_ns_to_tsc'

From: kernel test robot
Date: Wed Sep 01 2021 - 19:00:03 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 477f70cd2a67904e04c2c2b9bd0fa2e95222f2f6
commit: a90ec84837325df4b9a6798c2cc0df202b5680bd igc: Add support for PTP getcrosststamp()
date: 8 days ago
config: um-allmodconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a90ec84837325df4b9a6798c2cc0df202b5680bd
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout a90ec84837325df4b9a6798c2cc0df202b5680bd
# save the attached .config to linux build tree
make W=1 ARCH=um

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

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]
777 | 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
777 | return convert_art_ns_to_tsc(tstamp);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/igc/igc_ptp.c:781:1: error: control reaches end of non-void function [-Werror=return-type]
781 | }
| ^
cc1: some warnings being treated as errors


vim +/convert_art_ns_to_tsc +777 drivers/net/ethernet/intel/igc/igc_ptp.c

773
774 static struct system_counterval_t igc_device_tstamp_to_system(u64 tstamp)
775 {
776 #if IS_ENABLED(CONFIG_X86_TSC)
> 777 return convert_art_ns_to_tsc(tstamp);
778 #else
779 return (struct system_counterval_t) { };
780 #endif
781 }
782

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip