From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=165.173.182.112 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796400952; b=zd/HsSFjnkSYkZKSrmbaei1PZts3kwlUkz8sRUc8AoUS70AzqETYiOvuApruGxTY7eu2 QcaRoeDv2Sk+YzgwghTy2jIy/lTb322cEs1BzxMDku4YMIDyk3o+YHGYCDQsdt1J5qQj+ T1ZqNOXTTecCz78KyG+1ddXlUG30/HQimYYG3t/HSm3MpWhm57iH0ywSdvyT0KlC5SInb GsV0THqZInz51SeXgVKU3/h4B51enKAQoRclbRaoDFUH8D1uyX2dsJIxEcU0+SJARFMQU SAkLTMsdQNJb3pVsxKnN3jLeuJg5qYaQI/AOOe+xROgWB1mo9Yefetho8feV9r/ZNMw== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796400952; h=DMARC-Filter:DKIM-Signature:Received:Message-ID:Subject:From:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date: MIME-Version:User-Agent:X-ZohoMailClient; bh=KERyEWOyfxd5b6ujeX4JNC8k8NidJX90fQmTUoDt/Yw=; b=4RtNhtakiEdkLPh1svsKTLSS395eJY182pAOzMmSXDJv8XIpD5/3Zbt/PYa/CM+VTPDi XD/g5F1yslzc4CElrJzrYj3yuw7fnSgdfUaLeDooP3siO4M/eSLC21IUKbIcKk33WEmJH WhFUw1gMZpcqfiSDQRk7EDgjyZdjG8YfeZtl2gDejbkLZvmXBzvI6vSDHdz4KRNp6pNxU 0+rEPtGBn4mWIJh6w1kMWwK1HEpP5RY3X0w2OHLl7FwgBW4IiQ4JUgWqqEXT2JbAZRMpC ClSYJg6HZL+aw08iUJ3ziwd/fNJMjMH8SgUJf5o5XZPb+etJnaf7M+7P8Ijis3zNAwQ== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=rong.moe; spf=pass smtp.mailfrom=rong.moe; dkim=pass header.d=rong.moe header.i=@rong.moe header.a=rsa-sha256 header.s=zmail2048 header.b=ZS3dXt2O; arc=pass header.oldest-pass=0 smtp.remote-ip=165.173.182.112 Received: from sender5-pp-f112.zoho.com (sender5-pp-f112.zoho.com [165.173.182.112]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A666606A6B9; Fri, 4 Dec 2026 16:15:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8A666606A6B9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rong.moe Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rong.moe Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=rong.moe header.i=@rong.moe header.a=rsa-sha256 header.s=zmail2048 header.b=ZS3dXt2O ARC-Seal: i=1; a=rsa-sha256; t=1796400937; cv=none; d=zohomail.com; s=zohoarc; b=XFJ573hroH55rahErMyzOUB7gYaZndZ7xE/bJe+lh2qKgTzlKBTCaIpoZ2+KbWAxOKQ24zHDWdQ0DmXvN9nY4K575Hmob7gdsrIxcnugYSbkaHR9B/17aP7Ac/Z1oP+HBidEiMbh5r2zXLN6Pp4jYerkRSmwXJlvGyLHSKpEMB0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1796400937; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=KERyEWOyfxd5b6ujeX4JNC8k8NidJX90fQmTUoDt/Yw=; b=WVv4H+0sUCBpLyeJC+g7Qufc0vFhRhotnGp4To+gwRPJ2j1c7PI715L4yaX9XgLmayKMuaJkokkvwZFZo7m60Kc+GNA0G//fmORAonVkFpLzg3fglVWlPAZLZv6uMmb4mRX/8iGdA6S10bT7/PMtb/2iu9QBcoz45BWXq8KAOlQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=rong.moe; spf=pass smtp.mailfrom=i@rong.moe; dmarc=pass header.from= DKIM-Signature: a=rsa-sha256; b=ZS3dXt2O6UGwc8VkO1tH/HL2McWLfaYpON+HQJTBapQCCC18Pmm/QyXo7W/DhFI+RuNYmfYRISynncZmEj41BHdMU8r30pB7dKlmdHUbJgs8H+B3+iHlkmscoHsbllSfdYhHq5xbWPLPQAeBcfyRhtYVDhwqf6UiHJPq5cQdW43HgIcWax7T7JLuWh+9PFCDvclOdsTvkCT0uGMn4QCJ39uye8IGwPiJYvreTUgdUZhx1vzbkqcikxIxzaDv5/b3XNS/NVXJVLuB17C8jVnKS+hU0Vxk7EArN+MOrfM2srp1wT9COn4wqzF4JA7WFShI158IkozEFLxSFikHgozfjw==; c=relaxed/relaxed; s=zmail2048; d=rong.moe; v=1; bh=KERyEWOyfxd5b6ujeX4JNC8k8NidJX90fQmTUoDt/Yw=; h=Content-Description:Content-ID:Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Resent-Sender:Resent-Cc:Resent-Date:Resent-To:Reply-To:Resent-Message-ID:Resent-From:Sender:Subject:To:Date:From:Message-Id:Reply-To:Subject:To:Cc; Received: by smtp.zohomail.com with SMTPS id 17964009358074.251924276618297; Fri, 4 Dec 2026 08:15:35 -0800 (PST) Message-ID: <4d29fd62daeafb6f357d0d7db79bd3b3ba5634f7.camel@rong.moe> Subject: Re: [PATCH 04/13] platform/x86: lenovo: think-lmi: store attributes as linked list From: Rong Zhang To: Mark Pearson Cc: "Derek J . Clark" , Hans de Goede , Ilpo =?ISO-8859-1?Q?J=E4rvinen?= , "platform-driver-x86@vger.kernel.org" , linux-kernel@vger.kernel.org In-Reply-To: <4a5b3ae5-bbe9-42c1-baaa-c28f037b357e@app.fastmail.com> References: <20261204022032.3074618-1-mpearson-lenovo@squebb.ca> <20261204022032.3074618-5-mpearson-lenovo@squebb.ca> <4f7aa869e791ec25a223a4aa8df028ddbb0f63aa.camel@rong.moe> <4a5b3ae5-bbe9-42c1-baaa-c28f037b357e@app.fastmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Date: Sat, 05 Dec 2026 00:10:30 +0800 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 User-Agent: Evolution 3.62.2-1 X-ZohoMailClient: External Hi Mark, On Fri, 2026-12-04 at 10:21 -0500, Mark Pearson wrote: >=20 > On Fri, Dec 4, 2026, at 8:30 AM, Rong Zhang wrote: > > Hi Mark, > >=20 > > On Thu, 2026-12-03 at 21:20 -0500, Mark Pearson wrote: > > > Use a linked list for storing attributes instead of a fixed array. > > >=20 > > > Signed-off-by: Mark Pearson > > > --- > > > drivers/platform/x86/lenovo/think-lmi.c | 55 +++++++++++------------= -- > > > drivers/platform/x86/lenovo/think-lmi.h | 3 +- > > > 2 files changed, 25 insertions(+), 33 deletions(-) > > >=20 > > > diff --git a/drivers/platform/x86/lenovo/think-lmi.c b/drivers/platfo= rm/x86/lenovo/think-lmi.c > > > index 6580b1401f01..7a24985882ea 100644 > > > --- a/drivers/platform/x86/lenovo/think-lmi.c > > > +++ b/drivers/platform/x86/lenovo/think-lmi.c > > > @@ -1249,6 +1249,7 @@ static void tlmi_attr_setting_release(struct ko= bject *kobj) > > > { > > > =09struct tlmi_attr_setting *setting =3D to_tlmi_attr_setting(kobj); > > > =20 > > > +=09list_del(&setting->node); > >=20 > > I guess you need a scoped_guard() or lockdep_assert_held() for it, but = is > > it useful to keep the list in the first place? It seems that no one > > touches it once probe finishes. > >=20 >=20 > Let me know if you mean something different than the below >=20 > The only reason for the list is because I use it in tlmi - and then I can= keep the same structure for both drivers. It's a weak reason. >=20 > In tlmi I need it as there are settings, platform settings and functions = - and a list works out quite nicely there, instead of maintaining three arr= ays. I thought I could use it here too, but it's not a requirement and admi= ttedly not really beneficial. If I should just leave it unchanged I'm fine = with that. IMO using a list to arrange the probe sequence is OK as long as it makes things tidier, but touching it in the kobj's release callback could be too tricky like what Sashiko has raised. If you don't need the list at runtime (I assume this is the case as I didn't notice any runtime path relying on it), removing a node from the list is quite unnecessary. So I think you can simply drop the list_del() and add a comment to the list head stating the intentional behavior. Thanks, Rong >=20 > Mark