On 25.03.20 00:43, David Miller wrote: > From: Julian Wiedmann <jwi@xxxxxxxxxxxxx> > Date: Tue, 24 Mar 2020 19:24:38 +0100 > >> +#define QDIO_ELEMENT_NO(buf, element) (element - &buf->element[0]) > > Maybe this works, but I would strongly suggest against using a CPP > macro argument that is the same name for the singleton element on > the left branch of the expression as the struct member name on > the right side of the element. Right you are, this would look a lot less fragile with some underscores. > > Furthermore, as far as I can tell this is only used in one location > in the code, and for such a simple expression that is excessive. > This I flat out disagree with, but it's hardly worth arguing about. So let me fold that macro back in, and send you a v2.