[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1333335521-1348-1-git-send-email-davem@davemloft.net>
Date: Sun, 1 Apr 2012 22:57:50 -0400
From: "David S. Miller" <davem@...emloft.net>
To: netdev@...r.kernel.org
Subject: [PATCH 00/51] Get rid of NLA_PUT*()
This patch series gets rid of all uses of NLA_PUT*() and then kills
the definitions of those macros from netlink.h
For the most part, I've tried to do just a straight conversion of:
NLA_PUT*(...);
to
if (nla_put*(...))
goto nla_put_failure;
However in several cases I've tried to make things look more
reasonable, for example:
if (val)
NLA_PUT*();
becomes:
if (val &&
nla_put*())
goto nla_put_failure;
multiple consequetive puts get combined into one if() statement, like:
if (nla_put_u32(...) ||
nla_put_string(...))
goto nla_put_failure;
One thing I have not done is try to get rid of the nla_put_failure
label, even in the really simply cases. That's another cleanup
altogether, but I will not that some cases can be reduced down to
nothing more than:
return nla_put*(...);
Throughout the series, as new (lowercase) nla_put*() intefaces were
needed, I added them, right before the first commit to make use of
them.
Examples are nla_put_be*(), nlaa_put_net*(), and nla_put_le*().
These are the first commits that will show up in net-next when I open
it up.
--
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