[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2924b8af-d176-01b1-a221-5219c1128494@gmail.com>
Date: Tue, 20 Apr 2021 12:40:13 +0300
From: Péter Ujfalusi <peter.ujfalusi@...il.com>
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, 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, linux@...ck-us.net
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
Hi Alice,
On 4/19/21 7:27 AM, 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/bus/ti-sysc.c | 2 +-
> drivers/clk/renesas/r8a7795-cpg-mssr.c | 4 +++-
> drivers/clk/renesas/rcar-gen2-cpg.c | 2 +-
> drivers/clk/renesas/rcar-gen3-cpg.c | 2 +-
> drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c | 7 ++++++-
> drivers/dma/ti/k3-psil.c | 3 +++
> drivers/dma/ti/k3-udma.c | 2 +-
> drivers/gpu/drm/bridge/nwl-dsi.c | 2 +-
> drivers/gpu/drm/meson/meson_drv.c | 4 +++-
> drivers/gpu/drm/omapdrm/dss/dispc.c | 2 +-
> drivers/gpu/drm/omapdrm/dss/dpi.c | 4 +++-
> drivers/gpu/drm/omapdrm/dss/dsi.c | 3 +++
> drivers/gpu/drm/omapdrm/dss/dss.c | 3 +++
> drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 3 +++
> drivers/gpu/drm/omapdrm/dss/venc.c | 4 +++-
> drivers/gpu/drm/omapdrm/omap_drv.c | 3 +++
> drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 4 +++-
> drivers/gpu/drm/rcar-du/rcar_lvds.c | 2 +-
> drivers/gpu/drm/tidss/tidss_dispc.c | 4 +++-
> drivers/iommu/ipmmu-vmsa.c | 7 +++++--
> drivers/media/platform/rcar-vin/rcar-core.c | 2 +-
> drivers/media/platform/rcar-vin/rcar-csi2.c | 2 +-
> drivers/media/platform/vsp1/vsp1_uif.c | 4 +++-
> drivers/mmc/host/renesas_sdhi_core.c | 2 +-
> drivers/mmc/host/renesas_sdhi_internal_dmac.c | 2 +-
> drivers/mmc/host/sdhci-of-esdhc.c | 21 ++++++++++++++-----
> drivers/mmc/host/sdhci-omap.c | 2 +-
> drivers/mmc/host/sdhci_am654.c | 2 +-
> drivers/net/ethernet/renesas/ravb_main.c | 4 +++-
> drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2 +-
> drivers/net/ethernet/ti/cpsw.c | 2 +-
> drivers/net/ethernet/ti/cpsw_new.c | 2 +-
> drivers/phy/ti/phy-omap-usb2.c | 4 +++-
> drivers/pinctrl/renesas/core.c | 2 +-
> drivers/pinctrl/renesas/pfc-r8a7790.c | 5 ++++-
> drivers/pinctrl/renesas/pfc-r8a7794.c | 5 ++++-
> drivers/soc/fsl/dpio/dpio-driver.c | 13 ++++++++----
> drivers/soc/renesas/r8a774c0-sysc.c | 5 ++++-
> drivers/soc/renesas/r8a7795-sysc.c | 2 +-
> drivers/soc/renesas/r8a77990-sysc.c | 5 ++++-
> drivers/soc/ti/k3-ringacc.c | 2 +-
> drivers/staging/mt7621-pci/pci-mt7621.c | 2 +-
> drivers/thermal/rcar_gen3_thermal.c | 4 +++-
> drivers/thermal/ti-soc-thermal/ti-bandgap.c | 10 +++++++--
> drivers/usb/gadget/udc/renesas_usb3.c | 2 +-
> drivers/usb/host/ehci-platform.c | 4 +++-
> drivers/usb/host/xhci-rcar.c | 2 +-
> drivers/watchdog/renesas_wdt.c | 2 +-
> 48 files changed, 131 insertions(+), 52 deletions(-)
>
...
> diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
> index 96ad21869ba7..50a4c8f0993d 100644
> --- a/drivers/dma/ti/k3-udma.c
> +++ b/drivers/dma/ti/k3-udma.c
> @@ -5188,7 +5188,7 @@ static int udma_probe(struct platform_device *pdev)
> ud->match_data = match->data;
>
> soc = soc_device_match(k3_soc_devices);
> - if (!soc) {
> + if (!IS_ERR(soc) && !soc) {
this does not sound right...
if (!soc || IS_ERR(soc))
or
if (IS_ERR_OR_NULL(soc))
is even better.
> dev_err(dev, "No compatible SoC found\n");
> return -ENODEV;
There might be a clever macro for it, but:
return soc ? PTR_ERR(soc) : -ENODEV;
> }
--
Péter
Powered by blists - more mailing lists