[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201002084252.5f18a244@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Fri, 2 Oct 2020 08:42:52 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Johannes Berg <johannes@...solutions.net>
Cc: netdev@...r.kernel.org, Johannes Berg <johannes.berg@...el.com>
Subject: Re: [PATCH 4/5] genetlink: factor skb preparation out of
ctrl_dumppolicy()
On Fri, 2 Oct 2020 11:09:43 +0200 Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@...el.com>
>
> We'll need this later for the per-op policy index dump.
>
> Signed-off-by: Johannes Berg <johannes.berg@...el.com>
Reviewed-by: Jakub Kicinski <kuba@...nel.org>
> while (netlink_policy_dump_loop(ctx->state)) {
> - void *hdr;
> + void *hdr = ctrl_dumppolicy_prep(skb, cb);
> struct nlattr *nest;
>
> - hdr = genlmsg_put(skb, NETLINK_CB(cb->skb).portid,
> - cb->nlh->nlmsg_seq, &genl_ctrl,
> - NLM_F_MULTI, CTRL_CMD_GETPOLICY);
> if (!hdr)
> goto nla_put_failure;
bike shedding, but I find it less pretty when functions which require
error checking are called as variable init (if it's not the only
variable declared).
Powered by blists - more mailing lists