Thread (16 messages) 16 messages, 2 authors, 2020-10-02

Re: [PATCH 1/5] netlink: simplify netlink_policy_dump_start() prototype

From: Jakub Kicinski <kuba@kernel.org>
Date: 2020-10-02 15:31:47

On Fri,  2 Oct 2020 11:09:40 +0200 Johannes Berg wrote:
From: Johannes Berg <redacted>

Since moving the call to this to a dump start() handler we no
longer need this to deal with being called after having been
called already. Since that is the preferred way of doing things
anyway, remove the code necessary for that and simply return
the pointer (or an ERR_PTR()).

Signed-off-by: Johannes Berg <redacted>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
-	return netlink_policy_dump_start(op.policy, op.maxattr, &ctx->state);
+	ctx->state = netlink_policy_dump_start(op.policy, op.maxattr);
+	if (IS_ERR(ctx->state))
+		return PTR_ERR(ctx->state);
+	return 0;
PTR_ERR_OR_ZERO()?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help