[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+FuTSfQJ_PTojBgKCD5mFVNRWmtBXMbgbY=D_WBPswwhsDaLA@mail.gmail.com>
Date: Thu, 7 May 2015 12:05:50 -0400
From: Willem de Bruijn <willemb@...gle.com>
To: David Laight <David.Laight@...lab.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"davem@...emloft.net" <davem@...emloft.net>
Subject: Re: [PATCH net-next 3/7] packet: rollover prepare: single return in packet_rcv_has_room
> IMHO there is little benefit in the 'single return from function' style.
> In general it just makes scan-reading of code more difficult (once you
> see a 'return' you know then is no more relevant code) and hits the RH margin.
Subsequent patches add code to the footer of the function. I should
have been more clear about that in the commit message. The change
is indeed not very useful on its own. But at the end of the patch set,
this is the footer:
has_room = ret == ROOM_NORMAL;
if (po->pressure == has_room)
xchg(&po->pressure, !has_room);
return ret;
which otherwise has to be duplicated.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists