LinuxPPC-Dev Archive on lore.kernel.org
 help / color / Atom feed
From: "Alice Guo (OSS)" <alice.guo@oss.nxp.com>
To: Leon Romanovsky <leon@kernel.org>,
	"Alice Guo (OSS)" <alice.guo@oss.nxp.com>
Cc: "ulf.hansson@linaro.org" <ulf.hansson@linaro.org>,
	Aymen Sghaier <aymen.sghaier@nxp.com>,
	"geert+renesas@glider.be" <geert+renesas@glider.be>,
	"rafael@kernel.org" <rafael@kernel.org>,
	"airlied@linux.ie" <airlied@linux.ie>,
	"mturquette@baylibre.com" <mturquette@baylibre.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"a.hajda@samsung.com" <a.hajda@samsung.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-phy@lists.infradead.org" <linux-phy@lists.infradead.org>,
	"will@kernel.org" <will@kernel.org>,
	"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
	"linux-renesas-soc@vger.kernel.org"
	<linux-renesas-soc@vger.kernel.org>,
	"wim@linux-watchdog.org" <wim@linux-watchdog.org>,
	"herbert@gondor.apana.org.au" <herbert@gondor.apana.org.au>,
	Horia Geanta <horia.geanta@nxp.com>,
	"khilman@baylibre.com" <khilman@baylibre.com>,
	"joro@8bytes.org" <joro@8bytes.org>,
	"narmstrong@baylibre.com" <narmstrong@baylibre.com>,
	"linux-staging@lists.linux.dev" <linux-staging@lists.linux.dev>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	"peter.ujfalusi@gmail.com" <peter.ujfalusi@gmail.com>,
	"kishon@ti.com" <kishon@ti.com>,
	"tony@atomide.com" <tony@atomide.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"stern@rowland.harvard.edu" <stern@rowland.harvard.edu>,
	dl-linux-imx <linux-imx@nxp.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
	"linux@roeck-us.net" <linux@roeck-us.net>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	Dominique MARTINET <dominique.martinet@atmark-techno.com>,
	"linux-watchdog@vger.kernel.org" <linux-watchdog@vger.kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"edubezval@gmail.com" <edubezval@gmail.com>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"ssantosh@kernel.org" <ssantosh@kernel.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"linux-amlogic@lists.infradead.org"
	<linux-amlogic@lists.infradead.org>,
	"mchehab@kernel.org" <mchehab@kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"balbi@kernel.org" <balbi@kernel.org>,
	"tomba@kernel.org" <tomba@kernel.org>,
	"sboyd@kernel.org" <sboyd@kernel.org>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"adrian.hunter@intel.com" <adrian.hunter@intel.com>,
	"robert.foss@linaro.org" <robert.foss@linaro.org>,
	Leo Li <leoyang.li@nxp.com>,
	"linux@prisktech.co.nz" <linux@prisktech.co.nz>,
	"vkoul@kernel.org" <vkoul@kernel.org>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	"daniel@ffwll.ch" <daniel@ffwll.ch>,
	"j-keerthy@ti.com" <j-keerthy@ti.com>,
	"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
	"jyri.sarha@iki.fi" <jyri.sarha@iki.fi>,
	"davem@davemloft.net" <davem@davemloft.net>
Subject: RE: [RFC v1 PATCH 3/3] driver: update all the code that use soc_device_match
Date: Mon, 19 Apr 2021 06:46:14 +0000
Message-ID: <AM6PR04MB6053843FF75BCC8F4FB9A754E2499@AM6PR04MB6053.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <YH0O1104YEdjY9mb@unreal>



> -----Original Message-----
> From: Leon Romanovsky <leon@kernel.org>
> Sent: 2021年4月19日 13:02
> To: Alice Guo (OSS) <alice.guo@oss.nxp.com>
> Cc: gregkh@linuxfoundation.org; rafael@kernel.org; Horia Geanta
> <horia.geanta@nxp.com>; Aymen Sghaier <aymen.sghaier@nxp.com>;
> herbert@gondor.apana.org.au; davem@davemloft.net; tony@atomide.com;
> geert+renesas@glider.be; mturquette@baylibre.com; sboyd@kernel.org;
> vkoul@kernel.org; peter.ujfalusi@gmail.com; a.hajda@samsung.com;
> narmstrong@baylibre.com; robert.foss@linaro.org; airlied@linux.ie;
> daniel@ffwll.ch; khilman@baylibre.com; tomba@kernel.org; jyri.sarha@iki.fi;
> joro@8bytes.org; will@kernel.org; mchehab@kernel.org;
> ulf.hansson@linaro.org; adrian.hunter@intel.com; kishon@ti.com;
> kuba@kernel.org; linus.walleij@linaro.org; Roy Pledge <roy.pledge@nxp.com>;
> Leo Li <leoyang.li@nxp.com>; ssantosh@kernel.org; matthias.bgg@gmail.com;
> edubezval@gmail.com; j-keerthy@ti.com; balbi@kernel.org;
> linux@prisktech.co.nz; stern@rowland.harvard.edu; wim@linux-watchdog.org;
> linux@roeck-us.net; linux-kernel@vger.kernel.org; linux-crypto@vger.kernel.org;
> linux-omap@vger.kernel.org; linux-renesas-soc@vger.kernel.org;
> linux-clk@vger.kernel.org; dmaengine@vger.kernel.org;
> dri-devel@lists.freedesktop.org; linux-amlogic@lists.infradead.org;
> linux-arm-kernel@lists.infradead.org; iommu@lists.linux-foundation.org;
> linux-media@vger.kernel.org; linux-mmc@vger.kernel.org;
> netdev@vger.kernel.org; linux-phy@lists.infradead.org;
> linux-gpio@vger.kernel.org; linuxppc-dev@lists.ozlabs.org;
> linux-staging@lists.linux.dev; linux-mediatek@lists.infradead.org;
> linux-pm@vger.kernel.org; linux-usb@vger.kernel.org;
> linux-watchdog@vger.kernel.org
> Subject: Re: [RFC v1 PATCH 3/3] driver: update all the code that use
> soc_device_match
> 
> On Mon, Apr 19, 2021 at 12:27:22PM +0800, Alice Guo (OSS) wrote:
> > From: Alice Guo <alice.guo@nxp.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@nxp.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/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index
> > 5fae60f8c135..00c59aa217c1 100644
> > --- a/drivers/bus/ti-sysc.c
> > +++ b/drivers/bus/ti-sysc.c
> > @@ -2909,7 +2909,7 @@ static int sysc_init_soc(struct sysc *ddata)
> >  	}
> >
> >  	match = soc_device_match(sysc_soc_feat_match);
> > -	if (!match)
> > +	if (!match || IS_ERR(match))
> >  		return 0;
> >
> >  	if (match->data)
> > diff --git a/drivers/clk/renesas/r8a7795-cpg-mssr.c
> > b/drivers/clk/renesas/r8a7795-cpg-mssr.c
> > index c32d2c678046..90a18336a4c3 100644
> > --- a/drivers/clk/renesas/r8a7795-cpg-mssr.c
> > +++ b/drivers/clk/renesas/r8a7795-cpg-mssr.c
> > @@ -439,6 +439,7 @@ static const unsigned int r8a7795es2_mod_nullify[]
> > __initconst = {
> >
> >  static int __init r8a7795_cpg_mssr_init(struct device *dev)  {
> > +	const struct soc_device_attribute *match;
> >  	const struct rcar_gen3_cpg_pll_config *cpg_pll_config;
> >  	u32 cpg_mode;
> >  	int error;
> > @@ -453,7 +454,8 @@ static int __init r8a7795_cpg_mssr_init(struct device
> *dev)
> >  		return -EINVAL;
> >  	}
> >
> > -	if (soc_device_match(r8a7795es1)) {
> > +	match = soc_device_match(r8a7795es1);
> > +	if (!IS_ERR(match) && match) {
> 
> "if (!IS_ERR_OR_NULL(match))" in all places.

Thank you for your suggestion. I will modify them.

Best Regards,
Alice Guo

> Thanks

  reply index

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-19  4:27 [RFC v1 PATCH 0/3] support soc_device_match to return -EPROBE_DEFER Alice Guo (OSS)
2021-04-19  4:27 ` [RFC v1 PATCH 1/3] drivers: soc: add support for soc_device_match returning -EPROBE_DEFER Alice Guo (OSS)
2021-04-19  4:49   ` Dominique MARTINET
2021-04-19  6:40     ` Alice Guo (OSS)
2021-04-19  8:20   ` Geert Uytterhoeven
2021-04-20 11:21     ` Dan Carpenter
2021-04-19  4:27 ` [RFC v1 PATCH 2/3] caam: add defer probe when the caam driver cannot identify SoC Alice Guo (OSS)
2021-04-19  4:27 ` [RFC v1 PATCH 3/3] driver: update all the code that use soc_device_match Alice Guo (OSS)
2021-04-19  5:02   ` Leon Romanovsky
2021-04-19  6:46     ` Alice Guo (OSS) [this message]
2021-04-19  5:02   ` Dominique MARTINET
2021-04-19  7:09     ` Alice Guo (OSS)
2021-04-19  9:03     ` Geert Uytterhoeven
2021-04-19  9:33       ` Dominique MARTINET
2021-04-19 12:16         ` Arnd Bergmann
2021-04-19 23:42           ` Dominique MARTINET
2021-04-20  9:07             ` Arnd Bergmann
2021-04-20  9:10             ` Arnd Bergmann
2021-04-19 13:36   ` Guenter Roeck
2021-04-20  9:40   ` Péter Ujfalusi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM6PR04MB6053843FF75BCC8F4FB9A754E2499@AM6PR04MB6053.eurprd04.prod.outlook.com \
    --to=alice.guo@oss.nxp.com \
    --cc=a.hajda@samsung.com \
    --cc=adrian.hunter@intel.com \
    --cc=airlied@linux.ie \
    --cc=aymen.sghaier@nxp.com \
    --cc=balbi@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=davem@davemloft.net \
    --cc=dmaengine@vger.kernel.org \
    --cc=dominique.martinet@atmark-techno.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=edubezval@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=horia.geanta@nxp.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=j-keerthy@ti.com \
    --cc=joro@8bytes.org \
    --cc=jyri.sarha@iki.fi \
    --cc=khilman@baylibre.com \
    --cc=kishon@ti.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=leoyang.li@nxp.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@prisktech.co.nz \
    --cc=linux@roeck-us.net \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=narmstrong@baylibre.com \
    --cc=netdev@vger.kernel.org \
    --cc=peter.ujfalusi@gmail.com \
    --cc=rafael@kernel.org \
    --cc=robert.foss@linaro.org \
    --cc=sboyd@kernel.org \
    --cc=ssantosh@kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=tomba@kernel.org \
    --cc=tony@atomide.com \
    --cc=ulf.hansson@linaro.org \
    --cc=vkoul@kernel.org \
    --cc=will@kernel.org \
    --cc=wim@linux-watchdog.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LinuxPPC-Dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linuxppc-dev/0 linuxppc-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linuxppc-dev linuxppc-dev/ https://lore.kernel.org/linuxppc-dev \
		linuxppc-dev@lists.ozlabs.org linuxppc-dev@ozlabs.org
	public-inbox-index linuxppc-dev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.ozlabs.lists.linuxppc-dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git