All of lore.kernel.org
 help / color / mirror / Atom feed
* [dwmw2:hardpps-filter-soak 32/33] drivers/ptp/ptp_gnss_extint.c:349:27: warning: variable 'raw_pre' set but not used
@ 2026-10-18  1:32 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-10-18  1:32 UTC (permalink / raw)
  To: David Woodhouse; +Cc: llvm, oe-kbuild-all

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-18  1:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-18  1:32 [dwmw2:hardpps-filter-soak 32/33] drivers/ptp/ptp_gnss_extint.c:349:27: warning: variable 'raw_pre' set but not used kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.