Message ID | 20230714174021.4039807-1-robh@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp2659926vqm; Fri, 14 Jul 2023 10:48:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlHYMMclnZ6GjH6116Jff7+QVFpFzl4MeEQsqqapraSD6BP0ZtEY1O6AVKDj/P5SHMfAasLX X-Received: by 2002:a17:906:535e:b0:993:d616:7ca9 with SMTP id j30-20020a170906535e00b00993d6167ca9mr4945014ejo.23.1689356929644; Fri, 14 Jul 2023 10:48:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689356929; cv=none; d=google.com; s=arc-20160816; b=gZjtvrWwrdCXwYCz2gHBCPcU4gp+cO7phOn1hGqJkzTac/i8KtR3LsTLyGLehsyuJH EMjLbO9rxcOS5vZVRJB3gXDSPnZGhXybH/F1yDhpUwggq9FeQzcKluIWVwbluKBMcPea D1v/UPN+gIGpOOZt4yeU3j/8XgtW9VKjtuZ7wrxohI9BysY7xvbnBVcV7ljxmiwlQlqw ZIMPLDGr9oPXxhojgMsZd1yPFlF2eXp6ZgdBpPZrk/pIbvMHDk4HC4IdL6XMQobdKGs2 3dJSltdQ4N+8G2Bje6jeo/u/luoUrPw+VeKvbQFmQ67V5Jr5DddHarFgWZDu2vxyFO14 WANA== 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=Kb4dR+z+OTgQHnETYo6UxSYgXlKF4+KcDIOkEstmL88=; fh=eyDFZrN/VPdF+xWU1WWfM9eSV/0juzVTaATDqRkVgk0=; b=owZXSsBRNDpvSfZVx+Ls17PZEu4iLwD35+rx4r89ZWioqNFPlZENEMad/Azzfig6Wa UQHSoa4rn2MSFOqDYQaRlpwhdas9l03/fozxuCy0yK6n2kqatvyClab5GbYQkHvV5tMc fCAmzc7snUY6vQtCLU+jV3F4J6/ob8EDoAKL4FNm5/eP3ZpOZwEiZTH6sl5y8TNOpo6a WHOg+UjdYc8B3wYBH9dmXoCrUkWSqOuJh/Y3oQUN4Q8buDe9+m8ez31/Y6KkY7Kd5iTJ wYq1Fz+2Vv49u4i80C+y3kJctl6QSQwCFWbHD2r1Jeoxxg2RLJaNcZDkjEE2/jx4aqBF 2n8Q== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e16-20020a170906375000b0099263f8cdbbsi9452125ejc.175.2023.07.14.10.48.26; Fri, 14 Jul 2023 10:48:49 -0700 (PDT) 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236096AbjGNRkb (ORCPT <rfc822;hadasmailinglist@gmail.com> + 99 others); Fri, 14 Jul 2023 13:40:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235749AbjGNRk1 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 14 Jul 2023 13:40:27 -0400 Received: from mail-io1-f46.google.com (mail-io1-f46.google.com [209.85.166.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 655F03A84; Fri, 14 Jul 2023 10:40:26 -0700 (PDT) Received: by mail-io1-f46.google.com with SMTP id ca18e2360f4ac-7835e5fa459so85909739f.2; Fri, 14 Jul 2023 10:40:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689356425; x=1691948425; 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=Kb4dR+z+OTgQHnETYo6UxSYgXlKF4+KcDIOkEstmL88=; b=WWRgi3LgRp2uUy3NaxYM4yySlWTYlvGZbfYObAPl4igxHvgA/8Hji2vFaLyyVjFzIL 18U7/TvkstDzpxNJ+KUWP9xoF7Bym0+JOavkn4MV9QXYYb/0EEjk4AfUd3t1cbP0d/bT aEA+uDvfmy01/cUpBAnSGwKq5WhFDzAT5IqJdqmj8gx0KGtQ/pTKsRxCRBrvupPA4i2v nIo9fLozf/fJwHPWmhVnjofH0Q5CQCnBS2C1W6bxvNkc4Bin+TwmtFavN+piInf2K1UQ 2mBKi95JP4Dc5vf+dZLzl/3XFHxqUBjAQpBw6SHXgcyGXViX+8Rb5bwc25Jutzt/69o8 2eEg== X-Gm-Message-State: ABy/qLav7WPQE1QaLpBzKsJKqe4ajeEwvGvChctxJbcGQZLG72HE/31y gWJUtxEoAmpNfIbxbwa9C2TnbdUULA== X-Received: by 2002:a6b:3c03:0:b0:783:7275:9c47 with SMTP id k3-20020a6b3c03000000b0078372759c47mr4957903iob.7.1689356425225; Fri, 14 Jul 2023 10:40:25 -0700 (PDT) Received: from robh_at_kernel.org ([64.188.179.250]) by smtp.gmail.com with ESMTPSA id x11-20020a02ac8b000000b0042bb13cb80fsm2741577jan.120.2023.07.14.10.40.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jul 2023 10:40:24 -0700 (PDT) Received: (nullmailer pid 4039894 invoked by uid 1000); Fri, 14 Jul 2023 17:40:23 -0000 From: Rob Herring <robh@kernel.org> To: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org> Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] arm64: Explicitly include correct DT includes Date: Fri, 14 Jul 2023 11:40:20 -0600 Message-Id: <20230714174021.4039807-1-robh@kernel.org> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771419131995762792 X-GMAIL-MSGID: 1771419131995762792 |
Series |
arm64: Explicitly include correct DT includes
|
|
Commit Message
Rob Herring
July 14, 2023, 5:40 p.m. UTC
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.
Signed-off-by: Rob Herring <robh@kernel.org>
---
arch/arm64/kernel/cpuidle.c | 2 --
arch/arm64/kernel/pci.c | 2 --
2 files changed, 4 deletions(-)
Comments
On Fri, Jul 14, 2023 at 11:40:20AM -0600, Rob Herring wrote: > The DT of_device.h and of_platform.h date back to the separate > of_platform_bus_type before it as merged into the regular platform bus. > As part of that merge prepping Arm DT support 13 years ago, they > "temporarily" include each other. They also include platform_device.h > and of.h. As a result, there's a pretty much random mix of those include > files used throughout the tree. In order to detangle these headers and > replace the implicit includes with struct declarations, users need to > explicitly include the correct includes. > > Signed-off-by: Rob Herring <robh@kernel.org> > --- > arch/arm64/kernel/cpuidle.c | 2 -- > arch/arm64/kernel/pci.c | 2 -- > 2 files changed, 4 deletions(-) > > diff --git a/arch/arm64/kernel/cpuidle.c b/arch/arm64/kernel/cpuidle.c > index d1f68599c29f..f372295207fb 100644 > --- a/arch/arm64/kernel/cpuidle.c > +++ b/arch/arm64/kernel/cpuidle.c > @@ -9,8 +9,6 @@ > #include <linux/acpi.h> > #include <linux/cpuidle.h> > #include <linux/cpu_pm.h> > -#include <linux/of.h> > -#include <linux/of_device.h> > #include <linux/psci.h> I don't grok how dropping 'linux/of.h' follows from the commit message. Is it simply not needed by this file? Will
On Mon, Jul 17, 2023 at 3:06 AM Will Deacon <will@kernel.org> wrote: > > On Fri, Jul 14, 2023 at 11:40:20AM -0600, Rob Herring wrote: > > The DT of_device.h and of_platform.h date back to the separate > > of_platform_bus_type before it as merged into the regular platform bus. > > As part of that merge prepping Arm DT support 13 years ago, they > > "temporarily" include each other. They also include platform_device.h > > and of.h. As a result, there's a pretty much random mix of those include > > files used throughout the tree. In order to detangle these headers and > > replace the implicit includes with struct declarations, users need to > > explicitly include the correct includes. > > > > Signed-off-by: Rob Herring <robh@kernel.org> > > --- > > arch/arm64/kernel/cpuidle.c | 2 -- > > arch/arm64/kernel/pci.c | 2 -- > > 2 files changed, 4 deletions(-) > > > > diff --git a/arch/arm64/kernel/cpuidle.c b/arch/arm64/kernel/cpuidle.c > > index d1f68599c29f..f372295207fb 100644 > > --- a/arch/arm64/kernel/cpuidle.c > > +++ b/arch/arm64/kernel/cpuidle.c > > @@ -9,8 +9,6 @@ > > #include <linux/acpi.h> > > #include <linux/cpuidle.h> > > #include <linux/cpu_pm.h> > > -#include <linux/of.h> > > -#include <linux/of_device.h> > > #include <linux/psci.h> > > I don't grok how dropping 'linux/of.h' follows from the commit message. > Is it simply not needed by this file? The motivation is to disentangle of_device.h includes. The fix is making sure the explicit DT includes match what is used. The result varies and here none of the DT headers are needed. Rob
On Fri, 14 Jul 2023 11:40:20 -0600, Rob Herring wrote: > The DT of_device.h and of_platform.h date back to the separate > of_platform_bus_type before it as merged into the regular platform bus. > As part of that merge prepping Arm DT support 13 years ago, they > "temporarily" include each other. They also include platform_device.h > and of.h. As a result, there's a pretty much random mix of those include > files used throughout the tree. In order to detangle these headers and > replace the implicit includes with struct declarations, users need to > explicitly include the correct includes. > > [...] Applied to arm64 (for-next/misc), thanks! [1/1] arm64: Explicitly include correct DT includes https://git.kernel.org/arm64/c/b9d601249740 Cheers,
diff --git a/arch/arm64/kernel/cpuidle.c b/arch/arm64/kernel/cpuidle.c index d1f68599c29f..f372295207fb 100644 --- a/arch/arm64/kernel/cpuidle.c +++ b/arch/arm64/kernel/cpuidle.c @@ -9,8 +9,6 @@ #include <linux/acpi.h> #include <linux/cpuidle.h> #include <linux/cpu_pm.h> -#include <linux/of.h> -#include <linux/of_device.h> #include <linux/psci.h> #ifdef CONFIG_ACPI_PROCESSOR_IDLE diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c index 2276689b5411..f872c57e9909 100644 --- a/arch/arm64/kernel/pci.c +++ b/arch/arm64/kernel/pci.c @@ -11,8 +11,6 @@ #include <linux/io.h> #include <linux/kernel.h> #include <linux/mm.h> -#include <linux/of_pci.h> -#include <linux/of_platform.h> #include <linux/pci.h> #include <linux/pci-acpi.h> #include <linux/pci-ecam.h>