Re: [PATCH v2 0/3] sysfs: constify bin_attribute argument of sysfs_bin_attr_simple_read()
From: Thomas Weißschuh
Date: Tue Dec 31 2024 - 05:37:14 EST
On 2024-12-30 16:50:41-0800, Alexei Starovoitov wrote:
> On Sat, Dec 28, 2024 at 12:43 AM Thomas Weißschuh <linux@xxxxxxxxxxxxxx> wrote:
> >
> > Most users use this function through the BIN_ATTR_SIMPLE* macros,
> > they can handle the switch transparently.
> >
> > This series is meant to be merged through the driver core tree.
>
> hmm. why?
Patch 1 changes the signature of sysfs_bin_attr_simple_read().
Before patch 1 sysfs_bin_attr_simple_read() needs to be assigned to the
callback member .read, after patch 1 it's .read_new.
(Both callbacks work exactly the same, except for their signature,
.read_new is only a transition mechanism and will go away again)
> I'd rather take patches 2 and 3 into bpf-next to avoid
> potential conflicts.
> Patch 1 looks orthogonal and independent.
If you pick up 2 and 3 through bpf-next you would need to adapt these
assignments. As soon as both patch 1 and the modified 2 and 3 hit
Linus' tree, the build would break due to mismatches function pointers.
(Casting function pointers to avoid the mismatch will blow up with KCFI)
Of course Linus can fix this up easily, but it somebody would need to
keep track of it and I wanted to avoid manual intervention.
Or we spread out both parts over two development cycles; maybe Greg can
even pick up patch 1 late in the 6.13 cycle.
Personally I am fine with any approach.