[PATCH v3 0/6] sysfs: finalize the constification of 'struct bin_attribute'

Thomas Weißschuh posted 6 patches 8 months, 2 weeks ago
There is a newer version of this series
arch/powerpc/kernel/secvar-sysfs.c                 |  2 +-
arch/powerpc/perf/hv-24x7.c                        |  2 +-
arch/powerpc/platforms/powernv/opal-core.c         |  4 +--
arch/powerpc/platforms/powernv/opal-dump.c         |  2 +-
arch/powerpc/platforms/powernv/opal-elog.c         |  2 +-
arch/powerpc/platforms/powernv/opal-flash.c        |  2 +-
arch/powerpc/platforms/powernv/opal-msglog.c       |  2 +-
arch/powerpc/platforms/powernv/opal.c              |  2 +-
arch/powerpc/platforms/powernv/ultravisor.c        |  2 +-
arch/s390/kernel/cpacf.c                           |  2 +-
arch/s390/kernel/ipl.c                             | 18 ++++++------
arch/s390/pci/pci_sysfs.c                          |  2 +-
arch/x86/kernel/ksysfs.c                           |  8 ++---
drivers/accel/habanalabs/common/sysfs.c            |  4 +--
drivers/acpi/bgrt.c                                |  2 +-
drivers/acpi/sysfs.c                               |  4 +--
drivers/base/devcoredump.c                         |  2 +-
drivers/base/firmware_loader/sysfs.c               |  6 ++--
drivers/base/node.c                                |  2 +-
drivers/base/topology.c                            |  2 +-
drivers/cxl/port.c                                 |  2 +-
drivers/firmware/efi/mokvar-table.c                |  2 +-
drivers/firmware/google/cbmem.c                    |  2 +-
drivers/firmware/google/gsmi.c                     |  2 +-
drivers/firmware/google/memconsole.c               |  2 +-
drivers/firmware/google/vpd.c                      |  4 +--
drivers/firmware/qemu_fw_cfg.c                     |  2 +-
drivers/fsi/fsi-core.c                             |  4 +--
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c            |  6 ++--
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c            |  2 +-
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c |  4 +--
drivers/gpu/drm/drm_sysfs.c                        |  4 +--
drivers/gpu/drm/i915/i915_gpu_error.c              |  4 +--
drivers/gpu/drm/i915/i915_sysfs.c                  |  8 ++---
drivers/gpu/drm/lima/lima_drv.c                    |  4 +--
drivers/hid/hid-core.c                             |  2 +-
drivers/hid/hid-roccat-arvo.c                      |  2 +-
drivers/hid/hid-roccat-common.h                    |  8 ++---
drivers/hid/hid-roccat-isku.c                      | 10 +++----
drivers/hid/hid-roccat-kone.c                      |  6 ++--
drivers/hid/hid-roccat-koneplus.c                  | 14 ++++-----
drivers/hid/hid-roccat-konepure.c                  |  2 +-
drivers/hid/hid-roccat-kovaplus.c                  | 12 ++++----
drivers/hid/hid-roccat-lua.c                       |  4 +--
drivers/hid/hid-roccat-pyra.c                      | 14 ++++-----
drivers/hid/hid-roccat-ryos.c                      |  2 +-
drivers/hid/hid-roccat-savu.c                      |  2 +-
drivers/i2c/i2c-slave-eeprom.c                     |  4 +--
drivers/iio/imu/bno055/bno055.c                    |  2 +-
drivers/infiniband/hw/hfi1/sysfs.c                 |  2 +-
drivers/infiniband/hw/qib/qib_sysfs.c              |  2 +-
drivers/input/touchscreen/goodix_berlin_core.c     |  2 +-
drivers/leds/led-class.c                           |  2 +-
drivers/media/pci/solo6x10/solo6x10-core.c         |  2 +-
drivers/misc/c2port/core.c                         |  2 +-
drivers/misc/ds1682.c                              |  4 +--
drivers/misc/eeprom/max6875.c                      |  2 +-
drivers/misc/ocxl/sysfs.c                          |  2 +-
drivers/misc/pch_phub.c                            |  4 +--
drivers/misc/sram.c                                |  4 +--
drivers/mtd/spi-nor/sysfs.c                        |  2 +-
.../net/ethernet/qlogic/netxen/netxen_nic_main.c   | 10 +++----
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c  | 34 +++++++++++-----------
drivers/net/phy/spi_ks8995.c                       |  4 +--
drivers/net/wireless/ti/wlcore/sysfs.c             |  2 +-
drivers/nvmem/core.c                               | 14 ++++-----
drivers/of/kobj.c                                  |  2 +-
drivers/pci/hotplug/acpiphp_ibm.c                  |  2 +-
drivers/pci/p2pdma.c                               |  2 +-
drivers/pci/pci-sysfs.c                            | 12 ++++----
drivers/pci/vpd.c                                  |  2 +-
drivers/pcmcia/cistpl.c                            |  4 +--
drivers/platform/chrome/cros_ec_vbc.c              |  2 +-
drivers/platform/mellanox/mlxbf-bootctl.c          |  2 +-
drivers/platform/x86/amd/hsmp/acpi.c               |  4 +--
drivers/platform/x86/amd/hsmp/plat.c               |  4 +--
drivers/platform/x86/dell/dcdbas.c                 |  2 +-
drivers/platform/x86/dell/dell_rbu.c               |  2 +-
drivers/platform/x86/intel/pmt/class.c             |  2 +-
drivers/platform/x86/intel/sdsi.c                  |  2 +-
drivers/platform/x86/wmi-bmof.c                    |  2 +-
drivers/power/supply/ds2760_battery.c              |  2 +-
drivers/power/supply/ds2780_battery.c              | 10 +++----
drivers/power/supply/ds2781_battery.c              | 10 +++----
drivers/power/supply/olpc_battery.c                |  4 +--
drivers/ptp/ptp_ocp.c                              |  2 +-
drivers/rapidio/rio-sysfs.c                        |  6 ++--
drivers/s390/char/sclp_config.c                    |  2 +-
drivers/s390/char/sclp_sd.c                        |  2 +-
drivers/s390/cio/chp.c                             |  2 +-
drivers/s390/crypto/pkey_sysfs.c                   |  8 ++---
drivers/scsi/3w-sas.c                              |  4 +--
drivers/scsi/arcmsr/arcmsr_attr.c                  |  6 ++--
drivers/scsi/esas2r/esas2r_main.c                  |  6 ++--
drivers/scsi/ibmvscsi/ibmvfc.c                     |  2 +-
drivers/scsi/ipr.c                                 | 10 +++----
drivers/scsi/lpfc/lpfc_attr.c                      |  8 ++---
drivers/scsi/qedf/qedf_attr.c                      |  4 +--
drivers/scsi/qla2xxx/qla_attr.c                    | 28 +++++++++---------
drivers/scsi/qla4xxx/ql4_attr.c                    |  4 +--
drivers/scsi/scsi_sysfs.c                          |  6 ++--
drivers/usb/core/sysfs.c                           |  2 +-
drivers/usb/usbip/vudc_sysfs.c                     |  2 +-
drivers/video/fbdev/aty/radeon_base.c              |  4 +--
drivers/video/fbdev/udlfb.c                        |  4 +--
drivers/virt/coco/guest/tsm-mr.c                   |  8 ++---
drivers/w1/slaves/w1_ds2406.c                      |  4 +--
drivers/w1/slaves/w1_ds2408.c                      |  2 +-
drivers/w1/slaves/w1_ds2413.c                      |  2 +-
drivers/w1/slaves/w1_ds2430.c                      |  2 +-
drivers/w1/slaves/w1_ds2431.c                      |  2 +-
drivers/w1/slaves/w1_ds2433.c                      | 12 ++++----
drivers/w1/slaves/w1_ds2438.c                      |  2 +-
drivers/w1/slaves/w1_ds2780.c                      |  2 +-
drivers/w1/slaves/w1_ds2781.c                      |  2 +-
drivers/w1/slaves/w1_ds2805.c                      |  4 +--
drivers/w1/slaves/w1_ds28e04.c                     |  2 +-
drivers/w1/w1.c                                    |  2 +-
drivers/zorro/zorro-sysfs.c                        |  4 +--
fs/sysfs/file.c                                    | 32 +++++++-------------
include/linux/sysfs.h                              | 11 ++-----
kernel/bpf/btf.c                                   |  2 +-
kernel/bpf/sysfs_btf.c                             |  2 +-
kernel/module/sysfs.c                              | 14 ++++-----
mm/page_idle.c                                     |  2 +-
net/bridge/br_sysfs_br.c                           |  2 +-
scripts/const_structs.checkpatch                   |  1 +
127 files changed, 292 insertions(+), 310 deletions(-)
[PATCH v3 0/6] sysfs: finalize the constification of 'struct bin_attribute'
Posted by Thomas Weißschuh 8 months, 2 weeks ago
All users have been migrated to the new const types.
Change the types of the normal fields, switch all users over and then
get rid of the transition machinery.

The treewide changes have been done with sed/grep.
Based on top of next-20250528.
Meant to be applied around the end of the merge window.
As it is not clear what goes into the merge window this is done on
linux-next. Applying it will probably create some trivially to resolve
conflicts.

After applying, make sure no leftovers are left:
$ git grep bin_attrs_new
$ git grep read_new ':!drivers/block/swim_asm.S'
$ git grep write_new ':!drivers/cpufreq/powernow-k8.c' ':!drivers/s390/char/monwriter.c'

I'm only sending this to the sysfs maintainers. The treewide changes are
purely mechanical.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Changes in v3:
- Drop already applied patches
- Constify internal references in fs/sysfs/file.c
- Update const_structs.checkpatch
- Rebase on linux-next/master
- Link to v2: https://lore.kernel.org/r/20250313-sysfs-const-bin_attr-final-v2-0-96284e1e88ce@weissschuh.net

Changes in v2:
- Rebase onto current driver-core-next.
- Remove prerequisites list from cover letter.
- Link to v1: https://lore.kernel.org/r/20250219-sysfs-const-bin_attr-final-v1-0-02828d86af3c@weissschuh.net

---
Thomas Weißschuh (6):
      const_structs.checkpatch: add bin_attribute
      sysfs: constify internal references to 'struct bin_attribute'
      sysfs: treewide: switch back to bin_attribute::read()/write()
      sysfs: treewide: switch back to attribute_group::bin_attrs
      sysfs: remove bin_attribute::read_new/write_new()
      sysfs: remove attribute_group::bin_attrs_new

 arch/powerpc/kernel/secvar-sysfs.c                 |  2 +-
 arch/powerpc/perf/hv-24x7.c                        |  2 +-
 arch/powerpc/platforms/powernv/opal-core.c         |  4 +--
 arch/powerpc/platforms/powernv/opal-dump.c         |  2 +-
 arch/powerpc/platforms/powernv/opal-elog.c         |  2 +-
 arch/powerpc/platforms/powernv/opal-flash.c        |  2 +-
 arch/powerpc/platforms/powernv/opal-msglog.c       |  2 +-
 arch/powerpc/platforms/powernv/opal.c              |  2 +-
 arch/powerpc/platforms/powernv/ultravisor.c        |  2 +-
 arch/s390/kernel/cpacf.c                           |  2 +-
 arch/s390/kernel/ipl.c                             | 18 ++++++------
 arch/s390/pci/pci_sysfs.c                          |  2 +-
 arch/x86/kernel/ksysfs.c                           |  8 ++---
 drivers/accel/habanalabs/common/sysfs.c            |  4 +--
 drivers/acpi/bgrt.c                                |  2 +-
 drivers/acpi/sysfs.c                               |  4 +--
 drivers/base/devcoredump.c                         |  2 +-
 drivers/base/firmware_loader/sysfs.c               |  6 ++--
 drivers/base/node.c                                |  2 +-
 drivers/base/topology.c                            |  2 +-
 drivers/cxl/port.c                                 |  2 +-
 drivers/firmware/efi/mokvar-table.c                |  2 +-
 drivers/firmware/google/cbmem.c                    |  2 +-
 drivers/firmware/google/gsmi.c                     |  2 +-
 drivers/firmware/google/memconsole.c               |  2 +-
 drivers/firmware/google/vpd.c                      |  4 +--
 drivers/firmware/qemu_fw_cfg.c                     |  2 +-
 drivers/fsi/fsi-core.c                             |  4 +--
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c            |  6 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c            |  2 +-
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c |  4 +--
 drivers/gpu/drm/drm_sysfs.c                        |  4 +--
 drivers/gpu/drm/i915/i915_gpu_error.c              |  4 +--
 drivers/gpu/drm/i915/i915_sysfs.c                  |  8 ++---
 drivers/gpu/drm/lima/lima_drv.c                    |  4 +--
 drivers/hid/hid-core.c                             |  2 +-
 drivers/hid/hid-roccat-arvo.c                      |  2 +-
 drivers/hid/hid-roccat-common.h                    |  8 ++---
 drivers/hid/hid-roccat-isku.c                      | 10 +++----
 drivers/hid/hid-roccat-kone.c                      |  6 ++--
 drivers/hid/hid-roccat-koneplus.c                  | 14 ++++-----
 drivers/hid/hid-roccat-konepure.c                  |  2 +-
 drivers/hid/hid-roccat-kovaplus.c                  | 12 ++++----
 drivers/hid/hid-roccat-lua.c                       |  4 +--
 drivers/hid/hid-roccat-pyra.c                      | 14 ++++-----
 drivers/hid/hid-roccat-ryos.c                      |  2 +-
 drivers/hid/hid-roccat-savu.c                      |  2 +-
 drivers/i2c/i2c-slave-eeprom.c                     |  4 +--
 drivers/iio/imu/bno055/bno055.c                    |  2 +-
 drivers/infiniband/hw/hfi1/sysfs.c                 |  2 +-
 drivers/infiniband/hw/qib/qib_sysfs.c              |  2 +-
 drivers/input/touchscreen/goodix_berlin_core.c     |  2 +-
 drivers/leds/led-class.c                           |  2 +-
 drivers/media/pci/solo6x10/solo6x10-core.c         |  2 +-
 drivers/misc/c2port/core.c                         |  2 +-
 drivers/misc/ds1682.c                              |  4 +--
 drivers/misc/eeprom/max6875.c                      |  2 +-
 drivers/misc/ocxl/sysfs.c                          |  2 +-
 drivers/misc/pch_phub.c                            |  4 +--
 drivers/misc/sram.c                                |  4 +--
 drivers/mtd/spi-nor/sysfs.c                        |  2 +-
 .../net/ethernet/qlogic/netxen/netxen_nic_main.c   | 10 +++----
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c  | 34 +++++++++++-----------
 drivers/net/phy/spi_ks8995.c                       |  4 +--
 drivers/net/wireless/ti/wlcore/sysfs.c             |  2 +-
 drivers/nvmem/core.c                               | 14 ++++-----
 drivers/of/kobj.c                                  |  2 +-
 drivers/pci/hotplug/acpiphp_ibm.c                  |  2 +-
 drivers/pci/p2pdma.c                               |  2 +-
 drivers/pci/pci-sysfs.c                            | 12 ++++----
 drivers/pci/vpd.c                                  |  2 +-
 drivers/pcmcia/cistpl.c                            |  4 +--
 drivers/platform/chrome/cros_ec_vbc.c              |  2 +-
 drivers/platform/mellanox/mlxbf-bootctl.c          |  2 +-
 drivers/platform/x86/amd/hsmp/acpi.c               |  4 +--
 drivers/platform/x86/amd/hsmp/plat.c               |  4 +--
 drivers/platform/x86/dell/dcdbas.c                 |  2 +-
 drivers/platform/x86/dell/dell_rbu.c               |  2 +-
 drivers/platform/x86/intel/pmt/class.c             |  2 +-
 drivers/platform/x86/intel/sdsi.c                  |  2 +-
 drivers/platform/x86/wmi-bmof.c                    |  2 +-
 drivers/power/supply/ds2760_battery.c              |  2 +-
 drivers/power/supply/ds2780_battery.c              | 10 +++----
 drivers/power/supply/ds2781_battery.c              | 10 +++----
 drivers/power/supply/olpc_battery.c                |  4 +--
 drivers/ptp/ptp_ocp.c                              |  2 +-
 drivers/rapidio/rio-sysfs.c                        |  6 ++--
 drivers/s390/char/sclp_config.c                    |  2 +-
 drivers/s390/char/sclp_sd.c                        |  2 +-
 drivers/s390/cio/chp.c                             |  2 +-
 drivers/s390/crypto/pkey_sysfs.c                   |  8 ++---
 drivers/scsi/3w-sas.c                              |  4 +--
 drivers/scsi/arcmsr/arcmsr_attr.c                  |  6 ++--
 drivers/scsi/esas2r/esas2r_main.c                  |  6 ++--
 drivers/scsi/ibmvscsi/ibmvfc.c                     |  2 +-
 drivers/scsi/ipr.c                                 | 10 +++----
 drivers/scsi/lpfc/lpfc_attr.c                      |  8 ++---
 drivers/scsi/qedf/qedf_attr.c                      |  4 +--
 drivers/scsi/qla2xxx/qla_attr.c                    | 28 +++++++++---------
 drivers/scsi/qla4xxx/ql4_attr.c                    |  4 +--
 drivers/scsi/scsi_sysfs.c                          |  6 ++--
 drivers/usb/core/sysfs.c                           |  2 +-
 drivers/usb/usbip/vudc_sysfs.c                     |  2 +-
 drivers/video/fbdev/aty/radeon_base.c              |  4 +--
 drivers/video/fbdev/udlfb.c                        |  4 +--
 drivers/virt/coco/guest/tsm-mr.c                   |  8 ++---
 drivers/w1/slaves/w1_ds2406.c                      |  4 +--
 drivers/w1/slaves/w1_ds2408.c                      |  2 +-
 drivers/w1/slaves/w1_ds2413.c                      |  2 +-
 drivers/w1/slaves/w1_ds2430.c                      |  2 +-
 drivers/w1/slaves/w1_ds2431.c                      |  2 +-
 drivers/w1/slaves/w1_ds2433.c                      | 12 ++++----
 drivers/w1/slaves/w1_ds2438.c                      |  2 +-
 drivers/w1/slaves/w1_ds2780.c                      |  2 +-
 drivers/w1/slaves/w1_ds2781.c                      |  2 +-
 drivers/w1/slaves/w1_ds2805.c                      |  4 +--
 drivers/w1/slaves/w1_ds28e04.c                     |  2 +-
 drivers/w1/w1.c                                    |  2 +-
 drivers/zorro/zorro-sysfs.c                        |  4 +--
 fs/sysfs/file.c                                    | 32 +++++++-------------
 include/linux/sysfs.h                              | 11 ++-----
 kernel/bpf/btf.c                                   |  2 +-
 kernel/bpf/sysfs_btf.c                             |  2 +-
 kernel/module/sysfs.c                              | 14 ++++-----
 mm/page_idle.c                                     |  2 +-
 net/bridge/br_sysfs_br.c                           |  2 +-
 scripts/const_structs.checkpatch                   |  1 +
 127 files changed, 292 insertions(+), 310 deletions(-)
---
base-commit: 2a628f951ed54c30a232230b5b58349d2a8dbb11
change-id: 20250217-sysfs-const-bin_attr-final-d9e4d0cf8a1d

Best regards,
-- 
Thomas Weißschuh <linux@weissschuh.net>

Re: [PATCH v3 0/6] sysfs: finalize the constification of 'struct bin_attribute'
Posted by Thomas Weißschuh 8 months ago
Hi Greg,

friendly ping. You wanted to send this to Linux at around -rc1.
The changes should now apply cleanly to mainline.

On 2025-05-30 05:54:34+0200, Thomas Weißschuh wrote:
> All users have been migrated to the new const types.
> Change the types of the normal fields, switch all users over and then
> get rid of the transition machinery.
> 
> The treewide changes have been done with sed/grep.
> Based on top of next-20250528.
> Meant to be applied around the end of the merge window.
> As it is not clear what goes into the merge window this is done on
> linux-next. Applying it will probably create some trivially to resolve
> conflicts.
> 
> After applying, make sure no leftovers are left:
> $ git grep bin_attrs_new
> $ git grep read_new ':!drivers/block/swim_asm.S'
> $ git grep write_new ':!drivers/cpufreq/powernow-k8.c' ':!drivers/s390/char/monwriter.c'
> 
> I'm only sending this to the sysfs maintainers. The treewide changes are
> purely mechanical.
> 
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> ---
> Changes in v3:
> - Drop already applied patches
> - Constify internal references in fs/sysfs/file.c
> - Update const_structs.checkpatch
> - Rebase on linux-next/master
> - Link to v2: https://lore.kernel.org/r/20250313-sysfs-const-bin_attr-final-v2-0-96284e1e88ce@weissschuh.net
> 
> Changes in v2:
> - Rebase onto current driver-core-next.
> - Remove prerequisites list from cover letter.
> - Link to v1: https://lore.kernel.org/r/20250219-sysfs-const-bin_attr-final-v1-0-02828d86af3c@weissschuh.net
> 
> ---
> Thomas Weißschuh (6):
>       const_structs.checkpatch: add bin_attribute
>       sysfs: constify internal references to 'struct bin_attribute'
>       sysfs: treewide: switch back to bin_attribute::read()/write()
>       sysfs: treewide: switch back to attribute_group::bin_attrs
>       sysfs: remove bin_attribute::read_new/write_new()
>       sysfs: remove attribute_group::bin_attrs_new

<snip>
Re: [PATCH v3 0/6] sysfs: finalize the constification of 'struct bin_attribute'
Posted by Greg Kroah-Hartman 7 months, 4 weeks ago
On Sat, Jun 14, 2025 at 08:23:24AM +0200, Thomas Weißschuh wrote:
> Hi Greg,
> 
> friendly ping. You wanted to send this to Linux at around -rc1.
> The changes should now apply cleanly to mainline.

I've taken the first 4 patches into driver-core-testing at the moment
(will move to driver-core-next if it passes 0-day testing).  The last 2
I'll hold off of for the next -rc1 as I was way too late here, sorry, my
fault.  I blame travel, which I had to do a bunch of the past few weeks :(

thanks,

greg k-h
Re: [PATCH v3 0/6] sysfs: finalize the constification of 'struct bin_attribute'
Posted by Thomas Weißschuh 7 months, 4 weeks ago
On 2025-06-17 10:48:00+0200, Greg Kroah-Hartman wrote:
> On Sat, Jun 14, 2025 at 08:23:24AM +0200, Thomas Weißschuh wrote:
> > friendly ping. You wanted to send this to Linux at around -rc1.
> > The changes should now apply cleanly to mainline.
> 
> I've taken the first 4 patches into driver-core-testing at the moment
> (will move to driver-core-next if it passes 0-day testing).  The last 2
> I'll hold off of for the next -rc1 as I was way too late here, sorry, my
> fault.  I blame travel, which I had to do a bunch of the past few weeks :(

Works for me.

On the other hand it should be possible to take all patches through the
normal -next process right now. This is not a flag-day conversion. The final
const variants are already in v6.16-rc1, so everybody can just use those.

Thomas
Re: [PATCH v3 0/6] sysfs: finalize the constification of 'struct bin_attribute'
Posted by Greg Kroah-Hartman 7 months, 3 weeks ago
On Tue, Jun 17, 2025 at 04:06:48PM +0200, Thomas Weißschuh wrote:
> On 2025-06-17 10:48:00+0200, Greg Kroah-Hartman wrote:
> > On Sat, Jun 14, 2025 at 08:23:24AM +0200, Thomas Weißschuh wrote:
> > > friendly ping. You wanted to send this to Linux at around -rc1.
> > > The changes should now apply cleanly to mainline.
> > 
> > I've taken the first 4 patches into driver-core-testing at the moment
> > (will move to driver-core-next if it passes 0-day testing).  The last 2
> > I'll hold off of for the next -rc1 as I was way too late here, sorry, my
> > fault.  I blame travel, which I had to do a bunch of the past few weeks :(
> 
> Works for me.
> 
> On the other hand it should be possible to take all patches through the
> normal -next process right now. This is not a flag-day conversion. The final
> const variants are already in v6.16-rc1, so everybody can just use those.

There is a flag-day in that new patches could be using the old types,
right?

thanks,

greg k-h
Re: [PATCH v3 0/6] sysfs: finalize the constification of 'struct bin_attribute'
Posted by Thomas Weißschuh 7 months, 3 weeks ago
On 2025-06-18 09:50:07+0200, Greg Kroah-Hartman wrote:
> On Tue, Jun 17, 2025 at 04:06:48PM +0200, Thomas Weißschuh wrote:
> > On 2025-06-17 10:48:00+0200, Greg Kroah-Hartman wrote:
> > > On Sat, Jun 14, 2025 at 08:23:24AM +0200, Thomas Weißschuh wrote:
> > > > friendly ping. You wanted to send this to Linux at around -rc1.
> > > > The changes should now apply cleanly to mainline.
> > > 
> > > I've taken the first 4 patches into driver-core-testing at the moment
> > > (will move to driver-core-next if it passes 0-day testing).  The last 2
> > > I'll hold off of for the next -rc1 as I was way too late here, sorry, my
> > > fault.  I blame travel, which I had to do a bunch of the past few weeks :(
> > 
> > Works for me.
> > 
> > On the other hand it should be possible to take all patches through the
> > normal -next process right now. This is not a flag-day conversion. The final
> > const variants are already in v6.16-rc1, so everybody can just use those.
> 
> There is a flag-day in that new patches could be using the old types,
> right?

They could; but this should always the case, no?

For me a flag-day conversion means that there is no way for users to
be compatible with the old and new API at the same time.
So everything needs to happen at once.

But here users of the old API can adapt their code to be compatible
with both the old and new APIs at the same time.
Not that there are any users of the old API in -next anyways.

However if you want to stick to a out-of-cycle patch, that works for me, too.