Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2595629pxj; Mon, 17 May 2021 05:30:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzINVGAAF8KIZgTvqbMeZu4nE8XL2QXlNsNCBB3iDy82teXXFDssNhJ+Xprt1BxxynxdwBD X-Received: by 2002:a5e:8c11:: with SMTP id n17mr35839005ioj.53.1621254630339; Mon, 17 May 2021 05:30:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621254630; cv=none; d=google.com; s=arc-20160816; b=vdqNM713z430wq5DiQ+h6UhIqIy+UtD6PYQsdME9pFm6VGRnlecDe3XzF/R5IyOB+K aj0UvkrdU88J+nWIqbHqZRp4gTE7/nKgjj4o3nK3LDh5N+VlK8rgJcKLYKmIFNr3I5Sm F+q5VccjE0gvFoChECLPNf2Fd1ya8ZwEVVYfKOREaVzs9nyG/o5lOQFXg0a5vcNi5UC3 UNBb3L2ikuqcWSK80u5KyCm5F0gom0w4NytiK2XmsIzxOkDWCqaUxuSyCVntXoWn4FTm iu29UMqdxe8cg0GNOQAKgTFcZxjB2rwi58lf0M9vFVMwUIVX0ffAbaWG9XPtz+qJtWv4 NSVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ZnfM4fo4oFuAPVsrltUK26/fkolufI98kOjdPlwBBSs=; b=nZvkOUf6nYuSnKwQMTlW3UH6Kwl/yjdDzTqKdEF41Wix/UWMSyANT6Pq6+RKo6OekJ rAE/uLhN8z8Zh8aurL1+DLxVwY5sBH6xAEGFkIpqIc5VPOnw3sOSqRwUD4NpJ6uOd2Qn oomnzZFqqMtNL0Tut7fu4sVV7IgaAiP+0foxdHE6qOCFrfPigbO2APN5z3uM6REowrFj a/OH9jB6iIR4vLg1tcx8LlbkMzBNsCN5ygCOS2LyQd99OMfC7dN3VyUplKb9duyroKhZ xJTZzusVH+/4T4DsMZZODJBVbl5wRQK0wXm76yooAq0vAfMRb5sQdgvw4MTtbeZo30eI Ddvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sCHz9T1r; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x6si21141756ilv.63.2021.05.17.05.30.17; Mon, 17 May 2021 05:30:30 -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=@gmail.com header.s=20161025 header.b=sCHz9T1r; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234520AbhEQHON (ORCPT + 99 others); Mon, 17 May 2021 03:14:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234737AbhEQHOJ (ORCPT ); Mon, 17 May 2021 03:14:09 -0400 Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82DE5C061573; Mon, 17 May 2021 00:12:49 -0700 (PDT) Received: by mail-yb1-xb36.google.com with SMTP id r8so7168187ybb.9; Mon, 17 May 2021 00:12:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZnfM4fo4oFuAPVsrltUK26/fkolufI98kOjdPlwBBSs=; b=sCHz9T1r7pQoPrnpmLqVHffncPimVZ34tPFdaSdpCyyRmbI4Bw3dFCYBoNaHQfs2aM x4LC/UHilSXaDbQyq/4lODNs6RHLkQwrQ4pnqts1hIX7m8GXq+VZCloO2acNQPvRjZC8 nglxT+eRVpvnqJzCIEgcNaLk912N/KZAdP6X9R6yU4US8h+yBsCO6w6A4KieZrh81kyG WFjtQ3AXvTMaHgIfZNNkkdTD6+q/qdhDj1bfvvqnUIGHmtDNoQCMOUgv5vMgK8ZE6tYd 5r80kL1d0ezowYexxgyQybHP/RFvWWp4MARDBG2kjL7e8XWIVJnrL592aMS7N+T8grKB CDaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZnfM4fo4oFuAPVsrltUK26/fkolufI98kOjdPlwBBSs=; b=ahlfZ9UIOuvAxKS0euvTxjwDL/+iZLauVYNqkGBcYkDUOW7Jq8dnn+ik0RTwSRQCVp 6HuJ+wVMkEmE76ANPZx3LeR70L4RshfvlvcfrZ5qs2TVTn0osN+fsez6R9Hf+YrdGEcm JedkQ6398E/KlDgKFmkWqKEaxm+ts0aIysm5p2TXels8c8r31kd9NI4KD6apHxpEis9B 9V5TeH5BWTpKqwJ4tYZs1kYUCZGTSoFUdFSM14al+JbWnGrImSbJye4Yce9qpW+VVCXe HyDH35t5Md792MSmzgVe4FZL9aVKf7v1V/NF5N7ZAg8bfJ09SipRug5d1xg3MDO6XqEE bW9A== X-Gm-Message-State: AOAM532VUACrzWTZt+g82e59Y+yLmyNgWOtqj8znLWW/Jjrx4W4M1+Xa kiFp2ktDEPbenE9Ini1yzn9kS13aXmQ/1dYyoI9ZSj4x X-Received: by 2002:a25:55d5:: with SMTP id j204mr79927377ybb.157.1621235568717; Mon, 17 May 2021 00:12:48 -0700 (PDT) MIME-Version: 1.0 References: <1621224036-32092-1-git-send-email-yangtiezhu@loongson.cn> In-Reply-To: From: Lukas Bulwahn Date: Mon, 17 May 2021 09:12:51 +0200 Message-ID: Subject: Re: [PATCH] Documentation: checkpatch: add description if no filenames are given To: Dwaipayan Ray Cc: Tiezhu Yang , Jonathan Corbet , Joe Perches , linux-kernel , "open list:DOCUMENTATION" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 17, 2021 at 8:21 AM Dwaipayan Ray wrote: > > Hey, > > On Mon, May 17, 2021 at 9:30 AM 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, it is a bit confusing whether the script hangs, I do not quite > > know what to do next util I understand the code logic. > > util -> until s/I understand/I understood/ > > > > At the beginning, I want to print some info if no filenames are given [1], > > but as Joe Perches said, this is unnecessary. It's like trying to make cat > > without command line arguments emit something. > > > > So as Lukas Bulwahn suggested, add description for somebody that actually > > reads the available kernel documentation on checkpatch. > > > > [1] https://lore.kernel.org/patchwork/patch/1429026/ > > Generally, I think this commit message is a bit "too much the personal experience report" rather than focussing on the technical motivation. I prefer the same content with less "I" and more focus on the technically valid arguments rather than people (your experience, Joe's, Lukas' opinion etc.). > > Signed-off-by: Tiezhu Yang > > --- > > Documentation/dev-tools/checkpatch.rst | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/Documentation/dev-tools/checkpatch.rst b/Documentation/dev-tools/checkpatch.rst > > index 51fed1b..181b95e 100644 > > --- a/Documentation/dev-tools/checkpatch.rst > > +++ b/Documentation/dev-tools/checkpatch.rst > > @@ -210,6 +210,8 @@ Available options: > > > > Display the help text. > > > > +When FILE is -, or no filenames are given, read standard input. > > + > > The addition is reasonable but the position of the text is a bit weird. > Let's have it after the Usage:: text: > > ----------- > diff --git a/Documentation/dev-tools/checkpatch.rst > b/Documentation/dev-tools/checkpatch.rst > index d4bb55723a86..7bf1e48207ce 100644 > --- a/Documentation/dev-tools/checkpatch.rst > +++ b/Documentation/dev-tools/checkpatch.rst > @@ -22,6 +22,8 @@ Usage:: > > ./scripts/checkpatch.pl [OPTION]... [FILE]... > > +When FILE is -, or absent, checkpatch reads from standard input. > + > Available options: > > - -q, --quiet > @@ -210,7 +212,6 @@ Available options: > > Display the help text. > > -When FILE is -, or no filenames are given, read standard input. > > Message Levels > ============== > ------------- > Fully agree with Dwaipayan here. This is the better place this sentence should be added. Please send a patch v2. And if you want to contribute more, please add some typical example how to invoke checkpatch with a filename and a good example how checkpatch could be used reading from stdin (e.g., by piping in some suitable git log or git show output). Lukas