Re: [PATCH net-next 3/3] gve: implement PTP gettimex64
From: kernel test robot
Date: Wed Mar 25 2026 - 10:16:45 EST
Hi Harshitha,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 5446b8691eb8278f10deca92048fad84ffd1e4d5]
url: https://github.com/intel-lab-lkp/linux/commits/Harshitha-Ramamurthy/gve-skip-error-logging-for-retryable-AdminQ-commands/20260324-133808
base: 5446b8691eb8278f10deca92048fad84ffd1e4d5
patch link: https://lore.kernel.org/r/20260323234829.3185051-4-hramamurthy%40google.com
patch subject: [PATCH net-next 3/3] gve: implement PTP gettimex64
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20260325/202603252126.CrpQ8IIi-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260325/202603252126.CrpQ8IIi-lkp@xxxxxxxxx/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603252126.CrpQ8IIi-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
In file included from include/linux/device.h:15,
from include/linux/dma-mapping.h:5,
from drivers/net/ethernet/google/gve/gve.h:10,
from drivers/net/ethernet/google/gve/gve_ptp.c:7:
drivers/net/ethernet/google/gve/gve_ptp.c: In function 'gve_ptp_gettimex64':
>> drivers/net/ethernet/google/gve/gve_ptp.c:186:45: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'cycles_t' {aka 'long unsigned int'} [-Wformat=]
186 | "AdminQ system clock cycle counts out of order. Expecting %llu <= %llu <= %llu <= %llu\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:154:56: note: in expansion of macro 'dev_fmt'
154 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
include/linux/dev_printk.h:215:17: note: in expansion of macro 'dev_err'
215 | dev_level(dev, fmt, ##__VA_ARGS__); \
| ^~~~~~~~~
include/linux/dev_printk.h:225:9: note: in expansion of macro 'dev_level_ratelimited'
225 | dev_level_ratelimited(dev_err, dev, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/google/gve/gve_ptp.c:185:25: note: in expansion of macro 'dev_err_ratelimited'
185 | dev_err_ratelimited(&priv->pdev->dev,
| ^~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/google/gve/gve_ptp.c:186:106: note: format string is defined here
186 | "AdminQ system clock cycle counts out of order. Expecting %llu <= %llu <= %llu <= %llu\n",
| ~~~^
| |
| long long unsigned int
| %lu
drivers/net/ethernet/google/gve/gve_ptp.c:186:45: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 6 has type 'cycles_t' {aka 'long unsigned int'} [-Wformat=]
186 | "AdminQ system clock cycle counts out of order. Expecting %llu <= %llu <= %llu <= %llu\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:154:56: note: in expansion of macro 'dev_fmt'
154 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
include/linux/dev_printk.h:215:17: note: in expansion of macro 'dev_err'
215 | dev_level(dev, fmt, ##__VA_ARGS__); \
| ^~~~~~~~~
include/linux/dev_printk.h:225:9: note: in expansion of macro 'dev_level_ratelimited'
225 | dev_level_ratelimited(dev_err, dev, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/google/gve/gve_ptp.c:185:25: note: in expansion of macro 'dev_err_ratelimited'
185 | dev_err_ratelimited(&priv->pdev->dev,
| ^~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/google/gve/gve_ptp.c:186:130: note: format string is defined here
186 | "AdminQ system clock cycle counts out of order. Expecting %llu <= %llu <= %llu <= %llu\n",
| ~~~^
| |
| long long unsigned int
| %lu
vim +186 drivers/net/ethernet/google/gve/gve_ptp.c
160
161 static int gve_ptp_gettimex64(struct ptp_clock_info *info,
162 struct timespec64 *ts,
163 struct ptp_system_timestamp *sts)
164 {
165 struct gve_ptp *ptp = container_of(info, struct gve_ptp, info);
166 struct gve_sysclock_sample sysclock = {0};
167 struct gve_priv *priv = ptp->priv;
168 struct system_time_snapshot snap;
169 u64 nic_ts;
170 int err;
171
172 /* Take system clock snapshot before sampling cycle counters */
173 if (sts)
174 ktime_get_snapshot(&snap);
175
176 err = gve_clock_nic_ts_read(priv, &nic_ts, &sysclock);
177 if (err)
178 return err;
179
180 if (sts) {
181 /* Reject samples with out of order system clock values */
182 if (!(sysclock.host_pre_cycles <= sysclock.nic_pre_cycles &&
183 sysclock.nic_pre_cycles <= sysclock.nic_post_cycles &&
184 sysclock.nic_post_cycles <= sysclock.host_post_cycles)) {
185 dev_err_ratelimited(&priv->pdev->dev,
> 186 "AdminQ system clock cycle counts out of order. Expecting %llu <= %llu <= %llu <= %llu\n",
187 sysclock.host_pre_cycles,
188 sysclock.nic_pre_cycles,
189 sysclock.nic_post_cycles,
190 sysclock.host_post_cycles);
191 return -EBADMSG;
192 }
193
194 err = gve_cycles_to_timespec64(priv, sts->clockid, &snap,
195 sysclock.nic_pre_cycles,
196 &sts->pre_ts);
197 if (err)
198 return err;
199
200 err = gve_cycles_to_timespec64(priv, sts->clockid, &snap,
201 sysclock.nic_post_cycles,
202 &sts->post_ts);
203 if (err)
204 return err;
205 }
206
207 *ts = ns_to_timespec64(nic_ts);
208
209 return 0;
210 }
211
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki