On Sun, Mar 15, 2020 at 09:44:04AM +0200, Gal Pressman wrote: > On 10/03/2020 11:14, Leon Romanovsky wrote: > > From: Leon Romanovsky <leonro@xxxxxxxxxxxx> > > > > Remove custom and duplicated variant of offsetofend(). > > > > Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx> > > --- > > drivers/infiniband/hw/efa/efa_verbs.c | 7 ++----- > > 1 file changed, 2 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c > > index bf3120f140f7..5c57098a4aee 100644 > > --- a/drivers/infiniband/hw/efa/efa_verbs.c > > +++ b/drivers/infiniband/hw/efa/efa_verbs.c > > @@ -144,9 +144,6 @@ static inline bool is_rdma_read_cap(struct efa_dev *dev) > > return dev->dev_attr.device_caps & EFA_ADMIN_FEATURE_DEVICE_ATTR_DESC_RDMA_READ_MASK; > > } > > > > -#define field_avail(x, fld, sz) (offsetof(typeof(x), fld) + \ > > - sizeof_field(typeof(x), fld) <= (sz)) > > I would use offsetofend here and keep the field_avail naming for readability > sake of the using functions, but I guess that's fine as well. > > Thanks Leon, > Acked-by: Gal Pressman <galpress@xxxxxxxxxx> Jason, Can you please pick this patch? Thanks