Files
Centos-kernel-stream-9/drivers/clocksource
Ivan Vecera 7060727325 time/timecounter: Fix the lie that struct cyclecounter is const
JIRA: https://issues.redhat.com/browse/RHEL-127559

Conflicts:
- drivers/net/can/rockchip/rockchip_canfd-timestamp.c
  omitted, driver missing
- drivers/net/can/spi/mcp251xfd/mcp251xfd-timestamp.c
  adjusted due to missing e793c724b48ca ("can: mcp251xfd: clarify the
  meaning of timestamp")
- drivers/net/dsa/mv88e6xxx/ptp.c
  context conflict due to missing 7e3c18097a709 ("net: dsa: mv88e6xxx:
  read cycle counter period from hardware")
- drivers/net/ethernet/wangxun/libwx/wx_ptp.c
  omitted, driver missing

commit e78f70bad29c5ae1e1076698b690b15794e9b81e
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Tue Jul 1 14:32:25 2025 +0200

    time/timecounter: Fix the lie that struct cyclecounter is const

    In both the read callback for struct cyclecounter, and in struct
    timecounter, struct cyclecounter is declared as a const pointer.

    Unfortunatly, a number of users of this pointer treat it as a non-const
    pointer as it is burried in a larger structure that is heavily modified by
    the callback function when accessed.  This lie had been hidden by the fact
    that container_of() "casts away" a const attribute of a pointer without any
    compiler warning happening at all.

    Fix this all up by removing the const attribute in the needed places so
    that everyone can see that the structure really isn't const, but can,
    and is, modified by the users of it.

    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Link: https://lore.kernel.org/all/2025070124-backyard-hurt-783a@gregkh

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
2025-11-26 10:26:04 +01:00
..