All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 1/5] netlink: simplify netlink_policy_dump_start() prototype
Date: Fri, 02 Oct 2020 22:02:03 +0200	[thread overview]
Message-ID: <1b1089b3ff392b46bc3d4b975b07cd4e34081719.camel@sipsolutions.net> (raw)
In-Reply-To: <20201002083144.39af89e8@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>

On Fri, 2020-10-02 at 08:31 -0700, Jakub Kicinski wrote:
> On Fri,  2 Oct 2020 11:09:40 +0200 Johannes Berg wrote:
> > From: Johannes Berg <johannes.berg@intel.com>
> > 
> > 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 <johannes.berg@intel.com>
> 
> 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()?

Hah! I didn't even know about that, thanks.

johannes


  reply	other threads:[~2020-10-02 20:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-02  9:09 [PATCH 0/5] genetlink: complete policy dumping Johannes Berg
2020-10-02  9:09 ` [PATCH 1/5] netlink: simplify netlink_policy_dump_start() prototype Johannes Berg
2020-10-02 15:31   ` Jakub Kicinski
2020-10-02 20:02     ` Johannes Berg [this message]
2020-10-02  9:09 ` [PATCH 2/5] netlink: compare policy more accurately Johannes Berg
2020-10-02 15:39   ` Jakub Kicinski
2020-10-02  9:09 ` [PATCH 3/5] netlink: rework policy dump to support multiple policies Johannes Berg
2020-10-02 15:39   ` Jakub Kicinski
2020-10-02 20:11     ` Johannes Berg
2020-10-02 20:13     ` Johannes Berg
2020-10-02 20:37       ` Jakub Kicinski
2020-10-02 20:38         ` Johannes Berg
2020-10-02 20:42           ` Jakub Kicinski
2020-10-02  9:09 ` [PATCH 4/5] genetlink: factor skb preparation out of ctrl_dumppolicy() Johannes Berg
2020-10-02 15:42   ` Jakub Kicinski
2020-10-02  9:09 ` [PATCH 5/5] genetlink: properly support per-op policy dumping Johannes Berg

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=1b1089b3ff392b46bc3d4b975b07cd4e34081719.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.