From patchwork Thu Aug 9 20:50:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 143880 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2544744ljj; Thu, 9 Aug 2018 13:50:37 -0700 (PDT) X-Google-Smtp-Source: AA+uWPytNAwjOZLjCK1Lj8/n0bHOVH6qc15ZZ2ulC4JxlRi/7ef54+rKEV38vI09ehycDxq+Os2z X-Received: by 2002:a17:902:1001:: with SMTP id b1-v6mr3361194pla.155.1533847837102; Thu, 09 Aug 2018 13:50:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533847837; cv=none; d=google.com; s=arc-20160816; b=XxmbCCS5WRiUnCpn6F3QcXj1jamUzFXm1oaGfclftpsFxk9AokETe0brG/IW4mKv78 D8fiK/Uy9Ye7d4oJBHgMDgSQf4ECJqaj/fhWNqZe2dk5Rwy2mrl39j+feE7g5vl/3r03 4NCItZNwvj1RBic0bUFVdaCMt5s5bUjb4Z4P7rqzuS72Paaom+yMio+9YTwwZdLLDQub qG+XpughAtzahsghVE6eEGs4y1NYqAcjWDXL3hdA4m9HFnXJKmTGa+FR0/uJg0mkz0EW vtDW+76v9QZzwWELmb0X5L8sMAQ47ogOXIrI/ls4xBiBgsut10Ovx4bNL1R0ynMApWR6 xO6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=kl4g/fu6WNL5teFrR4Ny26N/hx6O3ysJPMLOjof6RI4=; b=ippr/c/SCX5WeB9gJlnhtiV0qBt0AJm9AHVSYANu/U2dgecXd5jJ6okNH4PFuBu4gN zjXG66ACj9oJoGBD+t74V7+jX8aJsKA5394bsXyrT8nckesaHnJ6yv2liFy4i8rEFwNS 9Ou5sKpxsuw5f77S73LMIznvZlk+FN0bsqV/2Xwk1RFkbmxZBh7HrvAV/JutNEm0M+43 N5+XVgn4V+vjzxmhXmKJOl5X61+BUYiEx0tz+QLupI4kJg5EN/JLrjHoLuSwKMW9vEVt eBXWqEwSiZvKoqIkU4LFUoTYC9AG4SEStqbVpQwTrjKHOqTKItGGOh10dCTnnl3FpJCk 4iGw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q90-v6si8482183pfa.272.2018.08.09.13.50.36; Thu, 09 Aug 2018 13:50:37 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727225AbeHIXRH (ORCPT + 31 others); Thu, 9 Aug 2018 19:17:07 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:36668 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726744AbeHIXRH (ORCPT ); Thu, 9 Aug 2018 19:17:07 -0400 Received: by mail-it0-f65.google.com with SMTP id p81-v6so2294479itp.1 for ; Thu, 09 Aug 2018 13:50:34 -0700 (PDT) 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=kl4g/fu6WNL5teFrR4Ny26N/hx6O3ysJPMLOjof6RI4=; b=PmZbeI3rk3yLpUXInPolEPV3oP9ZZgCS2qijfXPJv7meCuzh4fUi/zOVLUNu3xIp4p ePue8OwhCTaukHfp+fW778w4PBujsMBbtcph+lYcKMQZs6jHWy+ASOM9zanFatSsM8Gg 0DvYd0gk4Gix4s+3jyuKQChZpLs3iq0KiRqkcak4mbPiLHVznhvMU3Dxb+rQOAQmvO38 jY95ZM5+jwStumEQP1OKv25yBIv8i3Iab/X4BYO4Nx9sianpL0L72ykab51MQYjmsCP1 AEl2ay43G+qGHjItTCRBb2IDO8e/PHHR2IAmRvDMqy+J1k8qkhxsZXiXl5WsM2txTHz2 q2yg== X-Gm-Message-State: AOUpUlHE+/05XHHWqj4UzUUtpWFU2KKDGor2cZ+lHqrapvQhN56dgfUx Lku1fGktEYwtXX49MkW7Rw== X-Received: by 2002:a02:9d38:: with SMTP id n53-v6mr3362178jak.39.1533847833962; Thu, 09 Aug 2018 13:50:33 -0700 (PDT) Received: from localhost.localdomain ([24.51.61.72]) by smtp.googlemail.com with ESMTPSA id w193-v6sm250057ita.11.2018.08.09.13.50.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Aug 2018 13:50:33 -0700 (PDT) From: Rob Herring To: Joe Perches Cc: linux-kernel@vger.kernel.org, Andrew Morton , Andy Whitcroft Subject: [PATCH] checkpatch: DT bindings should be a separate patch Date: Thu, 9 Aug 2018 14:50:32 -0600 Message-Id: <20180809205032.22205-1-robh@kernel.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Devicetree bindings should be their own patch as documented in Documentation/devicetree/bindings/submitting-patches.txt section I.1. This is because bindings are logically independent from a driver implementation, they have a different maintainer (even though they often are applied via the same tree), and it makes for a cleaner history in the DT only tree created with git-filter-branch. Cc: Andy Whitcroft Cc: Joe Perches Signed-off-by: Rob Herring --- scripts/checkpatch.pl | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) -- 2.17.1 diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index a9c05506e325..20547c109ccd 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2236,6 +2236,7 @@ sub process { our $clean = 1; my $signoff = 0; my $is_patch = 0; + my $is_binding_patch = -1; my $in_header_lines = $file ? 0 : 1; my $in_commit_log = 0; #Scanning lines before patch my $has_commit_log = 0; #Encountered lines before patch @@ -2485,6 +2486,27 @@ sub process { $check = $check_orig; } $checklicenseline = 1; + + if ($realfile !~ /MAINTAINERS/) { + my $mixed = 0; + if ($realfile =~ /(Documentation\/devicetree|include\/dt-bindings).*/) { + if ($is_binding_patch == 0) { + $mixed = 1; + } + $is_binding_patch = 1; + } else { + if ($is_binding_patch == 1) { + $mixed = 1; + } + $is_binding_patch = 0; + } + + if ($mixed == 1) { + WARN("DT_SPLIT_BINDING_PATCH", + "DT binding docs and includes should be a separate patch\n"); + } + } + next; }