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