Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1560341

Re: [patch net-next] stmmac: indent an if statement

From Alexandre Torgue <alexandre.torgue@st.com>
Newsgroups linux.kernel
Subject Re: [patch net-next] stmmac: indent an if statement
Date 2017-01-17 09:30 +0100
Message-ID <t0xjs-4DL-15@gated-at.bofh.it> (permalink)
References (2 earlier) <t0bLY-6Q2-13@gated-at.bofh.it> <t0c5j-6Xo-11@gated-at.bofh.it> <t0nk6-6qK-17@gated-at.bofh.it> <t0ntN-6uv-35@gated-at.bofh.it> <t0nN7-6R9-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 ?

br
Alex

>
> julia
>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[patch net-next] stmmac: indent an if statement Dan Carpenter <dan.carpenter@oracle.com> - 2017-01-12 20:00 +0100
  Re: [patch net-next] stmmac: indent an if statement Julia Lawall <julia.lawall@lip6.fr> - 2017-01-12 20:50 +0100
  Re: [patch net-next] stmmac: indent an if statement David Miller <davem@davemloft.net> - 2017-01-16 04:20 +0100
    Re: [patch net-next] stmmac: indent an if statement Dan Carpenter <dan.carpenter@oracle.com> - 2017-01-16 10:30 +0100
      Re: [patch net-next] stmmac: indent an if statement Dan Carpenter <dan.carpenter@oracle.com> - 2017-01-16 10:50 +0100
        Re: [patch net-next] stmmac: indent an if statement Julia Lawall <julia.lawall@lip6.fr> - 2017-01-16 22:50 +0100
          Re: [patch net-next] stmmac: indent an if statement Dan Carpenter <dan.carpenter@oracle.com> - 2017-01-16 23:00 +0100
            Re: [patch net-next] stmmac: indent an if statement David Miller <davem@davemloft.net> - 2017-01-16 23:10 +0100
              Re: [patch net-next] stmmac: indent an if statement Alexandre Torgue <alexandre.torgue@st.com> - 2017-01-17 09:30 +0100
            Re: [patch net-next] stmmac: indent an if statement Julia Lawall <julia.lawall@lip6.fr> - 2017-01-16 23:20 +0100
              Re: [patch net-next] stmmac: indent an if statement Alexandre Torgue <alexandre.torgue@st.com> - 2017-01-17 09:30 +0100
                Re: [patch net-next] stmmac: indent an if statement Julia Lawall <julia.lawall@lip6.fr> - 2017-01-17 12:50 +0100

csiph-web