From: David Miller <davem@davemloft.net>
To: jakub.kicinski@netronome.com
Cc: dsahern@gmail.com, jiri@resnulli.us, roopa@cumulusnetworks.com,
christian.brauner@ubuntu.com, netdev@vger.kernel.org,
oss-drivers@netronome.com
Subject: Re: [PATCH net-next 0/2] rtnetlink: avoid a warning in rtnl_newlink()
Date: Fri, 30 Nov 2018 13:34:26 -0800 (PST) [thread overview]
Message-ID: <20181130.133426.679787546958710403.davem@davemloft.net> (raw)
In-Reply-To: <20181128063231.12907-1-jakub.kicinski@netronome.com>
From: Jakub Kicinski <jakub.kicinski@netronome.com>
Date: Tue, 27 Nov 2018 22:32:29 -0800
> I've been hoping for some time that someone more competent would fix
> the stack frame size warning in rtnl_newlink(), but looks like I'll
> have to take a stab at it myself :) That's the only warning I see
> in most of my builds.
>
> First patch refactors away a somewhat surprising if (1) code block.
> Reindentation will most likely cause cherry-pick problems but OTOH
> rtnl_newlink() doesn't seem to be changed often, so perhaps we can
> risk it in the name of cleaner code?
>
> Second patch fixes the warning in simplest possible way. I was
> pondering if there is any more clever solution, but I can't see it..
> rtnl_newlink() is quite long with a lot of possible execution paths
> so doing memory allocations half way through leads to very ugly
> results.
Series applied, thanks for tackling this Jakub.
That whole "if (1) {" was probably just a construct used in order
to create an inner basic block for local variables, nothing more.
prev parent reply other threads:[~2018-12-01 8:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-28 6:32 [PATCH net-next 0/2] rtnetlink: avoid a warning in rtnl_newlink() Jakub Kicinski
2018-11-28 6:32 ` [PATCH net-next 1/2] rtnetlink: remove a level of indentation " Jakub Kicinski
2018-11-28 17:53 ` David Ahern
2018-11-28 6:32 ` [PATCH net-next 2/2] rtnetlink: avoid frame size warning " Jakub Kicinski
2018-11-28 17:53 ` David Ahern
2018-11-28 17:52 ` [PATCH net-next 0/2] rtnetlink: avoid a " David Ahern
2018-11-30 21:34 ` David Miller [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=20181130.133426.679787546958710403.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=christian.brauner@ubuntu.com \
--cc=dsahern@gmail.com \
--cc=jakub.kicinski@netronome.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@netronome.com \
--cc=roopa@cumulusnetworks.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).