[PATCH v4 2/2] riscv: Optimize bitops with Zbb extension

Conor Dooley conor.dooley at microchip.com
Tue Oct 31 00:52:50 PDT 2023


> > > > +static __always_inline unsigned long variable__ffs(unsigned long word)
> > > > +{
> > > > +	int num;
> > > > +
> > > > +	asm_volatile_goto(
> > > > +		ALTERNATIVE("j %l[legacy]", "nop", 0, RISCV_ISA_EXT_ZBB, 1)
> > > > +		: : : : legacy);
> > > > +
> > > 
> > > On this and following asm blocks, checkpatch outputs:  "Lines should not
> > > end with a '('".
> > 
> > I did below check, but I got no warning.
> > # ./scripts/checkpatch.pl v4-0002-riscv-Optimize-bitops-with-Zbb-extension.patch
> > total: 0 errors, 0 warnings, 280 lines checked
> > May I know how you do the check?
> > BTW, I see arch/riscv/include/asm/jump_label.h and arch/riscv/include/asm/cpufeature.h have similar code.
> 
> I normally use the --strict flag since that is what the Patchwork server
> uses.

FWIW, checkpatch output does require human interpretation. It is only a
"dumb" perl script, and particularly for asm stuff the complaints can
often be ignored. IMO, this is one of those times.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20231031/728a3ca6/attachment.sig>


More information about the linux-riscv mailing list