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