Re: + scripts-checkpatch-check-unused-parameters-for-function-like-macro.patch added to mm-nonmm-unstable branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2024-03-23 at 17:14 +1300, Barry Song wrote:
> > > The patch titled
> > >      Subject: scripts: checkpatch: check unused parameters for function-like macro
> > > has been added to the -mm mm-nonmm-unstable branch.  Its filename is
> > >      scripts-checkpatch-check-unused-parameters-for-function-like-macro.patch
> > 
> > Conceptually I don't disagree but I wonder what the false
> > positive rate is.
> 
> Hi Joe,
> 
> If your concern is whether this script might produce inaccurate reports, I'm confident that
> the false positive rate is 0%. Xining, please correct me if I'm mistaken.

I presume it's low but non-zero.

I think the false positives are going to be
in some cases where a type is used as a macro
argument in #ifdef/#else blocks

#ifdef CONFIG_<FOO>

#define foo(bar, baz, ...)		\
static inline func##bar(baz, ...)	\
{					\
	bar baz = ...			\
	...				\
}

#else

#define foo(bar, baz, ...)

#endif

where it's not reasonably possible to use a
static inline.






[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux