Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1359214pxj; Wed, 19 May 2021 04:24:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySSpqo1Oi3/5Q62bucbSqwePDR4BblRmzeTGZdx35AwJ9Y2D/zBs03ihHrJgtVPY2+qmhR X-Received: by 2002:a05:6e02:1002:: with SMTP id n2mr9436272ilj.260.1621423476633; Wed, 19 May 2021 04:24:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621423476; cv=none; d=google.com; s=arc-20160816; b=Yf/2tBejOfYmZpeb64RcEcSL66uARiF0876GrYKUlB8gMQ6L2zA4mtpUTeh6CL9y5X AbAKXVwDHE5C4vJWV9syh4Rley9mm0HcWbS2Wqf/nha4WPuiztSIKlJo62UW0rRfwXMG VoTFR8F2xFrc6hQhjo50evghqvJpitW4pYggxC8Hg/1lv5RLAxEX5sYceWzCj8SwWV/P SMu0eDPgdziZbF1WSrq0Q/pt7fveUGCMMr/93QbHejtubc2y2uedPQS4aBm8tKybg9tF FfmHqIzrbbw1QYeIawY4nwDgoaig1ln0ZljuI45GTue8fALBU644sHOCitum49H4I2rF n13Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=YLrIJnxh2sZ01jQYKlvXq9fm6tHOZv/m+LcN/nIYA+E=; b=s0CNBXN6+caE0Li9NtMU6I8i3FeTKebp4NyEkt/a/bxGs6Hjl2+SwJwt7bJSdhoCk7 d8pw7OR9f5AePtVziKL5yUx58v04yu9rqYyHxOl8DBm2oueunFSspeWPs12dGohjijT0 3W9QUM9Rwdjlz3D/0wyLvC+AEcemUZGmI2MWSnv/lmxEzOekHY1lR0yBp7ze96qe4vHl AP9Z/9D4w/YFlG3UBvndxJkxJr/Z9mL9XMunDFxHC5WIh2JyXQ28mVgFgw7a0V96r4JG BSrGZrZ4HRWJ/8DVur4EXOGHtNz8Uf8sW2hbkLgTTzQO9YP2zimZuAEt91sODZEWAMU8 nXbg== ARC-Authentication-Results: i=1; mx.google.com; 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 v1si36087523iof.80.2021.05.19.04.24.23; Wed, 19 May 2021 04:24:36 -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; 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 S240127AbhERCjY (ORCPT + 99 others); Mon, 17 May 2021 22:39:24 -0400 Received: from mail.loongson.cn ([114.242.206.163]:44646 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230228AbhERCjY (ORCPT ); Mon, 17 May 2021 22:39:24 -0400 Received: from [10.130.0.135] (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9DxX+6LKKNggaYYAA--.20019S3; Tue, 18 May 2021 10:38:04 +0800 (CST) Subject: Re: [PATCH] checkpatch: add help info if no filenames are given To: Joe Perches , Andy Whitcroft , Dwaipayan Ray , Lukas Bulwahn References: <1621301101-10650-1-git-send-email-yangtiezhu@loongson.cn> Cc: linux-kernel@vger.kernel.org From: Tiezhu Yang Message-ID: Date: Tue, 18 May 2021 10:38:03 +0800 User-Agent: Mozilla/5.0 (X11; Linux mips64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-CM-TRANSID: AQAAf9DxX+6LKKNgga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IU8BHq7UUUUU== X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/18/2021 10:22 AM, Joe Perches wrote: > On Tue, 2021-05-18 at 09:25 +0800, Tiezhu Yang wrote: >> After commit 45107ff6d526 ("checkpatch: if no filenames then read stdin"), >> if no filenames are given, it will read patch from stdin rather than exit >> directly. This means the script waits for input indefinitely, which >> confuses new checkpatch users at first. >> >> Add some help info on this behaviour of checkpatch to lower the confusion. >> >> Signed-off-by: Tiezhu Yang >> --- >> scripts/checkpatch.pl | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl >> index 23697a6..825eb00 100755 >> --- a/scripts/checkpatch.pl >> +++ b/scripts/checkpatch.pl >> @@ -80,6 +80,8 @@ sub help { >> Usage: $P [OPTION]... [FILE]... >> Version: $V >> >> >> +When FILE is -, or absent, checkpatch reads from standard input. >> + >> Options: >> -q, --quiet quiet >> -v, --verbose verbose mode >> @@ -138,8 +140,6 @@ Options: >> --kconfig-prefix=WORD use WORD as a prefix for Kconfig symbols (default >> ${CONFIG_}) >> -h, --help, --version display this help and exit >> - >> -When FILE is - read standard input. > This line is redundant/unnecessary. This commit adds "When FILE is -, or absent, checkpatch reads from standard input." and delete "When FILE is - read standard input." > >> EOM >> >> >> exit($exitcode);