Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1133385rwb; Thu, 15 Dec 2022 06:50:43 -0800 (PST) X-Google-Smtp-Source: AA0mqf5/fOYazn8CYIoqmVleu8AtwCdtNgOjk4bFt7u36LqfRouRb8hr2Lh1ciSCIufRyQBm2ADy X-Received: by 2002:a17:902:8688:b0:189:89e0:4077 with SMTP id g8-20020a170902868800b0018989e04077mr29214894plo.55.1671115843272; Thu, 15 Dec 2022 06:50:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671115843; cv=none; d=google.com; s=arc-20160816; b=tLhQu75hE8ROA6JWv+Fq9AARu/GpQ/1Qt7EY00A+OjUTDDnUAUPFDpj41G1mXKFQPs gwLgdyvJQllT3IPxt9TQXnTqMNoHmpVpWKfjHnwWuDr4YGl7n61P1PR6wGwfBGzD+BU9 Xccu8Uv1aWDEAS1r17aqdeQDhZSfWly9IIqrgI8TJ4S6xKjAKHnEDjZOeoz5AGHWoazf 8Ggu7MiVBWhrd9faQ9YnYrND6pRn0Th4j3uPTAUKYQcjdH3kyFksA35d/oAwJcga8jEZ 5MbzcAugdwyAvaj7lmHybwsoXogewfHWlrc9F1a3C9/INQ2ybMptnrvNF+Is0+HPU+Gd W+dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=pAP3k7fy0hsh2eL2nZKS/DcmDYvs3MKhtj74reePPBo=; b=q9Wl6Bpj3RzKVNyaZDMVyWWmAWTFerNGupH8lFJv1vGeYQ0iGA37oXTbQNwEUDki0G GWyGKynoT+Qem8LffTfUnT3wSUBDtEFIY5HdAzfJyX/VKghWw9FQ1ygdz4em7Eq5R2kK uwZizwGu8l2mSMYU8y4u492+TPfdpsYUkqdwHXRsLQ/FBAYAq1RUa8Mfnb2ffbSZOeo+ PfKgj66Taht+97yC4q/MZUon+c6oq81CMg5jQjWGk5p2Jgkt9hKXpaviFRtciZzO976y +0wHuAsyCnKrbTLp93/vE9wDP/ef7kKfWxv+cwQzPkghqmfzo4OqJQ4JjD9QTyIPyf4a fu1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jg12-20020a17090326cc00b0017dcda20fefsi5602477plb.232.2022.12.15.06.50.34; Thu, 15 Dec 2022 06:50:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230030AbiLOOnm (ORCPT + 68 others); Thu, 15 Dec 2022 09:43:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229865AbiLOOni (ORCPT ); Thu, 15 Dec 2022 09:43:38 -0500 Received: from blackmesa.kw-serverwartung.de (blackmesa.kw-serverwartung.de [78.46.90.79]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4D182F020 for ; Thu, 15 Dec 2022 06:43:36 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by blackmesa.kw-serverwartung.de (Postfix) with ESMTP id A34F97B80EA; Thu, 15 Dec 2022 14:43:35 +0000 (UTC) Received: from blackmesa.kw-serverwartung.de ([127.0.0.1]) by localhost (blackmesa.kw-serverwartung.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ksv2ZMC1t23A; Thu, 15 Dec 2022 14:43:33 +0000 (UTC) Received: from citadel.fritz.box (i59F4DEB3.versanet.de [89.244.222.179]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by blackmesa.kw-serverwartung.de (Postfix) with ESMTPSA id 534267B81E1; Thu, 15 Dec 2022 14:43:31 +0000 (UTC) From: =?UTF-8?q?Kai=20Wasserb=C3=A4ch?= To: linux-kernel@vger.kernel.org Cc: Thorsten Leemhuis , Andrew Morton , Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn Subject: [PATCH 3/3] checkpatch: use proper way for show problematic line Date: Thu, 15 Dec 2022 15:43:26 +0100 Message-Id: X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thorsten Leemhuis Instead of using an unnecessarily complicated approach to print a line that is warned about, use `$herecurr` instead, just like everywhere else in checkpatch. While at it, remove a superfluous space in one of the changed lines, too. Both problems were found by Joe Perches. Signed-off-by: Thorsten Leemhuis Signed-off-by: Kai Wasserbäch --- scripts/checkpatch.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 9434f94d2d..f7ebbdf4f0 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3142,17 +3142,17 @@ sub process { if ($sign_off =~ /^co-developed-by:$/i) { if ($email eq $author) { WARN("BAD_SIGN_OFF", - "Co-developed-by: should not be used to attribute nominal patch author '$author'\n" . "$here\n" . $rawline); + "Co-developed-by: should not be used to attribute nominal patch author '$author'\n" . $herecurr); } if (!defined $lines[$linenr]) { WARN("BAD_SIGN_OFF", - "Co-developed-by: must be immediately followed by Signed-off-by:\n" . "$here\n" . $rawline); + "Co-developed-by: must be immediately followed by Signed-off-by:\n" . $herecurr); } elsif ($rawlines[$linenr] !~ /^\s*signed-off-by:\s*(.*)/i) { WARN("BAD_SIGN_OFF", - "Co-developed-by: must be immediately followed by Signed-off-by:\n" . "$here\n" . $rawline . "\n" .$rawlines[$linenr]); + "Co-developed-by: must be immediately followed by Signed-off-by:\n" . $herecurr . $rawlines[$linenr] . "\n"); } elsif ($1 ne $email) { WARN("BAD_SIGN_OFF", - "Co-developed-by and Signed-off-by: name/email do not match \n" . "$here\n" . $rawline . "\n" .$rawlines[$linenr]); + "Co-developed-by and Signed-off-by: name/email do not match\n" . $herecurr . $rawlines[$linenr] . "\n"); } } -- 2.35.1