From: Jason Gunthorpe <jgg@ziepe.ca>
To: Leon Romanovsky <leon@kernel.org>
Cc: Or Har-Toov <ohartoov@nvidia.com>,
linux-rdma@vger.kernel.org, Maher Sanalla <msanalla@nvidia.com>
Subject: Re: [PATCH rdma-next v1 1/2] IB/mad: Add state machine to MAD layer
Date: Mon, 20 Jan 2025 09:47:22 -0400 [thread overview]
Message-ID: <20250120134722.GI674319@ziepe.ca> (raw)
In-Reply-To: <20250119082624.GA21007@unreal>
On Sun, Jan 19, 2025 at 10:26:24AM +0200, Leon Romanovsky wrote:
> > > +#define NOT_EXPECT_MAD_STATE(mad_send_wr, wrong_state) \
> > > + { \
> > > + if (IS_ENABLED(CONFIG_LOCKDEP)) \
> > > + WARN_ON(mad_send_wr->state == wrong_state); \
> > > + }
> >
> > These could all be static inlines, otherwise at least
> > mad_send_wr->state needs brackets (mad_send_wr)->state
>
> I don't think that it is worth to have functions here.
You should always prefer functions to function-like-macros if
possible..
The expected_state needs () as well
Jason
next prev parent reply other threads:[~2025-01-20 13:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-07 14:02 [PATCH rdma-next v1 0/2] IB/mad: Add Flow Control for Solicited MADs Leon Romanovsky
2025-01-07 14:02 ` [PATCH rdma-next v1 1/2] IB/mad: Add state machine to MAD layer Leon Romanovsky
2025-01-14 19:42 ` Jason Gunthorpe
2025-01-19 8:26 ` Leon Romanovsky
2025-01-20 13:47 ` Jason Gunthorpe [this message]
2025-01-07 14:02 ` [PATCH rdma-next v1 2/2] IB/mad: Add flow control for solicited MADs Leon Romanovsky
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=20250120134722.GI674319@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=msanalla@nvidia.com \
--cc=ohartoov@nvidia.com \
/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.