Thread (20 messages) 20 messages, 9 authors, 2021-04-20

Re: [RFC v1 PATCH 3/3] driver: update all the code that use soc_device_match

From: Guenter Roeck <linux@roeck-us.net>
Date: 2021-04-19 13:41:32
Also in: dmaengine, dri-devel, linux-amlogic, linux-clk, linux-crypto, linux-gpio, linux-iommu, linux-media, linux-mediatek, linux-mmc, linux-omap, linux-phy, linux-pm, linux-renesas-soc, linux-staging, linux-usb, linux-watchdog, lkml, netdev

On 4/18/21 9:27 PM, Alice Guo (OSS) wrote:
From: Alice Guo <redacted>

Update all the code that use soc_device_match because add support for
soc_device_match returning -EPROBE_DEFER.

Signed-off-by: Alice Guo <redacted>
---
[ ... ]
 drivers/watchdog/renesas_wdt.c                |  2 +-
 48 files changed, 131 insertions(+), 52 deletions(-)
[ ... ]
quoted hunk ↗ jump to hunk
diff --git a/drivers/watchdog/renesas_wdt.c b/drivers/watchdog/renesas_wdt.c
index 5791198960e6..fdc534dc4024 100644
--- a/drivers/watchdog/renesas_wdt.c
+++ b/drivers/watchdog/renesas_wdt.c
@@ -197,7 +197,7 @@ static bool rwdt_blacklisted(struct device *dev)
 	const struct soc_device_attribute *attr;
 
 	attr = soc_device_match(rwdt_quirks_match);
-	if (attr && setup_max_cpus > (uintptr_t)attr->data) {
+	if (!IS_ERR(attr) && attr && setup_max_cpus > (uintptr_t)attr->data) {
This is wrong. We can not make the decision below without having access
to attr. The function may wrongly return false if soc_device_match()
returns an error.

Guenter
 		dev_info(dev, "Watchdog blacklisted on %s %s\n", attr->soc_id,
 			 attr->revision);
 		return true;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help