[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200324.164326.639594724461733845.davem@davemloft.net>
Date: Tue, 24 Mar 2020 16:43:26 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: jwi@...ux.ibm.com
Cc: netdev@...r.kernel.org, linux-s390@...r.kernel.org,
heiko.carstens@...ibm.com, ubraun@...ux.ibm.com
Subject: Re: [PATCH net-next 01/11] s390/qeth: simplify RX buffer tracking
From: Julian Wiedmann <jwi@...ux.ibm.com>
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.
Powered by blists - more mailing lists