Re: [PATCH v4] IB/core: Make device counter infrastructure dynamic

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

 



On Tue, 24 May 2016, Jason Gunthorpe wrote:

> > +	/* Guard against buggy edits of the names array */
> > +	BUILD_BUG_ON(ARRAY_SIZE(names) != NR_COUNTERS);
>
> Just drop NR_COUNTERS an use ARRAY_SIZE(names) in all places
> instead?

The NR_COUNTERS is needed to make sure the enum definition is in sync with
the names array. It also allows a reference to the number of items defined
in the enum where necessary.


--
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