[xlnx:master 9801/10512] drivers/net/ethernet/xilinx/xilinx_tsn_ptp_clock.c:45:9: error: implicit declaration of function 'in_be32'

kernel test robot lkp at intel.com
Thu Feb 25 13:15:06 EST 2021


tree:   https://github.com/Xilinx/linux-xlnx master
head:   f45363ddde384526dafc2b2490763f24c5030e8d
commit: bff352467d6de71ba0aa62e0cd6c9e98f7e4f293 [9801/10512] net: xilinx: Add support for PL TSN IP features
config: c6x-allyesconfig (attached as .config)
compiler: c6x-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/Xilinx/linux-xlnx/commit/bff352467d6de71ba0aa62e0cd6c9e98f7e4f293
        git remote add xlnx https://github.com/Xilinx/linux-xlnx
        git fetch --no-tags xlnx master
        git checkout bff352467d6de71ba0aa62e0cd6c9e98f7e4f293
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=c6x 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

All error/warnings (new ones prefixed by >>):

   drivers/net/ethernet/xilinx/xilinx_tsn_ptp_clock.c: In function 'xlnx_tod_read':
>> drivers/net/ethernet/xilinx/xilinx_tsn_ptp_clock.c:45:9: error: implicit declaration of function 'in_be32' [-Werror=implicit-function-declaration]
      45 |  nsec = in_be32(timer->baseaddr + XTIMER1588_CURRENT_RTC_NS);
         |         ^~~~~~~
   In file included from include/linux/kernel.h:15,
                    from include/linux/list.h:9,
                    from include/linux/kobject.h:19,
                    from include/linux/device.h:16,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_ptp_clock.c:18:
   drivers/net/ethernet/xilinx/xilinx_tsn_ptp_clock.c: In function 'xlnx_rtc_offset_write':
   drivers/net/ethernet/xilinx/xilinx_tsn_ptp_clock.c:55:11: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'time64_t' {aka 'const long long int'} [-Wformat=]
      55 |  pr_debug("%s: sec: %ld nsec: %ld\n", __func__, ts->tv_sec, ts->tv_nsec);
         |           ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/printk.h:288:21: note: in definition of macro 'pr_fmt'
     288 | #define pr_fmt(fmt) fmt
         |                     ^~~
   include/linux/dynamic_debug.h:143:2: note: in expansion of macro '__dynamic_func_call'
     143 |  __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:153:2: note: in expansion of macro '_dynamic_func_call'
     153 |  _dynamic_func_call(fmt, __dynamic_pr_debug,  \
         |  ^~~~~~~~~~~~~~~~~~
   include/linux/printk.h:336:2: note: in expansion of macro 'dynamic_pr_debug'
     336 |  dynamic_pr_debug(fmt, ##__VA_ARGS__)
         |  ^~~~~~~~~~~~~~~~
   drivers/net/ethernet/xilinx/xilinx_tsn_ptp_clock.c:55:2: note: in expansion of macro 'pr_debug'
      55 |  pr_debug("%s: sec: %ld nsec: %ld\n", __func__, ts->tv_sec, ts->tv_nsec);
         |  ^~~~~~~~
   drivers/net/ethernet/xilinx/xilinx_tsn_ptp_clock.c:55:23: note: format string is defined here
      55 |  pr_debug("%s: sec: %ld nsec: %ld\n", __func__, ts->tv_sec, ts->tv_nsec);
         |                     ~~^
         |                       |
         |                       long int
         |                     %lld
>> drivers/net/ethernet/xilinx/xilinx_tsn_ptp_clock.c:57:2: error: implicit declaration of function 'out_be32' [-Werror=implicit-function-declaration]
      57 |  out_be32((timer->baseaddr + XTIMER1588_RTC_OFFSET_SEC_H), 0);
         |  ^~~~~~~~
   cc1: some warnings being treated as errors
--
   In file included from include/uapi/linux/swab.h:7,
                    from include/linux/swab.h:5,
                    from include/uapi/linux/byteorder/big_endian.h:13,
                    from include/linux/byteorder/big_endian.h:5,
                    from arch/c6x/include/uapi/asm/byteorder.h:8,
                    from arch/c6x/include/asm/bitops.h:14,
                    from include/linux/bitops.h:26,
                    from include/linux/kernel.h:12,
                    from include/linux/list.h:9,
                    from include/linux/timer.h:5,
                    from include/linux/netdevice.h:24,
                    from drivers/net/ethernet/xilinx/xilinx_axienet.h:12,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_switch.h:21,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_switch.c:18:
   drivers/net/ethernet/xilinx/xilinx_tsn_switch.c: In function 'tsnswitch_probe':
>> arch/c6x/include/uapi/asm/swab.h:21:2: warning: 'pmap' may be used uninitialized in this function [-Wmaybe-uninitialized]
      21 |  asm("swap4 .l1 %0,%0\n"
         |  ^~~
   drivers/net/ethernet/xilinx/xilinx_tsn_switch.c:580:6: note: 'pmap' was declared here
     580 |  u32 pmap;
         |      ^~~~
   /tmp/ccA9D9Ah.s: Assembler messages:
   /tmp/ccA9D9Ah.s:2888: Warning: ignoring changed section type for .far
   /tmp/ccA9D9Ah.s:2888: Warning: ignoring changed section attributes for .far


vim +/in_be32 +45 drivers/net/ethernet/xilinx/xilinx_tsn_ptp_clock.c

    40	
    41	static void xlnx_tod_read(struct xlnx_ptp_timer *timer, struct timespec64 *ts)
    42	{
    43		u32 sec, nsec;
    44	
  > 45		nsec = in_be32(timer->baseaddr + XTIMER1588_CURRENT_RTC_NS);
    46		sec = in_be32(timer->baseaddr + XTIMER1588_CURRENT_RTC_SEC_L);
    47	
    48		ts->tv_sec = sec;
    49		ts->tv_nsec = nsec;
    50	}
    51	
    52	static void xlnx_rtc_offset_write(struct xlnx_ptp_timer *timer,
    53					  const struct timespec64 *ts)
    54	{
    55		pr_debug("%s: sec: %ld nsec: %ld\n", __func__, ts->tv_sec, ts->tv_nsec);
    56	
  > 57		out_be32((timer->baseaddr + XTIMER1588_RTC_OFFSET_SEC_H), 0);
    58		out_be32((timer->baseaddr + XTIMER1588_RTC_OFFSET_SEC_L),
    59			 (ts->tv_sec));
    60		out_be32((timer->baseaddr + XTIMER1588_RTC_OFFSET_NS), ts->tv_nsec);
    61	}
    62	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 50887 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210226/8dc55364/attachment-0001.gz>


More information about the linux-arm-kernel mailing list