From: Joe Perches <joe@perches.com>
To: "Mickaël Salaün" <mic@digikod.net>, "Andy Whitcroft" <apw@canonical.com>
Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>,
Lukas Bulwahn <lukas.bulwahn@gmail.com>,
Shuah Khan <shuah@kernel.org>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [RFC PATCH v1] checkpatch: Handle FILE pointer type
Date: Thu, 01 Sep 2022 11:49:24 -0400 [thread overview]
Message-ID: <4f958a0c7c0aa2fce613371348477c002aa58e90.camel@perches.com> (raw)
In-Reply-To: <20220901145948.1456353-1-mic@digikod.net>
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
> )};
next prev parent reply other threads:[~2022-09-01 15:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 14:59 [RFC PATCH v1] checkpatch: Handle FILE pointer type Mickaël Salaün
2022-09-01 15:49 ` Joe Perches [this message]
2022-09-01 15:53 ` Mickaël Salaün
2022-09-01 18:22 ` Joe Perches
2022-09-02 9:04 ` Mickaël Salaün
2022-09-02 10:39 ` Joe Perches
2022-09-02 11:04 ` Mickaël Salaün
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4f958a0c7c0aa2fce613371348477c002aa58e90.camel@perches.com \
--to=joe@perches.com \
--cc=apw@canonical.com \
--cc=dwaipayanray1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=lukas.bulwahn@gmail.com \
--cc=mic@digikod.net \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox