Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1359167pxj; Wed, 19 May 2021 04:24:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAmwsS2w4D2tT7/BJVaajPilMB34eHJdyUcEC1L+R7uJM/OMEtAY3A+8iBSrnhLYHby4l1 X-Received: by 2002:a92:d0c3:: with SMTP id y3mr9604137ila.58.1621423473749; Wed, 19 May 2021 04:24:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621423473; cv=none; d=google.com; s=arc-20160816; b=unKTeIycVd/tIA0ZqIvsbQz9in9MXqJYnfeKe0eVGbG2SmPgpvQkC7xIE/KFIq8Wjh 50e+5GwOOF3YGfYzulsH99vC/bvGLibolvkbDuR+C4sx2Pjxdn/p+4NY2kthnIpZJhRn 000zufh6YemeNBg8KmUA1M1mpkZ06mtkf+TM3C5pfEhDUyL789Eg+OtIHp88W0cHrVzN Uaki6rnZdLd3J71hLC7oBbMOerTswIP2glEqkq67nTlmXNgBC8duQ0Tijq9GDFGLC6gb AfxHQOLP487gg9AP7GvwB137oshUb1FLbZzgooMfxJBy6VyIo9plNWswNAVj6cQEeEWS b7BQ== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=a87kPH6T9AgDFJLP8cJqzkZS3Hon+F+5MlvcCAPBqc0=; b=SRglBgP0G88+mIhXR/Dw4IIBydbnByMISw0u3/9qqHiDsDpqR2BUWqxSamB3kJg7BD hwRRmtEZCZ0zl1UmumYuoOLCDs0mDSfuQUn2fRGZZFN+T7kfTOtbkpsbZT0fOzU5lfmS ZWID0JZpPvGxlMe2e41s/1awAwQQFE4WzhCEg1ufUqcxSkJLH7/XFomgxXAI/BPXHD9d +Y7qeu3koOZC8aP7Fxm8BgdlyRUZqyfLFfNajrkDQoE2KMByg8N7Ec50QNhTzTujcijg T6xSqtbKSO6J7SD9WN7gb3Qrh87rj9zzSi8YEf3l1SYwH7H9XgKfVPr0CJxhAHash3Lc 6ejA== 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 g10si15687059ilf.140.2021.05.19.04.24.21; Wed, 19 May 2021 04:24:33 -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 S240204AbhERCYL (ORCPT + 99 others); Mon, 17 May 2021 22:24:11 -0400 Received: from smtprelay0224.hostedemail.com ([216.40.44.224]:60510 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S237658AbhERCYL (ORCPT ); Mon, 17 May 2021 22:24:11 -0400 Received: from omf02.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay02.hostedemail.com (Postfix) with ESMTP id 41988B9E0; Tue, 18 May 2021 02:22:53 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf02.hostedemail.com (Postfix) with ESMTPA id 400311D42F6; Tue, 18 May 2021 02:22:52 +0000 (UTC) Message-ID: Subject: Re: [PATCH] checkpatch: add help info if no filenames are given From: Joe Perches To: Tiezhu Yang , Andy Whitcroft , Dwaipayan Ray , Lukas Bulwahn Cc: linux-kernel@vger.kernel.org Date: Mon, 17 May 2021 19:22:50 -0700 In-Reply-To: <1621301101-10650-1-git-send-email-yangtiezhu@loongson.cn> References: <1621301101-10650-1-git-send-email-yangtiezhu@loongson.cn> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=1.59 X-Stat-Signature: jihq8tuq4xpq9hfagci99qa1jnm7u98h X-Rspamd-Server: rspamout04 X-Rspamd-Queue-Id: 400311D42F6 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX189Clm5kzluHcxTV3Ni94MGzXh0bkt97MM= X-HE-Tag: 1621304572-653515 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > ?EOM > ? > > ? exit($exitcode);