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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 07759C4361B for ; Wed, 16 Dec 2020 17:10:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BA165233FE for ; Wed, 16 Dec 2020 17:10:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727047AbgLPRKc (ORCPT ); Wed, 16 Dec 2020 12:10:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:60314 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727032AbgLPRKc (ORCPT ); Wed, 16 Dec 2020 12:10:32 -0500 Date: Wed, 16 Dec 2020 09:10:16 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1608138616; bh=ACQExjRk5rMVu6gLCm/cGpV7c9kknYFGTN+aZ6qKPeE=; h=From:To:Subject:From; b=jmQECqB3s2pzY+XeQrgw6k7mZg+dH5MOaGEKM9ZN9IZNowQL8WWgyyDR9KEitsQUj 6d1sD8grwQTl15R/IL+Gw0V67ywAf0hh4zUxcWctNcvhWiWh9hognaVfPRtNykmLnG oNMVKke3SQlWPfcCblcbhXLkHL5tb+OYRcPvf09M= From: akpm@linux-foundation.org To: joe@perches.com, mm-commits@vger.kernel.org, yashsri421@gmail.com Subject: [merged] checkpatch-add-fix-option-for-assignment_continuations.patch removed from -mm tree Message-ID: <20201216171016.b2DE7Slgw%akpm@linux-foundation.org> User-Agent: s-nail v14.8.16 Precedence: bulk Reply-To: linux-kernel@vger.kernel.org List-ID: X-Mailing-List: mm-commits@vger.kernel.org The patch titled Subject: checkpatch: add fix option for ASSIGNMENT_CONTINUATIONS has been removed from the -mm tree. Its filename was checkpatch-add-fix-option-for-assignment_continuations.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Aditya Srivastava Subject: checkpatch: add fix option for ASSIGNMENT_CONTINUATIONS Currently, checkpatch warns us if an assignment operator is placed at the start of a line and not at the end of previous line. E.g., running checkpatch on commit 8195b1396ec8 ("hv_netvsc: fix deadlock on hotplug") reports: CHECK: Assignment operator '=' should be on the previous line + struct netvsc_device *nvdev + = container_of(w, struct netvsc_device, subchan_work); Provide a simple fix by appending assignment operator to the previous line and removing from the current line, if both the lines are additions (ie start with '+') Link: https://lkml.kernel.org/r/20201121120407.22942-1-yashsri421@gmail.com Signed-off-by: Aditya Srivastava Acked-by: Joe Perches Signed-off-by: Andrew Morton --- scripts/checkpatch.pl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) --- a/scripts/checkpatch.pl~checkpatch-add-fix-option-for-assignment_continuations +++ a/scripts/checkpatch.pl @@ -3533,8 +3533,14 @@ sub process { # check for assignments on the start of a line if ($sline =~ /^\+\s+($Assignment)[^=]/) { - CHK("ASSIGNMENT_CONTINUATIONS", - "Assignment operator '$1' should be on the previous line\n" . $hereprev); + my $operator = $1; + if (CHK("ASSIGNMENT_CONTINUATIONS", + "Assignment operator '$1' should be on the previous line\n" . $hereprev) && + $fix && $prevrawline =~ /^\+/) { + # add assignment operator to the previous line, remove from current line + $fixed[$fixlinenr - 1] .= " $operator"; + $fixed[$fixlinenr] =~ s/\Q$operator\E\s*//; + } } # check for && or || at the start of a line _ Patches currently in -mm which might be from yashsri421@gmail.com are