All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Alexandre Torgue <alexandre.torgue@st.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
	David Miller <davem@davemloft.net>,
	peppe.cavallaro@st.com, Joao.Pinto@synopsys.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch net-next] stmmac: indent an if statement
Date: Tue, 17 Jan 2017 12:45:00 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.20.1701171244400.2779@hadrien> (raw)
In-Reply-To: <4902e86a-6a86-57d6-51c2-55e391b83dc3@st.com>



On Tue, 17 Jan 2017, Alexandre Torgue wrote:

> Hi Julia
>
> On 01/16/2017 11:10 PM, Julia Lawall wrote:
> >
> >
> > On Tue, 17 Jan 2017, Dan Carpenter wrote:
> >
> > > On Mon, Jan 16, 2017 at 10:46:22PM +0100, Julia Lawall wrote:
> > > >
> > > >
> > > > On Mon, 16 Jan 2017, Dan Carpenter wrote:
> > > >
> > > > > On Mon, Jan 16, 2017 at 12:19:24PM +0300, Dan Carpenter wrote:
> > > > > > On Sun, Jan 15, 2017 at 10:14:38PM -0500, David Miller wrote:
> > > > > > > From: Dan Carpenter <dan.carpenter@oracle.com>
> > > > > > > Date: Thu, 12 Jan 2017 21:46:32 +0300
> > > > > > >
> > > > > > > > The break statement should be indented one more tab.
> > > > > > > >
> > > > > > > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > > > > > >
> > > > > > > Applied, but like Julia I think we might have a missing
> > > > > > > of_node_put()
> > > > > > > here.
> > > > > >
> > > > > > Of course, sorry for dropping the ball on this.  I'll send a patch
> > > > > > for
> > > > > > that.
> > > > > >
> > > > >
> > > > > Actually, I've looked at it some more and I think this function is OK.
> > > > > We're supposed to do an of_node_put() later...  I can't find where
> > > > > that
> > > > > happens, but presumably that's because I don't know stmmac well.  This
> > > > > code here, though, is fine.
> > > >
> > > > Why do you think it is fine?  Does anyone in the calling context know
> > > > which child would have caused the break?
> > >
> > > Yeah.  It's saved in plat->mdio_node and we expect to be holding on
> > > either path through the function.
> > >
> > > (It would be better if one of the stmmac people were responding here
> > > insead of a random fix the indenting weenie like myself.)
> >
> > OK, I agree that there should not be an of_node_put with the break.
> >
> > Perhaps there should be an of_node_put on plat->mdio_node in
> > stmmac_remove_config_dt, like there is an of_node_put on plat->phy_node.
> > But it would certainly be helpful to hear from someone who knows the code
> > better.
>
> I also think it's missing! Can you propose a patch ?

Done.  Thanks for the clarification.

julia

WARNING: multiple messages have this Message-ID (diff)
From: Julia Lawall <julia.lawall@lip6.fr>
To: Alexandre Torgue <alexandre.torgue@st.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
	David Miller <davem@davemloft.net>,
	peppe.cavallaro@st.com, Joao.Pinto@synopsys.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch net-next] stmmac: indent an if statement
Date: Tue, 17 Jan 2017 11:45:00 +0000	[thread overview]
Message-ID: <alpine.DEB.2.20.1701171244400.2779@hadrien> (raw)
In-Reply-To: <4902e86a-6a86-57d6-51c2-55e391b83dc3@st.com>



On Tue, 17 Jan 2017, Alexandre Torgue wrote:

> Hi Julia
>
> On 01/16/2017 11:10 PM, Julia Lawall wrote:
> >
> >
> > On Tue, 17 Jan 2017, Dan Carpenter wrote:
> >
> > > On Mon, Jan 16, 2017 at 10:46:22PM +0100, Julia Lawall wrote:
> > > >
> > > >
> > > > On Mon, 16 Jan 2017, Dan Carpenter wrote:
> > > >
> > > > > On Mon, Jan 16, 2017 at 12:19:24PM +0300, Dan Carpenter wrote:
> > > > > > On Sun, Jan 15, 2017 at 10:14:38PM -0500, David Miller wrote:
> > > > > > > From: Dan Carpenter <dan.carpenter@oracle.com>
> > > > > > > Date: Thu, 12 Jan 2017 21:46:32 +0300
> > > > > > >
> > > > > > > > The break statement should be indented one more tab.
> > > > > > > >
> > > > > > > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > > > > > >
> > > > > > > Applied, but like Julia I think we might have a missing
> > > > > > > of_node_put()
> > > > > > > here.
> > > > > >
> > > > > > Of course, sorry for dropping the ball on this.  I'll send a patch
> > > > > > for
> > > > > > that.
> > > > > >
> > > > >
> > > > > Actually, I've looked at it some more and I think this function is OK.
> > > > > We're supposed to do an of_node_put() later...  I can't find where
> > > > > that
> > > > > happens, but presumably that's because I don't know stmmac well.  This
> > > > > code here, though, is fine.
> > > >
> > > > Why do you think it is fine?  Does anyone in the calling context know
> > > > which child would have caused the break?
> > >
> > > Yeah.  It's saved in plat->mdio_node and we expect to be holding on
> > > either path through the function.
> > >
> > > (It would be better if one of the stmmac people were responding here
> > > insead of a random fix the indenting weenie like myself.)
> >
> > OK, I agree that there should not be an of_node_put with the break.
> >
> > Perhaps there should be an of_node_put on plat->mdio_node in
> > stmmac_remove_config_dt, like there is an of_node_put on plat->phy_node.
> > But it would certainly be helpful to hear from someone who knows the code
> > better.
>
> I also think it's missing! Can you propose a patch ?

Done.  Thanks for the clarification.

julia

  reply	other threads:[~2017-01-17 11:45 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-12 18:46 [patch net-next] stmmac: indent an if statement Dan Carpenter
2017-01-12 18:46 ` Dan Carpenter
2017-01-12 19:46 ` Julia Lawall
2017-01-12 19:46   ` Julia Lawall
2017-01-16  3:14 ` David Miller
2017-01-16  3:14   ` David Miller
2017-01-16  9:19   ` Dan Carpenter
2017-01-16  9:19     ` Dan Carpenter
2017-01-16  9:39     ` Dan Carpenter
2017-01-16  9:39       ` Dan Carpenter
2017-01-16 21:46       ` Julia Lawall
2017-01-16 21:46         ` Julia Lawall
2017-01-16 21:56         ` Dan Carpenter
2017-01-16 21:56           ` Dan Carpenter
2017-01-16 22:00           ` David Miller
2017-01-16 22:00             ` David Miller
2017-01-17  8:28             ` Alexandre Torgue
2017-01-17  8:28               ` Alexandre Torgue
2017-01-16 22:10           ` Julia Lawall
2017-01-16 22:10             ` Julia Lawall
2017-01-17  8:25             ` Alexandre Torgue
2017-01-17  8:25               ` Alexandre Torgue
2017-01-17 11:45               ` Julia Lawall [this message]
2017-01-17 11:45                 ` Julia Lawall

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=alpine.DEB.2.20.1701171244400.2779@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=Joao.Pinto@synopsys.com \
    --cc=alexandre.torgue@st.com \
    --cc=dan.carpenter@oracle.com \
    --cc=davem@davemloft.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.