LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] scripts: checkversion: modernize linux/version.h search strings
Date: Sun, 1 Aug 2021 11:59:44 +0900 [thread overview]
Message-ID: <CAK7LNATVrJZgWe89dO+W=j+7TB+wTJuJTTp_sFBXD088-fZNsQ@mail.gmail.com> (raw)
In-Reply-To: <20210727025737.30553-1-rdunlap@infradead.org>
On Tue, Jul 27, 2021 at 11:57 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> Update scripts/checkversion.pl to recognize the current contents
> of <linux/version.h> and both of its current locations.
>
> Also update my email address.
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Masahiro Yamada <masahiroy@kernel.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> ---
> scripts/checkversion.pl | 18 +++++++++++-------
> 1 file changed, 11 insertions(+), 7 deletions(-)
Applied to linux-kbuild. Thanks.
> --- linux-next-20210723.orig/scripts/checkversion.pl
> +++ linux-next-20210723/scripts/checkversion.pl
> @@ -1,10 +1,10 @@
> #! /usr/bin/env perl
> # SPDX-License-Identifier: GPL-2.0
> #
> -# checkversion find uses of LINUX_VERSION_CODE or KERNEL_VERSION
> -# without including <linux/version.h>, or cases of
> -# including <linux/version.h> that don't need it.
> -# Copyright (C) 2003, Randy Dunlap <rdunlap@xenotime.net>
> +# checkversion finds uses of all macros in <linux/version.h>
> +# where the source files do not #include <linux/version.h>; or cases
> +# of including <linux/version.h> where it is not needed.
> +# Copyright (C) 2003, Randy Dunlap <rdunlap@infradead.org>
>
> use strict;
>
> @@ -13,7 +13,8 @@ $| = 1;
> my $debugging;
>
> foreach my $file (@ARGV) {
> - next if $file =~ "include/linux/version\.h";
> + next if $file =~ "include/generated/uapi/linux/version\.h";
> + next if $file =~ "usr/include/linux/version\.h";
> # Open this file.
> open( my $f, '<', $file )
> or die "Can't open $file: $!\n";
> @@ -41,8 +42,11 @@ foreach my $file (@ARGV) {
> $iLinuxVersion = $. if m/^\s*#\s*include\s*<linux\/version\.h>/o;
> }
>
> - # Look for uses: LINUX_VERSION_CODE, KERNEL_VERSION, UTS_RELEASE
> - if (($_ =~ /LINUX_VERSION_CODE/) || ($_ =~ /\WKERNEL_VERSION/)) {
> + # Look for uses: LINUX_VERSION_CODE, KERNEL_VERSION,
> + # LINUX_VERSION_MAJOR, LINUX_VERSION_PATCHLEVEL, LINUX_VERSION_SUBLEVEL
> + if (($_ =~ /LINUX_VERSION_CODE/) || ($_ =~ /\WKERNEL_VERSION/) ||
> + ($_ =~ /LINUX_VERSION_MAJOR/) || ($_ =~ /LINUX_VERSION_PATCHLEVEL/) ||
> + ($_ =~ /LINUX_VERSION_SUBLEVEL/)) {
> $fUseVersion = 1;
> last if $iLinuxVersion;
> }
--
Best Regards
Masahiro Yamada
prev parent reply other threads:[~2021-08-01 3:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-27 2:57 Randy Dunlap
2021-08-01 2:59 ` Masahiro Yamada [this message]
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='CAK7LNATVrJZgWe89dO+W=j+7TB+wTJuJTTp_sFBXD088-fZNsQ@mail.gmail.com' \
--to=masahiroy@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@infradead.org \
--subject='Re: [PATCH] scripts: checkversion: modernize linux/version.h search strings' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).