From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 7095334BA42 for ; Fri, 21 Nov 2025 14:44:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763736242; cv=none; b=PEQVBe6DTv/JmwK61w7jPA75XdlG5io7rcSPjNS5WP7QmXQMwxWLex6wzTP9leLeZRKegj9K6NRz1FV3yvQJSSAzBc9vuacsu6OGB3lumywMCi0mNgs7JO5yS3VbOvhwAEGZ+OvRNVS1ErepjC/EOJqh5BWtrH2+BmMoWOpha44= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763736242; c=relaxed/simple; bh=9WhdmzrNR75SJj66Oi8EiDfi3N/BJfAMnQlT3rBdzKw=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=UX9zEWW8MaEfcN8Lb1uvFG0HMMz6NBxl/S2cBcVafRri8JnVGM1lzeDE7odpcdhcv0CFWGu91T490JCY9pdkjYBdyrC1KWXmvJoI8kStJqX5rnzHd+N0k46CwA+3kRzKBiQCkNWIj2Go/bz5KsUylSrR5hf2tZFj8juR/MM//BY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1vMSMY-0004yx-Tc; Fri, 21 Nov 2025 15:43:50 +0100 Received: from lupine.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::4e] helo=lupine) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vMSMY-001bRQ-1C; Fri, 21 Nov 2025 15:43:50 +0100 Received: from pza by lupine with local (Exim 4.98.2) (envelope-from ) id 1vMSMY-000000008Mu-1CTg; Fri, 21 Nov 2025 15:43:50 +0100 Message-ID: <6e9f1b4dceefe29ed10e81e0fbf0fc9155f33fd1.camel@pengutronix.de> Subject: Re: [PATCH] platform/x86: intel: chtwc_int33fe: don't dereference swnode args From: Philipp Zabel To: Bartosz Golaszewski Cc: Ilpo =?ISO-8859-1?Q?J=E4rvinen?= , Andy Shevchenko , Sakari Ailus , Linus Walleij , Dmitry Torokhov , "Rafael J. Wysocki" , Charles Keepax , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Bartosz Golaszewski , stable@vger.kernel.org, Hans de Goede , Stephen Rothwell Date: Fri, 21 Nov 2025 15:43:50 +0100 In-Reply-To: References: <20251121-int33fe-swnode-fix-v1-1-713e7b7c6046@linaro.org> <58fdb603-6d42-443d-8ae6-57aced9eb104@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2-0+deb13u1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Hi Bartosz, On Fr, 2025-11-21 at 14:50 +0100, Bartosz Golaszewski wrote: > On Fri, Nov 21, 2025 at 2:40=E2=80=AFPM Hans de Goede = wrote: > >=20 > > On 21-Nov-25 11:04 AM, Bartosz Golaszewski wrote: > > > From: Bartosz Golaszewski > > >=20 > > > Members of struct software_node_ref_args should not be dereferenced > > > directly but set using the provided macros. Commit d7cdbbc93c56 > > > ("software node: allow referencing firmware nodes") changed the name = of > > > the software node member and caused a build failure. Remove all direc= t > > > dereferences of the ref struct as a fix. > > >=20 > > > However, this driver also seems to abuse the software node interface = by > > > waiting for a node with an arbitrary name "intel-xhci-usb-sw" to appe= ar > > > in the system before setting up the reference for the I2C device, whi= le > > > the actual software node already exists in the intel-xhci-usb-role-sw= itch > > > module and should be used to set up a static reference. Add a FIXME f= or > > > a future improvement. > > >=20 > > > Fixes: d7cdbbc93c56 ("software node: allow referencing firmware nodes= ") > > > Fixes: 53c24c2932e5 ("platform/x86: intel_cht_int33fe: use inline ref= erence properties") > > > Cc: stable@vger.kernel.org > > > Reported-by: Stephen Rothwell > > > Closes: https://lore.kernel.org/all/20251121111534.7cdbfe5c@canb.auug= .org.au/ > > > Signed-off-by: Bartosz Golaszewski > > > --- > > > This should go into the reset tree as a fix to the regression introdu= ced > > > by the reset-gpio driver rework. > >=20 > > Thanks, patch looks good to me: > >=20 > > Reviewed-by: Hans de Goede > >=20 > > Also ack for merging this through the reset tree. > >=20 > > Ilpo please do *not* pick this one up as it will be merged > > through the reset tree. > >=20 >=20 > Philipp: I'm afraid this too must go into an immutable branch shared > with the GPIO tree or else Linus Torvalds will yell at me if by chance > he pulls my changes first into mainline. Unless you plan to do your PR > early into the merge window in which case I can wait until it's in his > tree and submit mine. Let me know what your preference is. The following changes since commit 5fc4e4cf7a2268b5f73700fd1e8d02159f2417d8= : reset: gpio: use software nodes to setup the GPIO lookup (2025-11-20 16:5= 1:49 +0100) are available in the Git repository at: https://git.pengutronix.de/git/pza/linux.git tags/reset-gpio-for-v6.19-2 for you to fetch changes up to 527250cd9092461f1beac3e4180a4481bffa01b5: platform/x86: intel: chtwc_int33fe: don't dereference swnode args (2025-1= 1-21 15:31:43 +0100) ---------------------------------------------------------------- Reset/GPIO/swnode changes for v6.19 (v2) * Fix chtwc_int33fe build issue since commit d7cdbbc93c56 ("software node: allow referencing firmware nodes"). ---------------------------------------------------------------- Bartosz Golaszewski (1): platform/x86: intel: chtwc_int33fe: don't dereference swnode args drivers/platform/x86/intel/chtwc_int33fe.c | 29 ++++++++++++++++++++------= --- 1 file changed, 20 insertions(+), 9 deletions(-)