From patchwork Wed Nov 29 16:43:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 171499 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a5a7:0:b0:403:3b70:6f57 with SMTP id d7csp467211vqn; Wed, 29 Nov 2023 08:44:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IHcN977RtAq4aGWe5JduBt74I/P4Xpu/hXzPSik5vjVQh60pk17FRf8V3f8ovlXXDGb5W9D X-Received: by 2002:a05:6830:2095:b0:6d8:52e:fd42 with SMTP id y21-20020a056830209500b006d8052efd42mr17863103otq.2.1701276250449; Wed, 29 Nov 2023 08:44:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701276250; cv=none; d=google.com; s=arc-20160816; b=KNldhbsxQMH3vnIhyaDpae0Tt74ahnpm6JU+1TFufJ/7UgdfNv7OSR+/k44cvaYqfa du0XwFPzyjI08Y4ARYNCn6VVxIVhYXgjeMGWtjqFMq2bKb4dX3qbynBFf5/sJu4HvKQM /QIaCAOaZHXStAb3mes3JdhC8zpnocbfEmvsjCzqi47o4e+EO+ONGrZ7SUBLQfBUuXQS bOXuWXKY/bWOyMpXDe2WFdJmhTclnZKtcCVZDK9wH2gu/J6vbcW9vc0OVbtv1l7kAG/i bZFgpTW0OM9AhxJ9C6t4fvdMNj4GSpL8jh/5SwvuX5A0FPkqvtABg1IAHWyjIGJ+Tr/g YovQ== 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 :message-id:date:subject:cc:to:from; bh=WbKmjK5aYlNvI/2G0s2AcBaMpjvp1DkcAwiIdV5vRGY=; fh=CVs+7f5DE8tV5txeSynWkncxIQFMmePqInle31bmu2E=; b=TBoOAojwsS0AEEb7eIxKrgxhziHAwEf7UPI5e/hT1HLxVqAT4i1KwLbSzT1gC51hcm /TNJsNc8WEitNMmOE2X/Y+/s6/ItQ5NvsbDqMStHc56pDbB0kdUYqSZEAy6AYUBQSwM3 VkmAjseGozXJunToF7C8AYaL8mWg8iuTBQojtYuLYfNlt949IamCrBPs+5wo3Met6C2T McRmDOpFT83Dn4IFqfUCYxKUL//ruwucfyhJpLjkNeO5C5b7EfTV+MDr8H6oTLSSUh2Q jXveWK6PqhILLDrgEoMFDFhx8l5bTC/M66gYgCWr8I5t7kqPxUu2Io2nbv95taAMghEn O/Vw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id 23-20020a630c57000000b005bd03d4f2d7si14553181pgm.511.2023.11.29.08.44.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 08:44:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 442238094D6C; Wed, 29 Nov 2023 08:44:07 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231321AbjK2Qnt (ORCPT + 99 others); Wed, 29 Nov 2023 11:43:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229518AbjK2Qns (ORCPT ); Wed, 29 Nov 2023 11:43:48 -0500 Received: from mail-oo1-f46.google.com (mail-oo1-f46.google.com [209.85.161.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D2EAB0; Wed, 29 Nov 2023 08:43:55 -0800 (PST) Received: by mail-oo1-f46.google.com with SMTP id 006d021491bc7-58d9dcdf201so1621562eaf.2; Wed, 29 Nov 2023 08:43:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701276234; x=1701881034; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WbKmjK5aYlNvI/2G0s2AcBaMpjvp1DkcAwiIdV5vRGY=; b=aDHt3M/4JyN6qBsJFjkZX5UxNSSeYML3gxCzqx6TLHmkzNS+4ZRsX5Cjetp+dHXL2W qYh+wnSHpWlcbifSI/t9pTOXEsNhePA7v5mOzlv2kAYcvqJtHCsWxSkq038NdvulCAt9 dN9cceERh3T/8Ggu24EivLLczIdZhOeSWygFoJYNn8I7ujT1TE8JurhN17/KEmBM50S/ PTlsw2Wbx6VPIxxyWkbBW9GyKHIjKGoFVlqTnJ/OCfWDUUQLQVUpBjbqVr3UQcSTkQgQ YB9Ix3TLEJMRPrGJa8gKw2EFEJfeazZfMM5xnLTHDD96oi5rO3aNaMrdWjH0Gip6qjRv MUaA== X-Gm-Message-State: AOJu0YxcMAMJTkPIwixxc1rq6epWWWJolqrjlg2v2sIop0xuVnVIRoRs DL9JdHgH9s5eqH30czMleg== X-Received: by 2002:a05:6820:294:b0:58d:c250:cb1d with SMTP id q20-20020a056820029400b0058dc250cb1dmr3473695ood.2.1701276231495; Wed, 29 Nov 2023 08:43:51 -0800 (PST) Received: from herring.priv (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id cz9-20020a056820268900b00584078d1e17sm2309837oob.45.2023.11.29.08.43.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 08:43:50 -0800 (PST) Received: (nullmailer pid 2664302 invoked by uid 1000); Wed, 29 Nov 2023 16:43:48 -0000 From: Rob Herring To: Shawn Guo , "David S. Miller" , Miguel Ojeda , Wolfgang Grandegger , Marc Kleine-Budde , "Rafael J. Wysocki" , Daniel Lezcano , Frank Rowand Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] of: Stop circularly including of_device.h and of_platform.h Date: Wed, 29 Nov 2023 10:43:16 -0600 Message-ID: <20231129164316.2663565-1-robh@kernel.org> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 29 Nov 2023 08:44:07 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783917445635657599 X-GMAIL-MSGID: 1783917445635657599 The DT of_device.h and of_platform.h headers date back to the separate of_platform_bus_type before it was merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. The headers also include platform_device.h and of.h. The result was lots of drivers relied on these implicit includes. Now the entire tree has been fixed over the last couple of cycles to explicitly include the necessary headers instead of relying on of_device.h and/or of_platform.h implicit includes, so the implicit and circular includes can finally be removed. Signed-off-by: Rob Herring --- There are still a few dependencies which have not been applied. If you are on the To list, one of them applies to you: https://lore.kernel.org/all/20231122180140.1432025-1-robh@kernel.org/ https://lore.kernel.org/all/20231115210245.3744589-1-robh@kernel.org/ https://lore.kernel.org/all/20231115205828.3732207-1-robh@kernel.org/ https://lore.kernel.org/all/20231115210319.3747145-1-robh@kernel.org/ https://lore.kernel.org/all/20231115210258.3744896-1-robh@kernel.org/ --- include/linux/of_device.h | 5 +---- include/linux/of_platform.h | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/include/linux/of_device.h b/include/linux/of_device.h index 2c7a3d4bc775..b59165b28fd7 100644 --- a/include/linux/of_device.h +++ b/include/linux/of_device.h @@ -2,10 +2,7 @@ #ifndef _LINUX_OF_DEVICE_H #define _LINUX_OF_DEVICE_H -#include -#include /* temporary until merge */ - -#include +#include struct device; struct of_device_id; diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index fadfea575485..a2ff1ad48f7f 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h @@ -7,11 +7,11 @@ */ #include -#include -#include struct device; +struct device_node; struct of_device_id; +struct platform_device; /** * struct of_dev_auxdata - lookup table entry for device names & platform_data