Re: [PATCH] locks: remove trailing semicolon in macro definition

From: Joe Perches
Date: Sun Nov 29 2020 - 17:33:13 EST


On Sun, 2020-11-29 at 10:15 -0800, James Bottomley wrote:
> I think nowadays we should always use static inlines for argument
> checking unless we're capturing debug information like __FILE__ or
> __LINE__ or something that a static inline can't.

IMO: __LINE__ should never be used.

__func__ is the only thing that can't be captured correctly as
the inline gets its own name.

__builtin_return_address(1) would generally work well enough
for the inlines.

> There was a time when we had problems with compiler expansion of static
> inlines, so we shouldn't go back and churn the code base to change it
> because there's thousands of these and possibly some old compiler used
> for an obscure architecture that still needs the define.

That's not a very compelling argument to me.

Those old compilers and obscure architectures should continue
to use the old versions of the code.