Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4053159pxv; Mon, 26 Jul 2021 20:00:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3bsfw+AvyA3tEKqZpCko1if4h6LYXJQfahvY+/ecHGThKWz/LV0thNs4r2v7w43Z4zDR4 X-Received: by 2002:a05:6e02:1ba3:: with SMTP id n3mr10951853ili.213.1627354816912; Mon, 26 Jul 2021 20:00:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627354816; cv=none; d=google.com; s=arc-20160816; b=nyl0Xtnmqoozpm+61ZuWHKiXi0iriB7bs62s3ywkPOahGzg5oTK7xYEu63r66kMdP4 qrdSJpS9xYr63DRoOLmpOJfxJ/OPWsu1c/pIprv2/VypeOTLbsCA8pqT2I3ICY6n4Fls 8S9fmILqoZvVAqUwLSdVsMwFnRrKeDvLXHScALQiQW8zcVgRbUL/oHcPPI/K26grpYtg mYGfYO80f379gaAS2i8UTyMMgOXvLKHSCTZoqDUV/J9xNxZ0zd0TPSomI3qvqUt+qGKm YjsEptOIK9QcNJ9bgkCUjfsL6OZxQPF0f4JF+QweGC6otD0repjVqCNKFmZgQM0H1d/G 4qBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ufowFuNuNaJGOwhEapir9LnGgTlR2Oi9Tx8Pe0vf55g=; b=UZbYqFjl7ImpklMvt/zq/p1dodMK+h3fEazo6/SixxTqcg7EhFxOmRxqA7qvQU09Un kB6F7M3aXcmo2u2p4QqcAhKxgjvXFaMjOIUZwL8xYprV/3hASWjYcwAHYFCxFh6TbyvJ CUSNoRwwRr6g3ZV2xka/FD8Itiy/l4ZcvcYr2VOFItUBKhdnF58WzYiCX9PYT0isXQV9 UHZAHYKtHCFmveeFijTjnaEcTStJgUGDEjvdVPWY/W8j/Brf/rP2TUoA3m8QfTS1Cu3F bkiZDm32Dq/nksPAL70gY4uZkSz7E/IqJ5TWoA7d93Kj9bKPTE8xF0MsdVbzaLLgJNRn 9aWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=BOSwQuuP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x29si1762350jap.52.2021.07.26.20.00.04; Mon, 26 Jul 2021 20:00:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=BOSwQuuP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234516AbhG0CRL (ORCPT + 99 others); Mon, 26 Jul 2021 22:17:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234438AbhG0CRK (ORCPT ); Mon, 26 Jul 2021 22:17:10 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E23E0C061757 for ; Mon, 26 Jul 2021 19:57:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=ufowFuNuNaJGOwhEapir9LnGgTlR2Oi9Tx8Pe0vf55g=; b=BOSwQuuPUdyAZFAVenkYytT3Iq lQOLCO36GFpL3jwsGKfcRH5hSYrA4E+r7VNJVLpNYuXLsvycqYDgu9IEHjcXWOuTmJUDj+zBYuj+Q cfa1zAO5G1HURxS+WlHkDY/JQ3/CIRZB3uT1UT6z/jILe2Efi6twrKQl2B/dcyUTpfCpS8RIrqiYO WfwLhmEHKGreRS+zxAcVTm5qU60gv/1pgnNO17lvGzAyeZtFGBkIrugmrmSXL9TOPd9CR7GIh+Ch5 MdLFQ5k55DQLFfZ8s2OnIuaphZOh8RKEY0ZRimSX3lr3kfV//WOZATlVNb6IE36/yGumzU1ZD8A9w p2uB+MDQ==; Received: from [2601:1c0:6280:3f0::aefb] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8DHm-00CuPT-Cz; Tue, 27 Jul 2021 02:57:38 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Masahiro Yamada , Andrew Morton Subject: [PATCH] scripts: checkversion: modernize linux/version.h search strings Date: Mon, 26 Jul 2021 19:57:37 -0700 Message-Id: <20210727025737.30553-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Update scripts/checkversion.pl to recognize the current contents of and both of its current locations. Also update my email address. Signed-off-by: Randy Dunlap Cc: Masahiro Yamada Cc: Andrew Morton --- scripts/checkversion.pl | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) --- 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 , or cases of -# including that don't need it. -# Copyright (C) 2003, Randy Dunlap +# checkversion finds uses of all macros in +# where the source files do not #include ; or cases +# of including where it is not needed. +# Copyright (C) 2003, Randy Dunlap 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*/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; }