diff mbox series

[1/2] phy: ralink: mt7621-pci: add sentinel to quirks table

Message ID 20221104205242.3440388-2-git@johnthomson.fastmail.com.au
State New
Headers show
Series mt7621 pci & phy-pci fix future oops from soc_device_match_attr | expand

Commit Message

John Thomson Nov. 4, 2022, 8:52 p.m. UTC
With mt7621 soc_dev_attr fixed to register the soc as a device,
kernel will experience an oops in soc_device_match_attr

This quirk test was introduced in the staging driver in
commit 9445ccb3714c ("staging: mt7621-pci-phy: add quirks for 'E2'
revision using 'soc_device_attribute'"). The staging driver was removed,
and later re-added in commit d87da32372a0 ("phy: ralink: Add PHY driver
for MT7621 PCIe PHY") for kernel 5.11

Link: https://lore.kernel.org/lkml/26ebbed1-0fe9-4af9-8466-65f841d0b382@app.fastmail.com
Fixes: d87da32372a0 ("phy: ralink: Add PHY driver for MT7621 PCIe PHY")
Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
---
 drivers/phy/ralink/phy-mt7621-pci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Sergio Paracuellos Nov. 5, 2022, 6:24 a.m. UTC | #1
On Fri, Nov 4, 2022 at 9:54 PM John Thomson
<git@johnthomson.fastmail.com.au> wrote:
>
> With mt7621 soc_dev_attr fixed to register the soc as a device,
> kernel will experience an oops in soc_device_match_attr
>
> This quirk test was introduced in the staging driver in
> commit 9445ccb3714c ("staging: mt7621-pci-phy: add quirks for 'E2'
> revision using 'soc_device_attribute'"). The staging driver was removed,
> and later re-added in commit d87da32372a0 ("phy: ralink: Add PHY driver
> for MT7621 PCIe PHY") for kernel 5.11
>
> Link: https://lore.kernel.org/lkml/26ebbed1-0fe9-4af9-8466-65f841d0b382@app.fastmail.com
> Fixes: d87da32372a0 ("phy: ralink: Add PHY driver for MT7621 PCIe PHY")
> Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
> ---
>  drivers/phy/ralink/phy-mt7621-pci.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Acked-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>

Thanks,
    Sergio Paracuellos
Vinod Koul Nov. 5, 2022, 7:31 a.m. UTC | #2
On 05-11-22, 06:52, John Thomson wrote:
> With mt7621 soc_dev_attr fixed to register the soc as a device,
> kernel will experience an oops in soc_device_match_attr
> 
> This quirk test was introduced in the staging driver in
> commit 9445ccb3714c ("staging: mt7621-pci-phy: add quirks for 'E2'
> revision using 'soc_device_attribute'"). The staging driver was removed,
> and later re-added in commit d87da32372a0 ("phy: ralink: Add PHY driver
> for MT7621 PCIe PHY") for kernel 5.11

Applied, thanks
diff mbox series

Patch

diff --git a/drivers/phy/ralink/phy-mt7621-pci.c b/drivers/phy/ralink/phy-mt7621-pci.c
index 5e6530f545b5..85888ab2d307 100644
--- a/drivers/phy/ralink/phy-mt7621-pci.c
+++ b/drivers/phy/ralink/phy-mt7621-pci.c
@@ -280,7 +280,8 @@  static struct phy *mt7621_pcie_phy_of_xlate(struct device *dev,
 }
 
 static const struct soc_device_attribute mt7621_pci_quirks_match[] = {
-	{ .soc_id = "mt7621", .revision = "E2" }
+	{ .soc_id = "mt7621", .revision = "E2" },
+	{ /* sentinel */ }
 };
 
 static const struct regmap_config mt7621_pci_phy_regmap_config = {