Re: [PATCH rdma-next 04/12] IB/core: Refactor gid management code to store state and prop separately

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 17, 2018 at 04:32:16PM +0000, Parav Pandit wrote:

> > >  	rwlock_t	     rwlock;
> > >  	struct ib_gid_table_entry *data_vec;  }; @@ -149,6 +154,18 @@ int
> > > ib_cache_gid_parse_type_str(const char *buf)  }
> > > EXPORT_SYMBOL(ib_cache_gid_parse_type_str);
> > >
> > > +static inline bool
> > > +is_gid_table_entry_free(const struct ib_gid_table_entry *entry) {
> > > +	return entry->state == GID_TABLE_ENTRY_FREE; }
> > > +
> > > +static inline bool
> > > +is_gid_table_entry_valid(const struct ib_gid_table_entry *entry) {
> > > +	return entry->state == GID_TABLE_ENTRY_ALLOCATED; }
> > 
> > I'm still not sure about these functions.. I'm not sure it aides readability.

> Check is used in multiple functions. So I will keep it.
> In fact in v1 series, it is more useful because more than one check is involved.

I ended up deleting them in the draft I sent you because the require
check that was duplicated remained trivial, and was focused on the
data_vec not the entry. That way seems much cleaner.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux