Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1545033pxb; Fri, 1 Oct 2021 13:04:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzmAld/gsPu18sbsjt6Li+7VSzsyNhVkk91xd+XELVBxU//uolbx/pefK7OrX4ZWqmHNTH X-Received: by 2002:aa7:d895:: with SMTP id u21mr892168edq.310.1633118642895; Fri, 01 Oct 2021 13:04:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633118642; cv=none; d=google.com; s=arc-20160816; b=ujbxE5zWB2VLaXx/zQnf+1l3CHiuo60fz3X2KxZ+RLyzQjJ92Vjd6zCjn4dmFcbBCr /WDRWau3lreYdwaqGCYmMJbHPR6F6lvwApNe3EGKcj18h+CnBFK9oEXhSosZD6r0DLsy rbDH67PjEHIh5Qeahfdx3TK/yUmuA/FSNQmMjmTywn1Qly5LAtBdbmQyx0ddHJiT88NZ ZtPzMWoFBVPCYAcpdCy3IeI00FX0CF0/bcR5BeruVaUGgd8G7ZHs9EIZXoDAuD3C2G0u vlEKZ9gW2gJepI1/OmXtrnH//oSckDPSvGYjIUP3dFB7BDbsS/JxoIW3KEbQOICLCVIf ayAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=hC2UBNs65Z8LHcHw5QkhAHkvVyU6e6QpHcC0iOHliZA=; b=MS4+IfMT6WLTQ515iAHLLzFUiGL7yuM+9MguDCd0YZDms85AIkO+22+T4LcEQflrGI sC1HLaH37BnzSwVGoc4vq6872+AO2ecIoRfBPAss/majRl9fEyFJ4UChU52tTuOBmTu5 LvBmzuaVVpkEnioZl9MsV2Y9jYTXS2WSLelyiri5RULAvdlvMNhAJ1ecBTlzJubA4ZWn 4Uu5YS5CRWA5VwI3NNY/IA45pRkt9+tTnYPxeaL6AnUfQ1UXCaEs2V7Kf2CmypJbrBrq CNgN1FIjWiLn1IkewcPpxQFIYbFVxgU0sW6cSUjpRetl7PLcClx4ZBUi+KozbI/b2uAi CaZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=JikkKp3s; 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 10si8125528ejw.91.2021.10.01.13.03.37; Fri, 01 Oct 2021 13:04:02 -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=20210112 header.b=JikkKp3s; 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 S1355509AbhJATLt (ORCPT + 99 others); Fri, 1 Oct 2021 15:11:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229882AbhJATLs (ORCPT ); Fri, 1 Oct 2021 15:11:48 -0400 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1272C061775; Fri, 1 Oct 2021 12:10:03 -0700 (PDT) Received: by mail-pf1-x42d.google.com with SMTP id g2so8781014pfc.6; Fri, 01 Oct 2021 12:10:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=hC2UBNs65Z8LHcHw5QkhAHkvVyU6e6QpHcC0iOHliZA=; b=JikkKp3sd2dAd7c1mNcj+ilWqZ4WMctWP+E0t9X4J304rifPDTbt0J/1Q0sdFy/t6F thmPrDc1rdcSCIXSMw6tyqZOxwi5vT/wOc80yiLIqu7BTAnhrd7AQ2omoyvmrQ1lsqKw gKSZ2VUHRCUk4l4Wx6Jsp+Qw69KDBkaKD0ijYk99937q2phAOf0gWXrIlWIed+mKjdDx cJehJhQPVi4PDGA4BqEwivDPYIO73iloA/K+BGLNF7OPsfGCPZifX1n/TThfap/5sVFO wizpbEyKf2xr0DWVQc1javH7LEE9zie2zxNpnyL8KtCMM0knrNkidLHgmVp9hLZByDN4 2Xaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=hC2UBNs65Z8LHcHw5QkhAHkvVyU6e6QpHcC0iOHliZA=; b=SrvCQuIorEhY/CbV4Fy/PRWkIDX05EwDlkYW+DWWKOlbhsiP7U4eSQwbCJPp7C2Ekx fLD+1BdBEe/Wt3bGzgowc0HYsMBUlCtF2P/KH+HO9gYrV7LngTp5QlIUWnPO1f2SpvK/ 6odrd+f1qju8sElYP7rchiPlYUTnSEk6RrWnx6yiYdKpQLP865ZpCbT/bYWHXd/Lt1WM Pi3lBY1tVn4PxlxHJrVrRF60t4kc13TlRjQQroeUqANe1iryotNsnW9tJJF8m18AKebO QqQD5OF+Yjfx05IhVaiL/CF3xbveIEn9xARYAbkGRMZ7ARNciSB8jma7cljbrYnGruuS HQ/A== X-Gm-Message-State: AOAM530M89QvQWeehdMR/Xz0KRvwnzshVzUWmSmpftwhoDthx8VMoas9 I0/kP9WZ/TLxEOsuNZ/eM4o7B1FE4FHDtfPT3+Q= X-Received: by 2002:a63:f5e:: with SMTP id 30mr10809591pgp.283.1633115403318; Fri, 01 Oct 2021 12:10:03 -0700 (PDT) Received: from uver-machine ([2405:201:6006:a148:c9bc:b8d0:c5af:34e3]) by smtp.gmail.com with ESMTPSA id 3sm5578188pjb.19.2021.10.01.12.09.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 12:10:02 -0700 (PDT) Date: Sat, 2 Oct 2021 00:39:27 +0530 From: Utkarsh Verma To: Joe Perches , Jonathan Corbet , Dwaipayan Ray Cc: Lukas Bulwahn , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Documentation: checkpatch: Document some more message types Message-ID: <20211001190927.GA18097@uver-machine> References: <20210925201746.15917-1-utkarshverma294@gmail.com> <875yulj4m8.fsf@meer.lwn.net> <06f4c72fefeedb5145a940e5a78d50e610acdcc4.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <06f4c72fefeedb5145a940e5a78d50e610acdcc4.camel@perches.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 27, 2021 at 10:53:05AM -0700, Joe Perches wrote: > On Mon, 2021-09-27 at 11:43 -0600, Jonathan Corbet wrote: > > Utkarsh Verma writes: > > > > > Added and documented 3 new message types: > > > - UNNECESSARY_INT > > > - UNSPECIFIED_INT > > > - UNNECESSARY_ELSE > > > > > > Signed-off-by: Utkarsh Verma > > > --- > > > ?Documentation/dev-tools/checkpatch.rst | 47 ++++++++++++++++++++++++++ > > > ?1 file changed, 47 insertions(+) > > > > So...when you send multiple patches with the same subject line that's > > always a bad sign. We really want a "git --oneline" listing to give a > > good idea of what the patch does, and that depends on more descriptive > > subject lines. > > > > In this case, something like: > > > > ??docs: checkpatch: add UNNECESSARY/UNSPECIFIED_INT and UNNECESSARY_ELSE > > > > I can fix up these two patches, but please try to keep this in mind for > > future work. > > > > (applying the patches now). > > The unnecessary_else description isn't particularly good as the > checkpatch output doesn't describe multiple if/else if/else if type > returns where the message should not apply. > > For this type of use, the checkpatch message is not necessarily correct > and because it could be a patch context, there's no way for checkpatch > to know if it's correct or not. > > if (foo) { > ... > } else if (bar) { > ... > return [val]; > } else { > ... > } > Sorry, my bad. I have sent a new patch for the UNNECESSARY_ELSE test. So please do review it. Maybe we should add a check for the continue statement also, because it is similar to the break and return statements, and using else after continue statement is unnecessary. Regards, Utkarsh Verma