[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5a6550d9-083a-cc50-a6c0-ce035ceb1b2f@roeck-us.net>
Date: Mon, 19 Apr 2021 06:36:35 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: "Alice Guo (OSS)" <alice.guo@....nxp.com>,
gregkh@...uxfoundation.org, rafael@...nel.org,
horia.geanta@....com, aymen.sghaier@....com,
herbert@...dor.apana.org.au, davem@...emloft.net, tony@...mide.com,
geert+renesas@...der.be, mturquette@...libre.com, sboyd@...nel.org,
vkoul@...nel.org, peter.ujfalusi@...il.com, a.hajda@...sung.com,
narmstrong@...libre.com, robert.foss@...aro.org, airlied@...ux.ie,
daniel@...ll.ch, khilman@...libre.com, tomba@...nel.org,
jyri.sarha@....fi, joro@...tes.org, will@...nel.org,
mchehab@...nel.org, ulf.hansson@...aro.org,
adrian.hunter@...el.com, kishon@...com, kuba@...nel.org,
linus.walleij@...aro.org, Roy.Pledge@....com, leoyang.li@....com,
ssantosh@...nel.org, matthias.bgg@...il.com, edubezval@...il.com,
j-keerthy@...com, balbi@...nel.org, linux@...sktech.co.nz,
stern@...land.harvard.edu, wim@...ux-watchdog.org
Cc: linux-kernel@...r.kernel.org, linux-crypto@...r.kernel.org,
linux-omap@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
linux-clk@...r.kernel.org, dmaengine@...r.kernel.org,
dri-devel@...ts.freedesktop.org, linux-amlogic@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org,
iommu@...ts.linux-foundation.org, linux-media@...r.kernel.org,
linux-mmc@...r.kernel.org, netdev@...r.kernel.org,
linux-phy@...ts.infradead.org, linux-gpio@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, linux-staging@...ts.linux.dev,
linux-mediatek@...ts.infradead.org, linux-pm@...r.kernel.org,
linux-usb@...r.kernel.org, linux-watchdog@...r.kernel.org
Subject: Re: [RFC v1 PATCH 3/3] driver: update all the code that use
soc_device_match
On 4/18/21 9:27 PM, Alice Guo (OSS) wrote:
> From: Alice Guo <alice.guo@....com>
>
> Update all the code that use soc_device_match because add support for
> soc_device_match returning -EPROBE_DEFER.
>
> Signed-off-by: Alice Guo <alice.guo@....com>
> ---
[ ... ]
> drivers/watchdog/renesas_wdt.c | 2 +-
> 48 files changed, 131 insertions(+), 52 deletions(-)
>
[ ... ]
> 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;
>
Powered by blists - more mailing lists