Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Thomas Gleixner <tglx@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	"David Woodhouse" <dwmw@amazon.co.uk>,
	"Thomas Weißschuh " <thomas.weissschuh@linutronix.de>,
	"Jacob Keller" <jacob.e.keller@intel.com>
Subject: [tglx-devel:timers/ptp/timekeeping 5/25] arch/arm64/kvm/hyp_trace.c:121:24: error: incompatible pointer to integer conversion passing 'struct system_time_snapshot *' to parameter of type 'clockid_t' (aka 'int')
Date: Sat, 30 May 2026 05:14:45 +0800	[thread overview]
Message-ID: <202605300546.8ECpP0yn-lkp@intel.com> (raw)

Hi Thomas,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git timers/ptp/timekeeping
head:   cce2d296ed625dd88668132db78630d56cf395b8
commit: 3eefddc1140e90aca653f4234915cf65959d2fdc [5/25] KVM: arm64: Use ktime_get_snapshot_id() to retrieve CLOCK_BOOTTIME
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20260530/202605300546.8ECpP0yn-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/20260530/202605300546.8ECpP0yn-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/202605300546.8ECpP0yn-lkp@intel.com/

All errors (new ones prefixed by >>):

>> arch/arm64/kvm/hyp_trace.c:121:24: error: incompatible pointer to integer conversion passing 'struct system_time_snapshot *' to parameter of type 'clockid_t' (aka 'int') [-Wint-conversion]
     121 |         ktime_get_snapshot_id(&snap, CLOCK_BOOTTIME);
         |                               ^~~~~
   include/linux/timekeeping.h:355:45: note: passing argument to parameter 'clock_id' here
     355 | extern void ktime_get_snapshot_id(clockid_t clock_id, struct system_time_snapshot *systime_snapshot);
         |                                             ^
>> arch/arm64/kvm/hyp_trace.c:121:31: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'struct system_time_snapshot *' [-Wint-conversion]
     121 |         ktime_get_snapshot_id(&snap, CLOCK_BOOTTIME);
         |                                      ^~~~~~~~~~~~~~
   include/uapi/linux/time.h:56:26: note: expanded from macro 'CLOCK_BOOTTIME'
      56 | #define CLOCK_BOOTTIME                  7
         |                                         ^
   include/linux/timekeeping.h:355:84: note: passing argument to parameter 'systime_snapshot' here
     355 | extern void ktime_get_snapshot_id(clockid_t clock_id, struct system_time_snapshot *systime_snapshot);
         |                                                                                    ^
   2 errors generated.


vim +121 arch/arm64/kvm/hyp_trace.c

   108	
   109	static void hyp_trace_clock_enable(struct hyp_trace_clock *hyp_clock, bool enable)
   110	{
   111		struct system_time_snapshot snap;
   112	
   113		if (hyp_clock->running == enable)
   114			return;
   115	
   116		if (!enable) {
   117			cancel_delayed_work_sync(&hyp_clock->work);
   118			hyp_clock->running = false;
   119		}
   120	
 > 121		ktime_get_snapshot_id(&snap, CLOCK_BOOTTIME);
   122	
   123		hyp_clock->boot = ktime_to_ns(snap.systime);
   124		hyp_clock->cycles = snap.cycles;
   125		hyp_clock->mult = 0;
   126	
   127		init_completion(&hyp_clock->ready);
   128		INIT_DELAYED_WORK(&hyp_clock->work, __hyp_clock_work);
   129		schedule_delayed_work(&hyp_clock->work, msecs_to_jiffies(CLOCK_INIT_MS));
   130		wait_for_completion(&hyp_clock->ready);
   131		hyp_clock->running = true;
   132	}
   133	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-05-29 21:14 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=202605300546.8ECpP0yn-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dwmw@amazon.co.uk \
    --cc=jacob.e.keller@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=tglx@kernel.org \
    --cc=thomas.weissschuh@linutronix.de \
    /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