Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4996286yba; Wed, 8 May 2019 06:23:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqx/yM1oX7ujFdbID19ffiWZopIfMDeQWfEHvQiJapuw/+STfvvKVmv0alfinMNOpo+e9GUF X-Received: by 2002:a62:2a55:: with SMTP id q82mr46110062pfq.90.1557321814089; Wed, 08 May 2019 06:23:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557321814; cv=none; d=google.com; s=arc-20160816; b=Lk5f4VsllJDRwi0w2RmajCRDdWW5u2jUQ9GUGBcy9uliIlk6YxwxwqpBGDk5lUYJon sc9seh+C6uvWtsq+vdsGkGyDfydl5NhEZkNU4iudyL4W/WpM2FA68TVnV1N6JbuWFQuf 1o9FO9LyG4nTQff1MQNqwkwUR5YH0o0dowtci3oGF61BwGM2avpzAXYCKDpxlMsVZDyZ 6kiHX13dsFDIubzxPUl/ETVqRqqta90rCP1a1XRJPdEFnGYdutRG72aSzGa1JWUd1buQ whd//K092gUePh03caiGOQJiQnH14xVXAjf0IXN28VXow72J8I/NO6n8zGVkU/oTOrVN p50g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VsFu/Mm6Udal+8o4/TOk1rUCznPeeCBmK6DAhapLdzw=; b=G2lNY+v9XnxGN0U6MAbrSW75QQLgvRfm0F5vdOBknm28X2Y6hFRL6Xk4o30//UTu1k WwnaOHNFCSdAWqzbmkZ9FxiMbSjRfJICQ5votQrsDSSoBl6vHycxOaJzAKpQ95GqNVAj TEgHfumjDa+gb8mx7M7Fh7fo3uh2etUfATrjd1wasU1T8dp3ogrX9RMsFZG73gwk3vS5 286DipSfy07BnxOqSZlourdGUHIgRZeTtfCCBZB7SJVXen5t/W12elPoysF7HKVu5k9k I9O6FTVDFMd3vju2oO+b7+XO00pDRfcFL0WnlVKYroQjBsUeCHACDUkA1Gh0C8MBw0UC e9CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MLhhUeCS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id e11si24297854plb.249.2019.05.08.06.23.17; Wed, 08 May 2019 06:23:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MLhhUeCS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728550AbfEHM1j (ORCPT + 99 others); Wed, 8 May 2019 08:27:39 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:40746 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728493AbfEHM1h (ORCPT ); Wed, 8 May 2019 08:27:37 -0400 Received: by mail-wr1-f67.google.com with SMTP id h4so7700898wre.7 for ; Wed, 08 May 2019 05:27:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VsFu/Mm6Udal+8o4/TOk1rUCznPeeCBmK6DAhapLdzw=; b=MLhhUeCSVNu68m0NzceQB4PRNKhghF221rjGgfftcCufUwDZ7+sOCcwB+elcxHhui/ Ve10CoV4GZxpn1gTDLuVAxYOp90IIBTpr0solK4Qsk5zsmxRevhON+CzyHkWRlj701md Qq2d5kJz/Ik3pn8Si9mvcg2jNyKMAmomjn9Djy5cpTWJtNF7R9TTctQ5NWcUJpK4wYX4 WW02p7VcuYmmtKnycb1CHf4nCtN55gLYAmcC2Y0NzRk1TxTbcJIYllSS0ZnAnOGesZR9 CFo/erkNd8DorZvEfT7p+0NfIHdxdKbrhvUcIHijc/ZsA736l15yYnC8kYeKM8KvKouL AZPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VsFu/Mm6Udal+8o4/TOk1rUCznPeeCBmK6DAhapLdzw=; b=jwGVQS4cqArx9hFZ1TFNBZ1lwQLaAPcL9TmeVjQZDkjIPYD/OJqIvUC04DtqAtUN+C MMT46Et6SxgLxkgn14Zf4A8WS7LcEG9Oalf8TJS7S/+KP6EGuwLt6EnhoHk/yKCp4ebH SxXbWdKI0+hM9czxRFwwxXkXD3V7+WrmGzp+51VhVQ2UjUt5I5CDzB5uqUI32P8iAJpk 3Lo2rot+zjvBJvOyNthWRZAXAbmEbsW88o4vMz871xlY8DW6nJ/xRCOpnP9HhlUJ9C5C WTGXoEOrN2jYRqE4l60mYEUlsb7BvNy92MTGg07q6KOgDf2c8chuqFWBcTs3G3Je01pW NYrQ== X-Gm-Message-State: APjAAAWVDCw3FmrYWPG1vaLNxGN/zIh2fFSNsjhTUOvAmj2lr+EYaafD KymCFpTP58KUwqiHdlmJOic= X-Received: by 2002:a5d:6b46:: with SMTP id x6mr25817105wrw.313.1557318455658; Wed, 08 May 2019 05:27:35 -0700 (PDT) Received: from localhost.localdomain ([2a01:e34:edb8:72e0:1074:1d8f:2a88:25e6]) by smtp.gmail.com with ESMTPSA id s124sm3217737wmf.42.2019.05.08.05.27.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 May 2019 05:27:34 -0700 (PDT) From: Antonio Borneo To: Joe Perches , Andy Whitcroft Cc: linux-kernel@vger.kernel.org Subject: [PATCH 2/4] checkpatch: add --fix for warning LINE_CONTINUATIONS Date: Wed, 8 May 2019 14:27:19 +0200 Message-Id: <20190508122721.7513-2-borneo.antonio@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190508122721.7513-1-borneo.antonio@gmail.com> References: <20190508122721.7513-1-borneo.antonio@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The warning LINE_CONTINUATIONS does not offer a --fix. Add the trivial --fix. In case of consecutive lines with the same issue, this will fix only the first line. Signed-off-by: Antonio Borneo --- scripts/checkpatch.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index f40d4bb2fbb9..9a247183b65c 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -5207,8 +5207,11 @@ sub process { $line !~ /^\+\s*\#.*\\$/ && # preprocessor $line !~ /^\+.*\b(__asm__|asm)\b.*\\$/ && # asm $line =~ /^\+.*\\$/) { - WARN("LINE_CONTINUATIONS", - "Avoid unnecessary line continuations\n" . $herecurr); + if (WARN("LINE_CONTINUATIONS", + "Avoid unnecessary line continuations\n" . $herecurr) && + $fix) { + $fixed[$fixlinenr] =~ s/\s*\\$//; + } } } -- 2.21.0