From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85876C4363A for ; Wed, 21 Oct 2020 21:43:23 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BDE5F223C7 for ; Wed, 21 Oct 2020 21:43:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BDE5F223C7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=perches.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-kernel-mentees-bounces@lists.linuxfoundation.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1CB1187657; Wed, 21 Oct 2020 21:43:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xcYnFWgdizk1; Wed, 21 Oct 2020 21:43:21 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 56612874E2; Wed, 21 Oct 2020 21:43:21 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 43A74C088B; Wed, 21 Oct 2020 21:43:21 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 087E5C0051 for ; Wed, 21 Oct 2020 21:43:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id EB3D887446 for ; Wed, 21 Oct 2020 21:43:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XNEzUbdS5BaO for ; Wed, 21 Oct 2020 21:43:19 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtprelay.hostedemail.com (smtprelay0131.hostedemail.com [216.40.44.131]) by hemlock.osuosl.org (Postfix) with ESMTPS id 238A38743C for ; Wed, 21 Oct 2020 21:43:19 +0000 (UTC) Received: from smtprelay.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by smtpgrave07.hostedemail.com (Postfix) with ESMTP id A59C4180238D6 for ; Wed, 21 Oct 2020 18:05:27 +0000 (UTC) Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay07.hostedemail.com (Postfix) with ESMTP id 49EE8181D330D; Wed, 21 Oct 2020 18:05:25 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: power34_130717c2724a X-Filterd-Recvd-Size: 2295 Received: from XPS-9350.home (unknown [47.151.133.149]) (Authenticated sender: joe@perches.com) by omf08.hostedemail.com (Postfix) with ESMTPA; Wed, 21 Oct 2020 18:05:24 +0000 (UTC) Message-ID: From: Joe Perches To: Aditya Date: Wed, 21 Oct 2020 11:05:22 -0700 In-Reply-To: References: <20201021150120.29920-1-yashsri421@gmail.com> <26647abf8cf14595a0dd22f10ec1c32e3dc2a8c0.camel@perches.com> <40ca3f0f9a960799ad0e534b77d778c90119e468.camel@perches.com> User-Agent: Evolution 3.36.4-0ubuntu1 MIME-Version: 1.0 Cc: linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel@vger.kernel.org, dwaipayanray1@gmail.com Subject: Re: [Linux-kernel-mentees] [PATCH] checkpatch: fix false positive for REPEATED_WORD warning X-BeenThere: linux-kernel-mentees@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-kernel-mentees-bounces@lists.linuxfoundation.org Sender: "Linux-kernel-mentees" 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. _______________________________________________ Linux-kernel-mentees mailing list Linux-kernel-mentees@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees