Commit 99e731bc authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'timers-cleanups-2025-07-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer cleanups from Thomas Gleixner:
 "A treewide cleanup of struct cycle_counter const annotations.

  The initial idea of making them const was correct as they were
  seperate instances. When they got embedded into larger data
  structures, which are even modified by the callback this got moot. The
  only reason why this went unnoticed is that the required
  container_of() casts the const attribute forcefully away.

  Stop pretending that it is const"

* tag 'timers-cleanups-2025-07-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  time/timecounter: Fix the lie that struct cyclecounter is const
parents 0b29600a e78f70ba
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -193,7 +193,7 @@ static struct timecounter xilinx_tc = {
	.cc = NULL,
};

static u64 xilinx_cc_read(const struct cyclecounter *cc)
static u64 xilinx_cc_read(struct cyclecounter *cc)
{
	return xilinx_read(NULL);
}
+1 −1
Original line number Diff line number Diff line
@@ -243,7 +243,7 @@ static u64 arch_counter_read(struct clocksource *cs)
	return arch_timer_read_counter();
}

static u64 arch_counter_read_cc(const struct cyclecounter *cc)
static u64 arch_counter_read_cc(struct cyclecounter *cc)
{
	return arch_timer_read_counter();
}
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@

#include "rockchip_canfd.h"

static u64 rkcanfd_timestamp_read(const struct cyclecounter *cc)
static u64 rkcanfd_timestamp_read(struct cyclecounter *cc)
{
	const struct rkcanfd_priv *priv = container_of(cc, struct rkcanfd_priv, cc);

+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@

#include "mcp251xfd.h"

static u64 mcp251xfd_timestamp_raw_read(const struct cyclecounter *cc)
static u64 mcp251xfd_timestamp_raw_read(struct cyclecounter *cc)
{
	const struct mcp251xfd_priv *priv;
	u32 ts_raw = 0;
+1 −1
Original line number Diff line number Diff line
@@ -420,7 +420,7 @@ static inline int gs_usb_get_timestamp(const struct gs_usb *parent,
	return 0;
}

static u64 gs_usb_timestamp_read(const struct cyclecounter *cc) __must_hold(&dev->tc_lock)
static u64 gs_usb_timestamp_read(struct cyclecounter *cc) __must_hold(&dev->tc_lock)
{
	struct gs_usb *parent = container_of(cc, struct gs_usb, cc);
	u32 timestamp = 0;
Loading