Re: [PATCH] llc: fix coding style and memory barrier documentation

From: Andrew Lunn

Date: Tue May 05 2026 - 16:19:59 EST


On Tue, May 05, 2026 at 09:25:49PM +0200, Lucas Poupeau wrote:
> Fix multiple style issues reported by checkpatch.pl to improve code
> maintainability and compliance with kernel standards.
>
> Changes included:
> - Add mandatory explanatory comments to memory barriers, specifying
> the reasoning and pairing context.
> - Insert missing blank lines after variable declarations to improve
> readability.
> - Relocate EXPORT_SYMBOL macros to immediately follow their respective
> function definitions as per the modern kernel coding style.
>
> Note: Some indentation warnings from checkpatch.pl persist in this
> commit. Despite several attempts to align them, the tool remains
> capricious regarding these specific blocks, and further manual
> refinement proved counterproductive.
>
> Reported-by: checkpatch.pl
> Signed-off-by: Lucas Poupeau <lucasp.linux@xxxxxxxxx>

Please take a read of

https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html

The Subject line needs to indicate what tree it is for.

Please also break this patch up. One patch per type of fix. You are
aiming for patches which are obviously correct. Such patches are
generally small, and have good commit messages.

> -#if 0
> -#define dprintk(args...) printk(KERN_DEBUG args)
> -#else
> -#define dprintk(args...)
> -#endif

It is not obvious why this is correct. Is dprintk() not actually used
in this file? That would be something you would say in the commit
message.

> + /*
> + * This barrier ensures that any previous memory operations
> + * are visible before the handler is executed.
> + * Pairs with the smp_wmb() in [indiquez ici la fonction ou le fichier].
> + */

Please do specify the function here. Otherwise the comment is useless.

Andrew