Hi Xiaoliang, Thank you for the patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Xiaoliang-Yang/net-stmmac-re-configure-tas-basetime-after-ptp-time-adjust/20210601-163025 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 7fc6d3abc0844a9b8ef67937af465a417af6e9e9 config: m68k-allmodconfig (attached as .config) compiler: m68k-linux-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/0day-ci/linux/commit/427b65e5ea008c937ca6bf7ceca8113db2c37f1a git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Xiaoliang-Yang/net-stmmac-re-configure-tas-basetime-after-ptp-time-adjust/20210601-163025 git checkout 427b65e5ea008c937ca6bf7ceca8113db2c37f1a # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c: In function 'stmmac_adjust_time': >> drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c:106:10: error: implicit declaration of function 'stmmac_calc_tas_basetime' [-Werror=implicit-function-declaration] 106 | time = stmmac_calc_tas_basetime(basetime, | ^~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c:106:10: error: incompatible types when assigning to type 'struct timespec64' from type 'int' cc1: some warnings being treated as errors vim +/stmmac_calc_tas_basetime +106 drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c 48 49 /** 50 * stmmac_adjust_time 51 * 52 * @ptp: pointer to ptp_clock_info structure 53 * @delta: desired change in nanoseconds 54 * 55 * Description: this function will shift/adjust the hardware clock time. 56 */ 57 static int stmmac_adjust_time(struct ptp_clock_info *ptp, s64 delta) 58 { 59 struct stmmac_priv *priv = 60 container_of(ptp, struct stmmac_priv, ptp_clock_ops); 61 unsigned long flags; 62 u32 sec, nsec; 63 u32 quotient, reminder; 64 int neg_adj = 0; 65 bool xmac, est_rst = false; 66 int ret; 67 68 xmac = priv->plat->has_gmac4 || priv->plat->has_xgmac; 69 70 if (delta < 0) { 71 neg_adj = 1; 72 delta = -delta; 73 } 74 75 quotient = div_u64_rem(delta, 1000000000ULL, &reminder); 76 sec = quotient; 77 nsec = reminder; 78 79 /* If EST is enabled, disabled it before adjust ptp time. */ 80 if (priv->plat->est && priv->plat->est->enable) { 81 est_rst = true; 82 mutex_lock(&priv->plat->est->lock); 83 priv->plat->est->enable = false; 84 stmmac_est_configure(priv, priv->ioaddr, priv->plat->est, 85 priv->plat->clk_ptp_rate); 86 mutex_unlock(&priv->plat->est->lock); 87 } 88 89 spin_lock_irqsave(&priv->ptp_lock, flags); 90 stmmac_adjust_systime(priv, priv->ptpaddr, sec, nsec, neg_adj, xmac); 91 spin_unlock_irqrestore(&priv->ptp_lock, flags); 92 93 /* Caculate new basetime and re-configured EST after PTP time adjust. */ 94 if (est_rst) { 95 struct timespec64 current_time, time; 96 ktime_t current_time_ns, basetime; 97 u64 cycle_time; 98 99 priv->ptp_clock_ops.gettime64(&priv->ptp_clock_ops, ¤t_time); 100 current_time_ns = timespec64_to_ktime(current_time); 101 time.tv_nsec = priv->plat->est->btr[0]; 102 time.tv_sec = priv->plat->est->btr[1]; 103 basetime = timespec64_to_ktime(time); 104 cycle_time = priv->plat->est->ctr[1] * NSEC_PER_SEC + 105 priv->plat->est->ctr[0]; > 106 time = stmmac_calc_tas_basetime(basetime, 107 current_time_ns, 108 cycle_time); 109 110 mutex_lock(&priv->plat->est->lock); 111 priv->plat->est->btr[0] = (u32)time.tv_nsec; 112 priv->plat->est->btr[1] = (u32)time.tv_sec; 113 priv->plat->est->enable = true; 114 ret = stmmac_est_configure(priv, priv->ioaddr, priv->plat->est, 115 priv->plat->clk_ptp_rate); 116 mutex_unlock(&priv->plat->est->lock); 117 if (ret) 118 netdev_err(priv->dev, "failed to configure EST\n"); 119 } 120 121 return 0; 122 } 123 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org