mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
To: Vinod Koul <vkoul@kernel.org>
Cc: "kishon@ti.com" <kishon@ti.com>,
	"wsa+renesas@sang-engineering.com"
	<wsa+renesas@sang-engineering.com>,
	"geert+renesas@glider.be" <geert+renesas@glider.be>,
	"linux-renesas-soc@vger.kernel.org" 
	<linux-renesas-soc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v2] phy: renesas: rcar-gen3-usb2: fix SError happen if DEBUG_SHIRQ is enabled
Date: Fri, 17 Jul 2020 08:16:47 +0000	[thread overview]
Message-ID: <TY2PR01MB3692ED71A574F16848CD48ECD87C0@TY2PR01MB3692.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <20200717063856.GH82923@vkoul-mobl>

Hello Vinod,

> From: Vinod Koul, Sent: Friday, July 17, 2020 3:39 PM
> 
> hello Yoshihiro,
> 
> On 13-07-20, 21:11, Yoshihiro Shimoda wrote:
> 
> Please consider revising patch subject. It tell me you are fixing an
> error but it doesnt tell me what this patch is about :)
> 
> Perhpas :move irq registration to init" maybe a better title which
> describes the changes this patch brings in

Thank you for your suggestion! I also think your suggestion is better.
So, I will fix it.

<snip>
> > @@ -389,12 +390,39 @@ static void rcar_gen3_init_otg(struct rcar_gen3_chan *ch)
> >  	rcar_gen3_device_recognition(ch);
> >  }
> >
> > +static irqreturn_t rcar_gen3_phy_usb2_irq(int irq, void *_ch)
> > +{
> > +	struct rcar_gen3_chan *ch = _ch;
> > +	void __iomem *usb2_base = ch->base;
> > +	u32 status = readl(usb2_base + USB2_OBINTSTA);
> > +	irqreturn_t ret = IRQ_NONE;
> > +
> > +	if (status & USB2_OBINT_BITS) {
> > +		dev_vdbg(ch->dev, "%s: %08x\n", __func__, status);
> > +		writel(USB2_OBINT_BITS, usb2_base + USB2_OBINTSTA);
> > +		rcar_gen3_device_recognition(ch);
> > +		ret = IRQ_HANDLED;
> > +	}
> > +
> > +	return ret;
> > +}
> > +
> >  static int rcar_gen3_phy_usb2_init(struct phy *p)
> >  {
> >  	struct rcar_gen3_phy *rphy = phy_get_drvdata(p);
> >  	struct rcar_gen3_chan *channel = rphy->ch;
> >  	void __iomem *usb2_base = channel->base;
> >  	u32 val;
> > +	int ret;
> > +
> > +	if (!rcar_gen3_is_any_rphy_initialized(channel) && channel->irq >= 0) {
> > +		INIT_WORK(&channel->work, rcar_gen3_phy_usb2_work);
> > +		ret = request_irq(channel->irq, rcar_gen3_phy_usb2_irq,
> > +				  IRQF_SHARED, dev_name(channel->dev), channel);
> > +		if (ret < 0)
> > +			dev_err(channel->dev, "No irq handler (%d)\n",
> > +				channel->irq);
> 
> This could be in a single line :)

Yes. We could be 80 over characters in a line now :)
I'll fix it.

> Should we continue on error here?

Hmm, maybe it's better if the request_irq() failed because
it can avoid unexpected behaviors. But, original code continued on error.
In this case, should I make a separated incremental patch to exit on error?

Best regards,
Yoshihiro Shimoda


  reply	other threads:[~2020-07-17  8:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-13 12:11 Yoshihiro Shimoda
2020-07-17  6:38 ` Vinod Koul
2020-07-17  8:16   ` Yoshihiro Shimoda [this message]
2020-07-17  8:46     ` Vinod Koul
2020-07-17  8:54       ` Yoshihiro Shimoda

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=TY2PR01MB3692ED71A574F16848CD48ECD87C0@TY2PR01MB3692.jpnprd01.prod.outlook.com \
    --to=yoshihiro.shimoda.uh@renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=vkoul@kernel.org \
    --cc=wsa+renesas@sang-engineering.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

all inboxes | Powered by JetHome®