> -----Original Message-----
> From: Leon Romanovsky <l...@kernel.org>
> Sent: 2021年4月19日 13:02
> To: Alice Guo (OSS) <alice....@oss.nxp.com>
> Cc: gre...@linuxfoundation.org; raf...@kernel.org; Horia Geanta
> <horia.gea...@nxp.com>; Aymen Sghaier <aymen.sgha...@nxp.com>;
> herb...@gondor.apana.org.au; da...@davemloft.net; t...@atomide.com;
> geert+rene...@glider.be; mturque...@baylibre.com; sb...@kernel.org;
> vk...@kernel.org; peter.ujfal...@gmail.com; a.ha...@samsung.com;
> narmstr...@baylibre.com; robert.f...@linaro.org; airl...@linux.ie;
> dan...@ffwll.ch; khil...@baylibre.com; to...@kernel.org; jyri.sa...@iki.fi;
> j...@8bytes.org; w...@kernel.org; mche...@kernel.org;
> ulf.hans...@linaro.org; adrian.hun...@intel.com; kis...@ti.com;
> k...@kernel.org; linus.wall...@linaro.org; Roy Pledge <roy.ple...@nxp.com>;
> Leo Li <leoyang...@nxp.com>; ssant...@kernel.org; matthias....@gmail.com;
> edubez...@gmail.com; j-keer...@ti.com; ba...@kernel.org;
> li...@prisktech.co.nz; st...@rowland.harvard.edu; w...@linux-watchdog.org;
> li...@roeck-us.net; linux-ker...@vger.kernel.org; 
> linux-crypto@vger.kernel.org;
> linux-o...@vger.kernel.org; linux-renesas-...@vger.kernel.org;
> linux-...@vger.kernel.org; dmaeng...@vger.kernel.org;
> dri-de...@lists.freedesktop.org; linux-amlo...@lists.infradead.org;
> linux-arm-ker...@lists.infradead.org; io...@lists.linux-foundation.org;
> linux-me...@vger.kernel.org; linux-...@vger.kernel.org;
> net...@vger.kernel.org; linux-...@lists.infradead.org;
> linux-g...@vger.kernel.org; linuxppc-...@lists.ozlabs.org;
> linux-stag...@lists.linux.dev; linux-media...@lists.infradead.org;
> linux...@vger.kernel.org; linux-...@vger.kernel.org;
> linux-watch...@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....@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....@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 via email to