From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA8E813D521; Tue, 31 Dec 2024 10:36:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735641425; cv=none; b=ptE4bPan0kktAudBErgHNHFb9FRyIAeYhVT9sijO/wfO51PvS84N3CKXYpBj3XHdenf55t8FlxY5exM7dfofzpASyaSP86b6SOVXhR7CBiYN4O5iVclLWBG4lCvm+y/ARcoLzEhw8dLiVBVUwuWIHHZlHuDtwF9EVno6i/E4cOY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735641425; c=relaxed/simple; bh=4WpB7p6ZcZfKydZjt9Pw6SFgQmWRdOIiB6z20vQcdqg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=H4ITaCkmLPVQ6jHJHL1lcpHar/gDDv0T7fTshudDC236slBMl9DzxkeChYc0YElvXj8iLxpfywdOm4Ok5hgULLdvYhvwkRqsaSOIufoKArthKUadCRGOv5mJGes3dsGJRc5cvuwTq+sTUFebDGvWKZyeo65EmbLe89XKtKLesg4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=UEC2ZwhD; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="UEC2ZwhD" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1735641050; bh=4WpB7p6ZcZfKydZjt9Pw6SFgQmWRdOIiB6z20vQcdqg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UEC2ZwhDxV5XTXZrc9RSUrw990XCjxNtuzV1rt4h9taux0InFTexNqNvKISUQnu9M ANQRa+jNB+4qFDnWpi4a4kRn2pMBslONPxV4D4jq32v+cuC03aKz2cIlMx2ocJ1GXg MS+kr7jeBlqxCdj2D+xwmyVbnKSSvy+11GntmUOI= Date: Tue, 31 Dec 2024 11:30:50 +0100 From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Alexei Starovoitov Cc: Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan , Greg Kroah-Hartman , "Rafael J. Wysocki" , Luis Chamberlain , Petr Pavlu , Sami Tolvanen , Daniel Gomez , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , ppc-dev , LKML , linux-modules@vger.kernel.org, bpf Subject: Re: [PATCH v2 0/3] sysfs: constify bin_attribute argument of sysfs_bin_attr_simple_read() Message-ID: <0cbfd352-ee3b-4670-afae-8e56d888e8c3@t-8ch.de> References: <20241228-sysfs-const-bin_attr-simple-v2-0-7c6f3f1767a3@weissschuh.net> Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On 2024-12-30 16:50:41-0800, Alexei Starovoitov wrote: > On Sat, Dec 28, 2024 at 12:43 AM Thomas Weißschuh 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.