Re: [RFC PATCH v1] checkpatch: Handle FILE pointer type

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

 



On Thu, 2022-09-01 at 16:59 +0200, Mickaël Salaün wrote:
> When using a "FILE *" type, checkpatch considers this an error.  Fix
> this by explicitly defining "FILE" as a common type.
[]
> Another error may be throw when we use FIXTURE_{DATA,VARIANT}() structs,
> as defined in kselftest_harness.h .
[]
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -576,10 +576,17 @@ our $typeKernelTypedefs = qr{(?x:
>  	(?:__)?(?:u|s|be|le)(?:8|16|32|64)|
>  	atomic_t
>  )};
> +our $typeStdioTypedefs = qr{(?x:
> +	FILE
> +)};

I'm fine with this.

> +# our $typeKselftestHarnessTypedefs = qr{(?x:
> +# 	FIXTURE_(?:DATA|VARIANT)\($Ident\)
> +# )};

But not this.  Random userspace typedefs should likely
be kept in some local version of checkpatch.

Or maybe add a command line option like --additional_typedefs=<file>.

>  our $typeTypedefs = qr{(?x:
>  	$typeC99Typedefs\b|
>  	$typeOtherOSTypedefs\b|
> -	$typeKernelTypedefs\b
> +	$typeKernelTypedefs\b|
> +	$typeStdioTypedefs\b
>  )};




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux