linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Chen <hzpeterchen@gmail.com>
To: Pawel Laszczak <pawell@cadence.com>
Cc: "peter.chen@nxp.com" <peter.chen@nxp.com>,
	"rogerq@ti.com" <rogerq@ti.com>,
	"a-govindraju@ti.com" <a-govindraju@ti.com>,
	"nsekhar@ti.com" <nsekhar@ti.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Rahul Kumar <kurahul@cadence.com>
Subject: Re: [PATCH] usb: cdns3: Adds missing __iomem markers
Date: Mon, 11 Jan 2021 18:05:30 +0800	[thread overview]
Message-ID: <20210111100529.GA8182@b29397-desktop> (raw)
In-Reply-To: <BYAPR07MB53815F102C9C56CBC7AAD89FDDAB0@BYAPR07MB5381.namprd07.prod.outlook.com>

On 21-01-11 09:20:31, Pawel Laszczak wrote:
> Hi Peter,
> 
> What about this patch, can you apply it into for-usb-next ?

Done.

Peter
> 
> Thanks
> Pawel
> 
> >
> >Patch adds missing __iomem markers in core.h file
> >and makes some changes in drd.c file related with
> >these markers.
> >
> >The lack of __iomem has reported by sparse checker
> >on parsic architecture.
> >
> >Signed-off-by: Pawel Laszczak <pawell@cadence.com>
> >Reported-by: kernel test robot <lkp@intel.com>
> >---
> > drivers/usb/cdns3/core.h | 12 ++++++------
> > drivers/usb/cdns3/drd.c  | 12 ++++++------
> > 2 files changed, 12 insertions(+), 12 deletions(-)
> >
> >diff --git a/drivers/usb/cdns3/core.h b/drivers/usb/cdns3/core.h
> >index f8e350cef699..bfa39795208e 100644
> >--- a/drivers/usb/cdns3/core.h
> >+++ b/drivers/usb/cdns3/core.h
> >@@ -86,12 +86,12 @@ struct cdns {
> > 	struct resource			xhci_res[CDNS_XHCI_RESOURCES_NUM];
> > 	struct cdns3_usb_regs __iomem	*dev_regs;
> >
> >-	struct resource			otg_res;
> >-	struct cdns3_otg_legacy_regs	*otg_v0_regs;
> >-	struct cdns3_otg_regs		*otg_v1_regs;
> >-	struct cdnsp_otg_regs		*otg_cdnsp_regs;
> >-	struct cdns_otg_common_regs	*otg_regs;
> >-	struct cdns_otg_irq_regs	*otg_irq_regs;
> >+	struct resource				otg_res;
> >+	struct cdns3_otg_legacy_regs __iomem	*otg_v0_regs;
> >+	struct cdns3_otg_regs __iomem		*otg_v1_regs;
> >+	struct cdnsp_otg_regs __iomem		*otg_cdnsp_regs;
> >+	struct cdns_otg_common_regs __iomem	*otg_regs;
> >+	struct cdns_otg_irq_reg __iomem		*otg_irq_regs;
> > #define CDNS3_CONTROLLER_V0	0
> > #define CDNS3_CONTROLLER_V1	1
> > #define CDNSP_CONTROLLER_V2	2
> >diff --git a/drivers/usb/cdns3/drd.c b/drivers/usb/cdns3/drd.c
> >index 605a413db727..0701853b501c 100644
> >--- a/drivers/usb/cdns3/drd.c
> >+++ b/drivers/usb/cdns3/drd.c
> >@@ -27,7 +27,7 @@
> >  */
> > static int cdns_set_mode(struct cdns *cdns, enum usb_dr_mode mode)
> > {
> >-	u32 __iomem *override_reg;
> >+	void __iomem  *override_reg;
> > 	u32 reg;
> >
> > 	switch (mode) {
> >@@ -406,7 +406,7 @@ int cdns_drd_init(struct cdns *cdns)
> > 		cdns->otg_v1_regs = NULL;
> > 		cdns->otg_cdnsp_regs = NULL;
> > 		cdns->otg_regs = regs;
> >-		cdns->otg_irq_regs = (struct cdns_otg_irq_regs *)
> >+		cdns->otg_irq_regs = (struct cdns_otg_irq_regs __iomem  *)
> > 				     &cdns->otg_v0_regs->ien;
> > 		writel(1, &cdns->otg_v0_regs->simulate);
> > 		dev_dbg(cdns->dev, "DRD version v0 (%08x)\n",
> >@@ -416,14 +416,14 @@ int cdns_drd_init(struct cdns *cdns)
> > 		cdns->otg_v1_regs = regs;
> > 		cdns->otg_cdnsp_regs = regs;
> >
> >-		cdns->otg_regs = (void *)&cdns->otg_v1_regs->cmd;
> >+		cdns->otg_regs = (void __iomem *)&cdns->otg_v1_regs->cmd;
> >
> >-		if (cdns->otg_cdnsp_regs->did == OTG_CDNSP_DID) {
> >-			cdns->otg_irq_regs = (struct cdns_otg_irq_regs *)
> >+		if (readl(cdns->otg_cdnsp_regs->did) == OTG_CDNSP_DID) {
> >+			cdns->otg_irq_regs = (struct cdns_otg_irq_regs __iomem *)
> > 					      &cdns->otg_cdnsp_regs->ien;
> > 			cdns->version  = CDNSP_CONTROLLER_V2;
> > 		} else {
> >-			cdns->otg_irq_regs = (struct cdns_otg_irq_regs *)
> >+			cdns->otg_irq_regs = (struct cdns_otg_irq_regs __iomem *)
> > 					      &cdns->otg_v1_regs->ien;
> > 			writel(1, &cdns->otg_v1_regs->simulate);
> > 			cdns->version  = CDNS3_CONTROLLER_V1;
> >--
> >2.17.1
> 

-- 

Thanks,
Peter Chen


      reply	other threads:[~2021-01-11 10:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14 12:50 [PATCH] usb: cdns3: Adds missing __iomem markers Pawel Laszczak
2020-12-14 15:35 ` kernel test robot
2020-12-15  5:58   ` Peter Chen
2020-12-15  9:42     ` [kbuild-all] " Rong Chen
2021-01-11  9:20 ` Pawel Laszczak
2021-01-11 10:05   ` Peter Chen [this message]

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=20210111100529.GA8182@b29397-desktop \
    --to=hzpeterchen@gmail.com \
    --cc=a-govindraju@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kurahul@cadence.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=pawell@cadence.com \
    --cc=peter.chen@nxp.com \
    --cc=rogerq@ti.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).