Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH v3] PCI: mt7621: Add sentinel to quirks table
@ 2022-12-05 20:46 John Thomson
  2022-12-06 11:07 ` Lorenzo Pieralisi
  0 siblings, 1 reply; 2+ messages in thread
From: John Thomson @ 2022-12-05 20:46 UTC (permalink / raw)
  To: Sergio Paracuellos, Lorenzo Pieralisi, Rob Herring,
	Krzysztof Wilczyński, Bjorn Helgaas, Greg Kroah-Hartman
  Cc: linux-pci, linux-kernel, John Thomson

This driver was missing a sentinel in the struct soc_device_attribute
array, which caused an oops when assessed by
soc_device_match(mt7621_pcie_quirks_match)
This was only exposed once the CONFIG_SOC_MT7621 mt7621 soc_dev_attr
was fixed to register the soc as a device, in commit 7c18b64bba3b ("mips:
ralink: mt7621: do not use kzalloc too early")

This quirk test was introduced in the staging driver in
commit b483b4e4d3f6 ("staging: mt7621-pci: add quirks for 'E2' revision
using 'soc_device_attribute'"), and the staging driver was moved in
commit 2bdd5238e756 ("PCI: mt7621: Add MediaTek MT7621 PCIe host
controller driver") for the 5.16 kernel

Link: https://lore.kernel.org/lkml/26ebbed1-0fe9-4af9-8466-65f841d0b382@app.fastmail.com
Fixes: b483b4e4d3f6 ("staging: mt7621-pci: add quirks for 'E2' revision using 'soc_device_attribute'")
Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
Acked-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
v2: no newline in middle of Fixes tag
v3: commit message changes
---
 drivers/pci/controller/pcie-mt7621.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/controller/pcie-mt7621.c b/drivers/pci/controller/pcie-mt7621.c
index 4bd1abf26008..ee7aad09d627 100644
--- a/drivers/pci/controller/pcie-mt7621.c
+++ b/drivers/pci/controller/pcie-mt7621.c
@@ -466,7 +466,8 @@ static int mt7621_pcie_register_host(struct pci_host_bridge *host)
 }
 
 static const struct soc_device_attribute mt7621_pcie_quirks_match[] = {
-	{ .soc_id = "mt7621", .revision = "E2" }
+	{ .soc_id = "mt7621", .revision = "E2" },
+	{ /* sentinel */ }
 };
 
 static int mt7621_pcie_probe(struct platform_device *pdev)
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v3] PCI: mt7621: Add sentinel to quirks table
  2022-12-05 20:46 [PATCH v3] PCI: mt7621: Add sentinel to quirks table John Thomson
@ 2022-12-06 11:07 ` Lorenzo Pieralisi
  0 siblings, 0 replies; 2+ messages in thread
From: Lorenzo Pieralisi @ 2022-12-06 11:07 UTC (permalink / raw)
  To: Rob Herring, Greg Kroah-Hartman, Sergio Paracuellos, John Thomson,
	Krzysztof Wilczyński, Bjorn Helgaas
  Cc: Lorenzo Pieralisi, linux-pci, linux-kernel

On Tue, 6 Dec 2022 06:46:45 +1000, John Thomson wrote:
> This driver was missing a sentinel in the struct soc_device_attribute
> array, which caused an oops when assessed by
> soc_device_match(mt7621_pcie_quirks_match)
> This was only exposed once the CONFIG_SOC_MT7621 mt7621 soc_dev_attr
> was fixed to register the soc as a device, in commit 7c18b64bba3b ("mips:
> ralink: mt7621: do not use kzalloc too early")
> 
> [...]

Applied to pci/mt7621, thanks!

[1/1] PCI: mt7621: Add sentinel to quirks table
      https://git.kernel.org/lpieralisi/pci/c/19098934f910

Thanks,
Lorenzo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-06 11:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-05 20:46 [PATCH v3] PCI: mt7621: Add sentinel to quirks table John Thomson
2022-12-06 11:07 ` Lorenzo Pieralisi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox