From: kernel test robot <lkp@intel.com>
To: David Woodhouse <dwmw@amazon.co.uk>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [dwmw2:hardpps-filter-soak 32/33] drivers/ptp/ptp_gnss_extint.c:349:27: warning: variable 'raw_pre' set but not used
Date: Sun, 18 Oct 2026 09:32:06 +0800 [thread overview]
Message-ID: <202610180911.5VdX6eyB-lkp@intel.com> (raw)
tree: git://git.infradead.org/users/dwmw2/linux hardpps-filter-soak
head: d2ddff11f0edd8219413b800af3cee8f28aa858d
commit: 2b23d81ff6919d919634c599e3f9bb18ddc6affb [32/33] [PROTOTYPE] ptp: ptp_gnss_extint: Synthesize a latency-free PPS source
config: arm-randconfig-1001-20261018 (https://download.01.org/0day-ci/archive/20261018/202610180911.5VdX6eyB-lkp@intel.com/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/20261018/202610180911.5VdX6eyB-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202610180911.5VdX6eyB-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/ptp/ptp_gnss_extint.c:349:27: warning: variable 'raw_pre' set but not used [-Wunused-but-set-variable]
349 | u64 real_pre, real_post, raw_pre, raw_post;
| ^
>> drivers/ptp/ptp_gnss_extint.c:349:36: warning: variable 'raw_post' set but not used [-Wunused-but-set-variable]
349 | u64 real_pre, real_post, raw_pre, raw_post;
| ^
2 warnings generated.
vim +/raw_pre +349 drivers/ptp/ptp_gnss_extint.c
345
346 static void gnss_extint_pps_work(struct work_struct *work)
347 {
348 struct gnss_extint *ge = container_of(work, struct gnss_extint, pps_work);
> 349 u64 real_pre, real_post, raw_pre, raw_post;
350 s64 tgps, delta = 0;
351 unsigned long flags;
352 bool ok = false;
353
354 mutex_lock(&ge->xts_lock);
355 reinit_completion(&ge->tm2_done);
356
357 local_irq_save(flags);
358 gpiod_set_value(ge->extint, 0); /* warm the set path */
359 raw_pre = ktime_get_raw_ns();
360 real_pre = ktime_get_real_ns();
361 gpiod_set_value(ge->extint, 1);
362 real_post = ktime_get_real_ns();
363 raw_post = ktime_get_raw_ns();
364 local_irq_restore(flags);
365
366 if (wait_for_completion_interruptible_timeout(&ge->tm2_done,
367 msecs_to_jiffies(1500)) > 0) {
368 tgps = ktime_to_ns(ge->tm2_utc);
369 delta = NSEC_PER_SEC * div64_s64(tgps + NSEC_PER_SEC / 2,
370 NSEC_PER_SEC) - tgps;
371 ok = true;
372 }
373 gpiod_set_value(ge->extint, 0);
374
375 if (ok) {
376 struct ptp_clock_event evt = {
377 .type = PTP_CLOCK_PPSUSR,
378 };
379
380 evt.pps_times.ts_real = ns_to_timespec64(
381 (real_pre + real_post) / 2 + delta);
382 #ifdef CONFIG_NTP_PPS
383 evt.pps_times.ts_raw = ns_to_timespec64(
384 (raw_pre + raw_post) / 2 + delta);
385 #endif
386 ptp_clock_event(ge->ptp, &evt);
387 }
388
389 /* steer the next edge onto the GPS second boundary */
390 ge->pps_next = ktime_add_ns(ge->pps_next, NSEC_PER_SEC + delta);
391 hrtimer_start(&ge->pps_timer, ge->pps_next, HRTIMER_MODE_ABS);
392 mutex_unlock(&ge->xts_lock);
393 }
394
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-10-18 1:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202610180911.5VdX6eyB-lkp@intel.com \
--to=lkp@intel.com \
--cc=dwmw@amazon.co.uk \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox