From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796427493; b=r+z000krOGfSxaDVKoHzRtncH41ApJKVoa960DwFEZOdmx8x387KbeWd0vzNmeBPj2Fu +FBwiW/R7zzpHxfigidogG2XY7wf5kvCi9hJW29a2yoVUeJNnU6n5sAC249Za3VIIkBAg m7lPenJFtwNoNEs+WZTEJED0qEhPvxSUMz933RcrRqnDbmVdY1jKPcoVfIU+5WwCGkEl0 0f1+AkvsCwOQzfLm0uj4VfbO4fv45MFVHIPCXSJomwwrPTS8a0T2cqAdhUMUFMbH+YFyf fr/d3dnGQWstgglUYLsVkTzOdzj2uaC6G838V7s1H21puAJb5r0aKRXSUFHoV+yfBqA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796427493; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: In-Reply-To:References:X-Mailer:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=joEJqUc2SCb1M1lhV/W6jInhlvm9N+nIc7VphaY77vw=; b=SCLlfzYbKKL/lFhx9yxD3mez4oAUlGW/MRZeETVvn+dEbWFaWlt4lrRAlw/7FI/56i4U EZnrSsJXMyvycOlSKUt9ocuM839NcLIhPWTIbXGlO0bxH4G6uvz5rLgn1GjPwf8VLZAFH tWylXCgobSo/WMqF8YFX8uB/SMPNF5VEFJCO5wQpBXkpd/dFQejjLmm6ZiPC5cN2tFds0 j5IFBhoDk1GdgB7LOPLLvOotf5ZzMscHka5s1ZNbnq1DTxs0oW1TlLfrXjYfcryhMcDs3 JaDIbYoyZnlhv+FXi+lpUkt0ZFNdl+/FOrOhNMRoRdUKwYIRDn5Sq3wqPraaTxtNRmg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=PN4JomKk; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF961606A339; Fri, 4 Dec 2026 23:38:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=PN4JomKk Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A6EF1F00A20; Fri, 4 Dec 2026 23:38:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796427492; bh=joEJqUc2SCb1M1lhV/W6jInhlvm9N+nIc7VphaY77vw=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=PN4JomKk8szfx9zZRJVdr3iKZ9H9+kXHOtatFARzLne32mvgyoDyOqdoOHLMEq9di naaf/EvgXbUn7hYEgWwdaC0gEVwGudQm9v1E5kR0zMekgrjJkS7a5sJTBpOTSiMbWJ DEaXNZ90oHH8DMjwO8oWDw1bq5J32kqfO3HovGJgsG2ZbCLixyAHOwgqaSy7uwxKwd 7S2BlkBJ24RNEdlG6F4CN8vtYSiUnnMlg+5FyLbvI0IvDrb4GERKADte7Id+4s/52q vV18BX3x51bpBd+2m6OYnTHumkt5NPAToMAnYSXftdTKFucQ0bqvUVzaxnM23tcAFQ aTYb2f0UV6Usg== Date: Fri, 4 Dec 2026 23:38:08 +0000 From: Jonathan Cameron To: Rodrigo Alencar via B4 Relay Cc: rodrigo.alencar@analog.com, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, David Lechner , Nuno =?UTF-8?B?U8Oh?= , Andy Shevchenko Subject: Re: [PATCH v2 0/5] iio: split struct iio_dev_attr into typed core attributes Message-ID: <20261204233808.3b4faa3d@jic23-hlaptop> In-Reply-To: <20261128011010.729b5021@jic23-hlaptop> References: <20261127-iio-core-attr-review-v2-0-e0aed1e8a81c@analog.com> <20261128011010.729b5021@jic23-hlaptop> X-Mailer: Claws Mail 4.4.0 (GTK 3.24.52; x86_64-pc-linux-gnu) X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 28 Nov 2026 01:10:10 +0000 Jonathan Cameron wrote: > On Fri, 27 Nov 2026 09:47:43 +0000 > Rodrigo Alencar via B4 Relay wrote: > > > struct iio_dev_attr does three unrelated jobs: it backs the static > > attributes declared by drivers through IIO_DEVICE_ATTR*(), the channel > > and event attributes generated by the IIO core, and the per-buffer > > attributes. Every user carries every field (l, c, buffer), whether it > > needs them or not, and the meaning of @address depends on the context: > > an info mask bit, an ext_info index, a scan index or, for events, the > > event_spec index and the event info packed together. > > > > This series keeps struct iio_dev_attr as what drivers use (dev_attr and > > address) and moves the core-only state into private types embedding it: > > > > struct iio_chan_attr - core channel attributes (channel, list node) > > struct iio_event_attr - extends it with the event spec > > struct iio_buffer_attr - extends it with the owning buffer > > > > Attribute creation is split into iio_chan_attr_prepare(), which builds > > the full name and runs the duplicate check, and iio_chan_attr_add(), > > which initializes an attribute allocated by the caller. Each context > > allocates its own type and sets its own fields, so the core needs no > > size, offset or context pointer. > > Nice. All looks good to me, but as it is a core change I'll let > it sit for a little while before applying so others can take a good look. I want to give this some good test exposure so I'll apply it now but it is only on the testing branch of iio.git for now hence additional feedback welcome! Jonathan > > Jonathan >