Re: [PATCH net-next 3/3] gve: implement PTP gettimex64
From: kernel test robot
Date: Thu Mar 26 2026 - 03:52:53 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: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20260326/202603261542.ki4x7Oq5-lkp@xxxxxxxxx/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260326/202603261542.ki4x7Oq5-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/202603261542.ki4x7Oq5-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
>> drivers/net/ethernet/google/gve/gve_ptp.c:187:10: warning: format specifies type 'unsigned long long' but the argument has type 'cycles_t' (aka 'unsigned long') [-Wformat]
186 | "AdminQ system clock cycle counts out of order. Expecting %llu <= %llu <= %llu <= %llu\n",
| ~~~~
| %lu
187 | sysclock.host_pre_cycles,
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:225:45: note: expanded from macro 'dev_err_ratelimited'
225 | dev_level_ratelimited(dev_err, dev, fmt, ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:215:25: note: expanded from macro 'dev_level_ratelimited'
215 | dev_level(dev, fmt, ##__VA_ARGS__); \
| ~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:154:65: note: expanded from macro 'dev_err'
154 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ~~~ ^~~~~~~~~~~
drivers/net/ethernet/google/gve/gve_ptp.c:190:10: warning: format specifies type 'unsigned long long' but the argument has type 'cycles_t' (aka 'unsigned long') [-Wformat]
186 | "AdminQ system clock cycle counts out of order. Expecting %llu <= %llu <= %llu <= %llu\n",
| ~~~~
| %lu
187 | sysclock.host_pre_cycles,
188 | sysclock.nic_pre_cycles,
189 | sysclock.nic_post_cycles,
190 | sysclock.host_post_cycles);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:225:45: note: expanded from macro 'dev_err_ratelimited'
225 | dev_level_ratelimited(dev_err, dev, fmt, ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:215:25: note: expanded from macro 'dev_level_ratelimited'
215 | dev_level(dev, fmt, ##__VA_ARGS__); \
| ~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:154:65: note: expanded from macro 'dev_err'
154 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ~~~ ^~~~~~~~~~~
2 warnings generated.
vim +187 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