Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5368357pxu; Wed, 21 Oct 2020 23:39:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmYakv8fHqHmZg2pCNXjhMBubhyHSuFKocVuP3o0L3AjJNF/7ReD/RzyBaor2HD+Q/dRXI X-Received: by 2002:a17:906:edb0:: with SMTP id sa16mr858883ejb.327.1603348763060; Wed, 21 Oct 2020 23:39:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603348763; cv=none; d=google.com; s=arc-20160816; b=U+gQZT+yHSmza/JCZeefYpHQoQui05cOGtqwpDaSVkTglT5yo/lcByePQzs3fDIPGG lGsqmE0oK/8CGfhGq0zACX2frgg6gxBu610HYNO4vW1h/mSnXwWcnmg8r6YSV4qPWWOA M7LudRy4bKeO8GA4MhSkgGO2e+xYFYFK3fi3goCcCNFOO/c1xdbbbZxKyzgY07V3StB7 tkHQiOEWBWej1ywJpYfEbYgODFU753jO3wAXPgj4BAQeJatlyv9Q648vPqBkZF25orbT MKESi05AvuSWv54d/cfOdrqYV36mPLfipIL47gKnqJPSJsv7XrdAZVBjaRwvC6NDXNz/ LZRg== 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=cicLxiZ2pJxeNcrsla6aQZQxECgsVNk7QwFVKAmvVic=; b=zGDLCHP115LKnbTTIuxwYYJGJUcIZaeHC1PFDeck84ctsOUvyWZ4i3MQZj9YkymX/Y KWyegFKuu2Jg+srlc9kaBr7qH37f8Bq5RGMvm/smm3YaK5SZ6xmwm+UqYGREJdSgTA6R K3LHiFv7JBumPv12M+/52otiyZzIYouEBthuifzr2LiWPfRykd7eE7Q80RmvkYpTnzcS Ysx/7PMymyniCFe0QqoufTU4PTUI3bs+G6F9nIds2Sb9mSQLWPDe4QaCpzDpJqUH4wK7 rIhuAvg2HEFBtCZAu4hlZoWkCbWB+inMMykEpegIDFjqZn4yabrluHbx0D90idZssVB0 YkDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LtZOp7+b; 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 w2si572423edi.24.2020.10.21.23.39.00; Wed, 21 Oct 2020 23:39:23 -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=LtZOp7+b; 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 S2409035AbgJUTMt (ORCPT + 99 others); Wed, 21 Oct 2020 15:12:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408959AbgJUTMs (ORCPT ); Wed, 21 Oct 2020 15:12:48 -0400 Received: from mail-il1-x141.google.com (mail-il1-x141.google.com [IPv6:2607:f8b0:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BFEDC0613CE for ; Wed, 21 Oct 2020 12:12:48 -0700 (PDT) Received: by mail-il1-x141.google.com with SMTP id g7so3535631ilr.12 for ; Wed, 21 Oct 2020 12:12:48 -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=cicLxiZ2pJxeNcrsla6aQZQxECgsVNk7QwFVKAmvVic=; b=LtZOp7+bO31gS11qb7YgWyXytfCn3sfkOqfqT9tb7FTmqFPD+7SviB5IPlhX5CjdPp BIxzNvUjC0L6/rX7xcHpV7ibCg5x76DkD9A7AsJkC1akhMdNR0ueq7aVCXKdq70hn2ng 8RQenoz1r3sdh74gyWsGdJupJ3SLYl7e6LP8yjflXQ1simfX3k+QkIVBi7XRmMsvFKO3 RwV2DWFhZ743dn/27g99rhm2uge71DRd/eKDNavflidLQUETvRuGhHOb5/yDfuY9zedD /70afm/frJWXd2M5T8Qoq/AOgL1tSrIRE+kCAH+akg1xKshv/2yxsukItM+t17fXdp1C bwew== 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=cicLxiZ2pJxeNcrsla6aQZQxECgsVNk7QwFVKAmvVic=; b=ViofdtBdDrEMuq7UKkJHb6LSV6baA36NJzYIm8cnOCYkmBnnC+wMiceQZ8dWF24//T zTYZexDNbANwVpaNx+mxVpLqQEi0PijPRUwXG17ex6BFombfoSIKQC0/7qBVlW+iCYxm R3gv3EVrtja3a8i1NmVhrMPiurninqLkCse3BzImvC1+ueeXM8osM7V1qmnTow/vRNgU fXmkh8dFcy3722+JSXORznp+HnlGrgMuvm6RV9vY2dd0K36oYSfVlRLNJeng3as+almf c+gzsDm+xlRfhdYPjx36/2Puhs8By/WpS5dHyL1Tc2mO0q38rej8uUPbdd8V072qguNZ 37yg== X-Gm-Message-State: AOAM533sfED8PS0kvSJw3DjjOLjlJZ1043u4gFJhqYpfLnoT915NVWj3 h0pmz09jCPuGmnU3GGYSkKiobFcaVGAIPaSJ8GM= X-Received: by 2002:a92:de43:: with SMTP id e3mr3291056ilr.62.1603307567874; Wed, 21 Oct 2020 12:12:47 -0700 (PDT) MIME-Version: 1.0 References: <20201021150120.29920-1-yashsri421@gmail.com> <26647abf8cf14595a0dd22f10ec1c32e3dc2a8c0.camel@perches.com> <40ca3f0f9a960799ad0e534b77d778c90119e468.camel@perches.com> <0871715a-e605-91c0-ffa5-389a313ec34d@gmail.com> In-Reply-To: <0871715a-e605-91c0-ffa5-389a313ec34d@gmail.com> From: Lukas Bulwahn Date: Wed, 21 Oct 2020 21:12:32 +0200 Message-ID: Subject: Re: [PATCH] checkpatch: fix false positive for REPEATED_WORD warning To: Aditya Cc: Joe Perches , Linux Kernel Mailing List , linux-kernel-mentees@lists.linuxfoundation.org, Dwaipayan Ray Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 21, 2020 at 8:25 PM Aditya wrote: > > On 21/10/20 11:35 pm, Joe Perches wrote: > > On Wed, 2020-10-21 at 23:25 +0530, Aditya wrote: > >> Thanks for your feedback. I ran a manual check using this approach > >> over v5.6..v5.8. > >> The negatives occurring with this approach are for the word 'be' > >> (Frequency 5) and 'add'(Frequency 1). For eg. > >> > >> WARNING:REPEATED_WORD: Possible repeated word: 'be' > >> #278: FILE: drivers/net/ethernet/intel/ice/ice_flow.c:388: > >> + * @seg: index of packet segment whose raw fields are to be be extracted > >> > >> WARNING:REPEATED_WORD: Possible repeated word: 'add' > >> #21: > >> Let's also add add a note about using only the l3 access without l4 > >> > >> Apart from these, it works as expected. It also takes into account the > >> cases for multiple occurrences of hex, as you mentioned. For eg. > >> > >> WARNING:REPEATED_WORD: Possible repeated word: 'ffff' > >> #15: > > [] > >> I'll try to combine both methods and come up with a better approach. > > > > Enjoy, but please consider: > > > > If for over 30K patches, there are just a few false positives and > > a few false negatives, it likely doesn't need much improvement... > > > > checkpatch works on patch contexts. > > > > It's not intended to be perfect. > > > > It's just a little tool that can help avoid some common defects. > > > > > > Alright Sir. Then, we can proceed with the method you suggested, as it > is more or less perfect. > I'll re-send the patch with modified reduced warning figure. > Aditya, you can also choose to implement your solution; yes, it is more work for you but it also seems to function better in the long run. Clearly, Joe would settle for a simpler solution, but his TODO list of topics to engage in and work on is also much longer... Lukas