Re: [PATCH net-next v25 01/13] rtase: Add support for a pci table in this module

From: Markus Elfring
Date: Mon Jul 29 2024 - 12:46:44 EST


>> …
>>> +++ b/drivers/net/ethernet/realtek/rtase/rtase.h
>>> @@ -0,0 +1,338 @@
>> …
>>> +#ifndef _RTASE_H_
>>> +#define _RTASE_H_
>> …
>>
>> I suggest to omit leading underscores from such identifiers.
>> https://wiki.sei.cmu.edu/confluence/display/c/DCL37-C.+Do+not+declare+or+define+a+reserved+identifier
>
> Do you have a reference to a Linux kernel document which suggests not
> to do this?

I assume that you would become interested to clarify corresponding concerns
according to compliance (or deviations) from the standard of the programming language “C”.


> My grep foo is not great, but there appears to be around 20,000
> instances of #define _[A-Z] in the kernel. So i doubt adding a couple
> more is going to be an issue.

I suggest to improve case distinctions accordingly.
Can it be more desirable to avoid undefined behaviour another bit?

How will development interests evolve further?

Regards,
Markus