All of lore.kernel.org
 help / color / mirror / Atom feed
From: Haris Iqbal <haris.iqbal@ionos.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: linux-rdma@vger.kernel.org, bvanassche@acm.org, leon@kernel.org,
	dledford@redhat.com, jinpu.wang@ionos.com,
	Gioh Kim <gi-oh.kim@ionos.com>
Subject: Re: [PATCH for-next 2/5] RDMA/rtrs-clt: fix CHECK type warnings
Date: Mon, 7 Feb 2022 17:07:12 +0100	[thread overview]
Message-ID: <CAJpMwyhBZj0ugLd7gud7O422OE6cHgkkOGheXcjDxGbNXA_1kg@mail.gmail.com> (raw)
In-Reply-To: <20220128145510.GA1792599@nvidia.com>

On Fri, Jan 28, 2022 at 3:55 PM Jason Gunthorpe <jgg@nvidia.com> wrote:
>
> On Fri, Jan 14, 2022 at 04:47:50PM +0100, Md Haris Iqbal wrote:
>
> > -/**
> > - * list_next_or_null_rr_rcu - get next list element in round-robin fashion.
> > - * @head:    the head for the list.
> > - * @ptr:        the list head to take the next element from.
> > - * @type:       the type of the struct this is embedded in.
> > - * @memb:       the name of the list_head within the struct.
> > - *
> > - * Next element returned in round-robin fashion, i.e. head will be skipped,
> > - * but if list is observed as empty, NULL will be returned.
> > - *
> > - * This primitive may safely run concurrently with the _rcu list-mutation
> > - * primitives such as list_add_rcu() as long as it's guarded by rcu_read_lock().
> > - */
> > -#define list_next_or_null_rr_rcu(head, ptr, type, memb) \
> > -({ \
> > -     list_next_or_null_rcu(head, ptr, type, memb) ?: \
> > -             list_next_or_null_rcu(head, READ_ONCE((ptr)->next), \
> > -                                   type, memb); \
> > -})
>
> Why not put this in a static inline instead of open coding it? Type is
> always the same for both usages, right?

Yes. Makes sense. I will send this change along with the next patchset.

Thanks for the review and comment.

>
> Jason

  reply	other threads:[~2022-02-07 16:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-14 15:47 [PATCH for-next 0/5] Misc update for RTRS Md Haris Iqbal
2022-01-14 15:47 ` [PATCH for-next 1/5] RDMA/rtrs: fix CHECK:BRACES type warning Md Haris Iqbal
2022-01-14 15:47 ` [PATCH for-next 2/5] RDMA/rtrs-clt: fix CHECK type warnings Md Haris Iqbal
2022-01-28 14:55   ` Jason Gunthorpe
2022-02-07 16:07     ` Haris Iqbal [this message]
2022-01-14 15:47 ` [PATCH for-next 3/5] " Md Haris Iqbal
2022-01-14 15:47 ` [PATCH for-next 4/5] RDMA/rtrs-clt: Update one outdated comment in path_it_deinit Md Haris Iqbal
2022-01-14 15:47 ` [PATCH for-next 5/5] RDMA/rtrs-clt: Do stop and failover outside reconnect work Md Haris Iqbal
2022-01-26 13:56 ` [PATCH for-next 0/5] Misc update for RTRS Haris Iqbal
2022-01-28 15:00   ` Jason Gunthorpe

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=CAJpMwyhBZj0ugLd7gud7O422OE6cHgkkOGheXcjDxGbNXA_1kg@mail.gmail.com \
    --to=haris.iqbal@ionos.com \
    --cc=bvanassche@acm.org \
    --cc=dledford@redhat.com \
    --cc=gi-oh.kim@ionos.com \
    --cc=jgg@nvidia.com \
    --cc=jinpu.wang@ionos.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@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.