Skip to content

Commit 99e731b

Browse files
committed
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
2 parents 0b29600 + e78f70b commit 99e731b

File tree

28 files changed

+34
-34
lines changed

28 files changed

+34
-34
lines changed

arch/microblaze/kernel/timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ static struct timecounter xilinx_tc = {
193193
.cc = NULL,
194194
};
195195

196-
static u64 xilinx_cc_read(const struct cyclecounter *cc)
196+
static u64 xilinx_cc_read(struct cyclecounter *cc)
197197
{
198198
return xilinx_read(NULL);
199199
}

drivers/clocksource/arm_arch_timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ static u64 arch_counter_read(struct clocksource *cs)
243243
return arch_timer_read_counter();
244244
}
245245

246-
static u64 arch_counter_read_cc(const struct cyclecounter *cc)
246+
static u64 arch_counter_read_cc(struct cyclecounter *cc)
247247
{
248248
return arch_timer_read_counter();
249249
}

drivers/net/can/rockchip/rockchip_canfd-timestamp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include "rockchip_canfd.h"
1010

11-
static u64 rkcanfd_timestamp_read(const struct cyclecounter *cc)
11+
static u64 rkcanfd_timestamp_read(struct cyclecounter *cc)
1212
{
1313
const struct rkcanfd_priv *priv = container_of(cc, struct rkcanfd_priv, cc);
1414

drivers/net/can/spi/mcp251xfd/mcp251xfd-timestamp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#include "mcp251xfd.h"
1313

14-
static u64 mcp251xfd_timestamp_raw_read(const struct cyclecounter *cc)
14+
static u64 mcp251xfd_timestamp_raw_read(struct cyclecounter *cc)
1515
{
1616
const struct mcp251xfd_priv *priv;
1717
u32 ts_raw = 0;

drivers/net/can/usb/gs_usb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ static inline int gs_usb_get_timestamp(const struct gs_usb *parent,
420420
return 0;
421421
}
422422

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

drivers/net/dsa/mv88e6xxx/chip.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ struct mv88e6xxx_avb_ops {
732732
};
733733

734734
struct mv88e6xxx_ptp_ops {
735-
u64 (*clock_read)(const struct cyclecounter *cc);
735+
u64 (*clock_read)(struct cyclecounter *cc);
736736
int (*ptp_enable)(struct ptp_clock_info *ptp,
737737
struct ptp_clock_request *rq, int on);
738738
int (*ptp_verify)(struct ptp_clock_info *ptp, unsigned int pin,

drivers/net/dsa/mv88e6xxx/ptp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ mv88e6xxx_cc_coeff_get(struct mv88e6xxx_chip *chip)
138138
}
139139
}
140140

141-
static u64 mv88e6352_ptp_clock_read(const struct cyclecounter *cc)
141+
static u64 mv88e6352_ptp_clock_read(struct cyclecounter *cc)
142142
{
143143
struct mv88e6xxx_chip *chip = cc_to_chip(cc);
144144
u16 phc_time[2];
@@ -152,7 +152,7 @@ static u64 mv88e6352_ptp_clock_read(const struct cyclecounter *cc)
152152
return ((u32)phc_time[1] << 16) | phc_time[0];
153153
}
154154

155-
static u64 mv88e6165_ptp_clock_read(const struct cyclecounter *cc)
155+
static u64 mv88e6165_ptp_clock_read(struct cyclecounter *cc)
156156
{
157157
struct mv88e6xxx_chip *chip = cc_to_chip(cc);
158158
u16 phc_time[2];
@@ -483,7 +483,7 @@ const struct mv88e6xxx_ptp_ops mv88e6390_ptp_ops = {
483483
(1 << HWTSTAMP_FILTER_PTP_V2_DELAY_REQ),
484484
};
485485

486-
static u64 mv88e6xxx_ptp_clock_read(const struct cyclecounter *cc)
486+
static u64 mv88e6xxx_ptp_clock_read(struct cyclecounter *cc)
487487
{
488488
struct mv88e6xxx_chip *chip = cc_to_chip(cc);
489489

drivers/net/ethernet/amd/xgbe/xgbe-ptp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include "xgbe.h"
1414
#include "xgbe-common.h"
1515

16-
static u64 xgbe_cc_read(const struct cyclecounter *cc)
16+
static u64 xgbe_cc_read(struct cyclecounter *cc)
1717
{
1818
struct xgbe_prv_data *pdata = container_of(cc,
1919
struct xgbe_prv_data,

drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15176,7 +15176,7 @@ void bnx2x_set_rx_ts(struct bnx2x *bp, struct sk_buff *skb)
1517615176
}
1517715177

1517815178
/* Read the PHC */
15179-
static u64 bnx2x_cyclecounter_read(const struct cyclecounter *cc)
15179+
static u64 bnx2x_cyclecounter_read(struct cyclecounter *cc)
1518015180
{
1518115181
struct bnx2x *bp = container_of(cc, struct bnx2x, cyclecounter);
1518215182
int port = BP_PORT(bp);

drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ static void bnxt_unmap_ptp_regs(struct bnxt *bp)
702702
(BNXT_PTP_GRC_WIN - 1) * 4);
703703
}
704704

705-
static u64 bnxt_cc_read(const struct cyclecounter *cc)
705+
static u64 bnxt_cc_read(struct cyclecounter *cc)
706706
{
707707
struct bnxt_ptp_cfg *ptp = container_of(cc, struct bnxt_ptp_cfg, cc);
708708
u64 ns = 0;

0 commit comments

Comments
 (0)