From patchwork Mon Feb 24 23:58:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 183798 Delivered-To: patches@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp1001169ile; Mon, 24 Feb 2020 15:58:31 -0800 (PST) X-Received: by 2002:a63:82c6:: with SMTP id w189mr35914966pgd.357.1582588711669; Mon, 24 Feb 2020 15:58:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582588711; cv=none; d=google.com; s=arc-20160816; b=jKg2BcKP9NRbjeuoiqabNi9T4mW2efss5D2JYo5DC9Jo4qzYgwcQ4TyUERW/ugB/cX lJUblgdF9rNcVIQytfpWXfarlCbeHpXaCXSeJU3FoNPQx998PlqA3zBWY3XpRpnTi/7B hGCOsrwYGwOW/+1XiODouRTbStAjPPsGJEYgOcJcTFe3tPTI947cN4UHXxmjI5XHA6te Oz51Vtrt288Pe84guTv6Iaemcl2COw/QO7oYnn9PIEQHHTLeJ9L9+Ma1sr7AR1KvFm7g 3yUvHa0B15XUhqtZ1H2lTNCYVGP6iAHf9KUz7FmdTuZwVXl8+sHlLRPSCu6SJWtS44Pj lzRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature; bh=6t8fAStxyMBpqFhnRnERlhVNkOeAX250LE3Yg/qJtM8=; b=rPwG1vj2OX6u8itbvu3ZbX/Mn9n5WnwOnGhbviGoLeE3GHM34TaisY74h4465//UZK /97syPuy6i0KyUWNgYGcueXPyMPwgEzWDdBlXpIz0TlVaoADeC2YeFiti1R2s++mwR4p GuUfB81nSTkOLSyYB6cXF0cN37OTmQpmgNQwb0ob/BbaZElWbPmiddwYmqJwzChgb6lZ YnFvSkVsb6l6CR4BSHRXmOePSS8gURhep6wJ1y4NE1lcN3m92xXbxD5xUlrkzQvD1p2v dtgp8J5BXul2PkrFsAG8EqVVnU2n/+LqrGlXCUzS7FD//wsyVzuTBE5HyUGbYnnbZ4DD GYcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=o39UkheK; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id h3sor1079520pjs.13.2020.02.24.15.58.31 for (Google Transport Security); Mon, 24 Feb 2020 15:58:31 -0800 (PST) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=o39UkheK; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=6t8fAStxyMBpqFhnRnERlhVNkOeAX250LE3Yg/qJtM8=; b=o39UkheKhEstLndzZrMbL+uItsNfKE3pcAHUUmxaDwxXiEUgy5omwFZz8TyaVSnu9U aovk8jgepOxixvkDRIp8E/K7ucmeYnK8npXg6riGqFT06hHFpf9/O9afTGUPVIiZlTkH IfmYYyfv+8/u9gpTHXxm+iGvXMO6RnLZAL7UNIwFZT0U5Lz2iQki3Bg2+aiMS1/ZsgT2 FLUeJFA/dUMDPvFkoGSTvfC7WOcxI4SUILbd+plkMJaRWWoq6Kywx0soolVBMDth88C0 GgKSBEjRWmzxBwpM18lifmRFPXn4qPPAT88Ss/rzFjE/kd1i4YXpn8YdGVyQUUVv+WSn rSUQ== 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; bh=6t8fAStxyMBpqFhnRnERlhVNkOeAX250LE3Yg/qJtM8=; b=dNnU5TLIr6EBI6p1JZWAmhVCTbggT42dQdYbExAdgujH8mr7skHEZ9IcVmUoCa5kaN PQimw1ZwCknmPHcExa7ln0PUP/syE09aC2aqpOgBbLIYgnEE3m65g+rfmaDEsO0J6+F1 +ojWlfkiD9AS3RxYq22WKCZtgUm0aFFYxTaqlVQbINhGdIWN/1imPnHEAM0hjLMA2M5M fX3Jvcg3cfDNt6TVr2BXdTthaEfxM1SRlJFZDGUFmEcr5Ho9YVLra6fIarPTatJD9/US 9nNjUtzjI5ybZiKkBcsjakgvl2SB41/k8LiCZdBoLCXMc+DzCcvFY7tijvW9ICGpTdpD AnOA== X-Gm-Message-State: APjAAAU9xpsKx/MI+GRPaHR9CoMkWnb2BdQONTqF+NCJyoxTJ9B6kveC oxbAgEAteFWDTuqgReoIrRFyFnaQ X-Google-Smtp-Source: APXvYqxgK51lews+aPtRw5PC8+zgnvRIKVb/FG9m/YAhAkl3B9LTwpPt3W1OfC4eiv8dEXuA5NZm6w== X-Received: by 2002:a17:90a:9285:: with SMTP id n5mr1945580pjo.58.1582588711134; Mon, 24 Feb 2020 15:58:31 -0800 (PST) Return-Path: Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id y1sm14000747pgi.56.2020.02.24.15.58.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Feb 2020 15:58:30 -0800 (PST) From: John Stultz To: lkml Cc: John Stultz , Andy Whitcroft , Joe Perches Subject: [RFC][PATCH] checkpatch: Properly warn if Change-Id comes after first Signed-off-by line Date: Mon, 24 Feb 2020 23:58:24 +0000 Message-Id: <20200224235824.126361-1-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 Quite often, the Change-Id may be between Signed-off-by: lines or at the end of them. Unfortunately checkpatch won't catch these cases as it disables in_commit_log when it catches the first Signed-off-by line. This has bitten me many many times. I suspect this patch will break other use cases, so it probably shouldn't be merged, but I wanted to share it just to help illustrate the problem. Cc: Andy Whitcroft Cc: Joe Perches Signed-off-by: John Stultz --- scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index a63380c6b0d2..a55340a9e3ea 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2609,7 +2609,8 @@ sub process { # Check the patch for a signoff: if ($line =~ /^\s*signed-off-by:/i) { $signoff++; - $in_commit_log = 0; + #Disabling in_commit_log here breaks Change-Id checking in some cases + #$in_commit_log = 0; if ($author ne '') { my $l = $line; $l =~ s/"//g;