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=1796493383; b=Fpk+Tpt4hW7YXx2bTp4sOXzNKfOsifkVIxDLngt/JBVBf1OO0geEXQP0D5PsvCViXA6l c/9Uf6CragoTBBVb0ZrkryyT1/gPcYMhe81zbv/tTlTurSpYT6atPFcU8kKBToQuPNwDL o/fXTTE4QPYju7Opq3gk+d4cgv5yMIH8/5NsJLo2Gtb0gYTAjcqRYySeNqChNM1dm109w O6NWwoXSAP49D0DUG3Iogy3nSyHoslirldPLlTWkaxDQkXfc4oj7xCztrUUN/R0P5Dz86 2xuymfMVSBczqAj13WMXpTgceHAWto/zjZRxNvdVS+FSk/5WLA7D4MUvpqhSJb4I+xw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796493383; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=+ipUs/EVrt+XnX4bdMzsb1VFIpeE01Mqs1txMPVNtjM=; b=MggOjUzvUqENrsDAacNhd/b0e631XAkdc4YJgIsFI9kFWRLDVw7XQbVQ/aQIivLXrpwX 8zCsjo8BO9tMyvDFHJMDexJ7LYZ7JoZpc0+d0P0TqPDlewdvKDgzs5OOqlaypZPLgPkye 2zv11Mi0DvmoNaHviCOgy0mSj3PMbE9uhKaWNzo64XibQhbL9qzijB987OM4ndw+xUhz+ cBIczEPddTDuVWgqFwq/Wg+3LRCnWSyacqOHtaUK2O+gqoIss0VIw989TX0jy084kfpAX 0pOkKbPPB6QQ4V3bf92H30UzqKYLsNb0a7V08qyGob0JOHoKkz9bWzWIwb6TDw8RH2A== 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="n8GN/zsJ"; 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 76ACC606A31F; Sat, 5 Dec 2026 17:56:23 +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=n8GN/zsJ Received: by smtp.kernel.org (Postfix) with ESMTPSA id D2D861F0092B; Sat, 5 Dec 2026 17:56:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796493383; bh=+ipUs/EVrt+XnX4bdMzsb1VFIpeE01Mqs1txMPVNtjM=; h=Date:From:To:Cc:Subject:In-Reply-To; b=n8GN/zsJjyn/+h2KfZsyE6DtRQ3w6Mmkh/j33/22Wgn2nDuVfw+2WWkxrn8aARwik KmPbTFPv6x9mZ+t6Xtw9ecy0+oC3ZIxtIaxVazPcH6SSukku/MJjdpHoBjrCjHApE1 /yRh5evMDWR+PdI6tClhzLYsHaUeT3nLgt9oE1X4sogSaKUDyTqrF4kUBeFXb1y9+6 qwgIYT6kH0zytuX5klweWCQUUA94Bjqw7YPdupCaR6Q6tiHAQvyLL52AE055xyURvY DzRQX3z0z73YZD7Wg/UxYn/lyfQjfvkB7bdp/u+aGMoVnRul4D0duBQevF+nmmBARK UyUb5wCLziIHA== Date: Sat, 5 Dec 2026 11:56:21 -0600 From: Bjorn Helgaas To: Alex Elder Cc: bhelgaas@google.com, robh@kernel.org, herve.codina@bootlin.com, daniel@riscstar.com, mohd.anwar@oss.qualcomm.com, lorenzo.bianconi@oss.qualcomm.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 0/4] PCI: of: warn on bogus device_type property Message-ID: <20261205175621.GA982448@bhelgaas> 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-Disposition: inline In-Reply-To: <20261105153801.435566-1-elder@riscstar.com> On Thu, Nov 05, 2026 at 09:37:57AM -0600, Alex Elder wrote: > *** Bjorn seems happy with this series, and Herve has reviewed *** > *** almost all of it, but we'd prefer to get an ACK from Rob *** > > Add a check when adding a PCI device to ensure the device_type > property is (or is not) correctly defined when the device has > a non-null devicetree node pointer. > > This series also includes three other minor cleanups to the PCI > devicetree code. The first patch prevents a possible null pointer > dereference that Sashiko pointed out some time back. The second > and third patches are simple cleanups. The last adds the new PCI > devicetree node checks and warnings. > > -Alex > > Between version 6 and version 7: > - Simplified the wording on this cover letter > - No longer check for snprintf() overflow in of_pci_prop_compatible() > - Rebased onto 7.4-rc1 > > Version 6 is available here: > https://lore.kernel.org/lkml/20260924150222.1179235-1-elder@riscstar.com/ > > Between version 5 and version 6: > - Simplified the patch header on the last patch, as suggested by > Bjorn > - Rebased on v7.3-rc4; otherwise no code changes > > Version 5 is available here: > https://lore.kernel.org/lkml/20260908213459.2519059-1-elder@riscstar.com/ > > Between version 4 and version 5: > - Made a local variable (bufp) a pointer type in the first patch > - Eliminated an unused local variable (i) in the first patch > > Version 4 is available here: > https://lore.kernel.org/lkml/20260904134607.1856121-1-elder@riscstar.com/ > > Between version 3 and version 4: > - Insert a first patch that fixes a Sashiko-reported issue > - Drop the final "duplicate warning" patch from v3 > - Include "pciex" as a valid PCI bridge device_type property value > - Add Herve's Reviewed-by tag on the last patch > > Version 3 is available here: > https://lore.kernel.org/lkml/20260901011338.1323243-1-elder@riscstar.com/ > > Between version 2 and version 3: > - Drop a patch that made a change only needed by a different series > - Switch a function header to use kernel-doc format > - Add a warning if a PCI bridge node has no device_type property > - Added a patch to remove a duplicate warning in the devicetree code > > Version 2 is available here: > https://lore.kernel.org/lkml/20260812172247.276554-1-elder@riscstar.com/ > > Between version 1 and version 2: > - Check the PCI devicetree node even when PCI_DYNAMIC_OF_NODES is > not enabled > > Version 1 is available here: > https://lore.kernel.org/lkml/20260807194100.455599-1-elder@riscstar.com/ > > Alex Elder (4): > PCI: of: avoid allocations in of_pci_prop_compatible() > PCI: of: drop the reg_num argument to of_pci_set_address() > PCI: of: don't zero flags in of_pci_get_addr_flags() > PCI: of: introduce of_pci_verify_node() > > drivers/pci/bus.c | 1 + > drivers/pci/of.c | 32 +++++++++++++++++++++++++++++ > drivers/pci/of_property.c | 43 +++++++++++++++++++++------------------ > drivers/pci/pci.h | 3 +++ > 4 files changed, 59 insertions(+), 20 deletions(-) Applied to pci/of for v7.5, thank you! I changed the title of the last to PCI: of: Warn on invalid 'pci' or 'pciex' usage to be more specific.