Re: [PATCH v5 4/4] riscv/barrier: Resolve checkpatch.pl error

From: Andrea Parri
Date: Fri Feb 16 2024 - 16:05:52 EST


On Tue, Feb 13, 2024 at 10:40:00PM +0000, Eric Chan wrote:
> The past form of RISCV_FENCE would cause checkpatch.pl to issue
> error messages, the example is as follows:
> ERROR: space required after that ',' (ctx:VxV)
> +#define __atomic_acquire_fence() RISCV_FENCE(r,rw)

Not the "best" example, according to Samuel's feedback and the diff
below. How about something like:

ERROR: space required after that ',' (ctx:VxV)
#10: FILE: arch/riscv/include/asm/barrier.h:28:
+#define __smp_mb() RISCV_FENCE(rw,rw)


> -#define __mb() RISCV_FENCE(iorw,iorw)
> -#define __rmb() RISCV_FENCE(ir,ir)
> -#define __wmb() RISCV_FENCE(ow,ow)
> +#define __mb() RISCV_FENCE(iorw, iorw)
> +#define __rmb() RISCV_FENCE(ir, ir)
> +#define __wmb() RISCV_FENCE(ow, ow)

This would go away per my comment to 1/4.


>From a less technical viewpoint and FYI, an unwritten rule of "working
with the Linux kernel community" is:

Don't forget to keep people who spent time reviewing, or providing
feedback to, your patch in the loop/in Cc: in your next iterations;
they might be the only people who will be able to provide feedback
/suggestions/help in your future life.

;-)

Andrea