Message ID | 20230714174909.4062739-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 c18csp2670253vqm; Fri, 14 Jul 2023 11:07:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlHRDUXgyjLFHBdApD4r7P4iuGvvsHi4SNk91hN5G50tJkTsc38w4YZtZ/AE89i8qa2jxZG2 X-Received: by 2002:a05:6a20:517:b0:133:1b4e:1087 with SMTP id 23-20020a056a20051700b001331b4e1087mr3634240pzp.29.1689358061138; Fri, 14 Jul 2023 11:07:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689358061; cv=none; d=google.com; s=arc-20160816; b=vlNfoochdC1tDr4NgL5gi3ENnv9ZiRLP5ynglsS7S6XJMBpHHG63787sbRCiuumo0P 2iUBSZuRDrZYXqaZvClsiHbsNs2faSIqyYuIlR/o5PVUQDED0Rh5LAEiI/0taq5tKCy0 Eh2wZ+LN4QA3pNNOyCiPOaFw+6ThbzeEFyILgMaKex3hGkZLjsDupaAqpEX7onH5tddo B9n5gPiX5ZgkqiQplHdH2cVA9BccecfkwPf816Qe5SbJN4A+LPSEko63Eg2pRylLkmMq TcLJbzMzAl5BVjA/1p61F9Kw3LJvG3zSkO1iXIlHGP/y1SdreCCdFL/sbhJuCOcxbiB3 /cNg== 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=9Zl9ZOznQn0z/OyvCDvuTYi3+h4lEQZHsyG8cOFSOc4=; fh=gb3yB8aMLsF6TmpYq+mzFAPOjdMKhEmxHu6ZKlrjjqc=; b=xRKQbvC9vkypMmOhJqogQ2zytKprvSmfvUR/iqx86qQx8xCbfqZtCcWWR/ND7T/hq+ M0/PMa/SO4+BghHlFRZYc3QgP5euED2Ot2lR1ENd4alxNJfpnnINPhxTzdxpmERDhjt6 hDIRs9NLDX68HW+gPIdd0ZvurjSfoZczHQd5E8d6SEj+A7DqwZWWWHD1yric2B1amBM1 BcLkdzqIVHU8Lsb/4l2WI/qYRhNIObV6tO5VIZlvXoOdrGcqSMyYz0HuRATrz1j7jYR1 vyjjBZGeuE24oEnwmieRXKEF33VockUkRQVFwWX69BVDYmwvLRCetjEb01yUknm+31Il jusg== 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 b5-20020a056a000cc500b006826f3512f1si7523962pfv.204.2023.07.14.11.07.28; Fri, 14 Jul 2023 11:07:41 -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 S236536AbjGNRwl (ORCPT <rfc822;hadasmailinglist@gmail.com> + 99 others); Fri, 14 Jul 2023 13:52:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236501AbjGNRwb (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 14 Jul 2023 13:52:31 -0400 Received: from mail-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 526EF35BD; Fri, 14 Jul 2023 10:52:00 -0700 (PDT) Received: by mail-il1-x134.google.com with SMTP id e9e14a558f8ab-34642952736so9742245ab.3; Fri, 14 Jul 2023 10:52:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689356996; x=1691948996; 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=9Zl9ZOznQn0z/OyvCDvuTYi3+h4lEQZHsyG8cOFSOc4=; b=UMYJ96ozF+0SIe4quJoX52ECLx3VaiRKC5AslwyKwjesNVre5X80h87qTyMbYAeeWC 0fbE7M3GVD+jxjSaDHBylML27YaC1cTnwEENVtfFCY/c41Rav/DXe/rSKPwxBRW5SplN BdBHcvmX0kwNLMJXNRAxghAjQjYHu6NzXq4JPJdNYxLRkj5pKUBHzKfseX3NwhyX641N GQrrlK5tv32IdxON0PZ2e0eIxfTuAdt80opEz4QaDZyZXUmvByMQzHR4HppohwHPrQAI PFoZX4ZuGoeUp97P1q45Kf7AJ45MTclSEE+cjFebz+ui7oQmtvnWN7RTYW9Cc77ShABS txqg== X-Gm-Message-State: ABy/qLbh+UCAgo/6zzDTApF9lxWvrAEBWLVC/3d3foNTN/BAG9dQEook +SfGqUd18gZz55zw3EM4iw== X-Received: by 2002:a05:6e02:933:b0:346:50ce:d602 with SMTP id o19-20020a056e02093300b0034650ced602mr4857766ilt.1.1689356996535; Fri, 14 Jul 2023 10:49:56 -0700 (PDT) Received: from robh_at_kernel.org ([64.188.179.250]) by smtp.gmail.com with ESMTPSA id h7-20020a02b607000000b0042b1d495aecsm2711161jam.123.2023.07.14.10.49.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jul 2023 10:49:55 -0700 (PDT) Received: (nullmailer pid 4062949 invoked by uid 1000); Fri, 14 Jul 2023 17:49:17 -0000 From: Rob Herring <robh@kernel.org> To: Benson Leung <bleung@chromium.org>, Guenter Roeck <groeck@chromium.org>, Hans de Goede <hdegoede@redhat.com>, Mark Gross <markgross@kernel.org>, Vadim Pasternak <vadimp@nvidia.com> Cc: devicetree@vger.kernel.org, chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: [PATCH] platform: Explicitly include correct DT includes Date: Fri, 14 Jul 2023 11:49:09 -0600 Message-Id: <20230714174909.4062739-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,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: 1771420318389656167 X-GMAIL-MSGID: 1771420318389656167 |
Series |
platform: Explicitly include correct DT includes
|
|
Commit Message
Rob Herring
July 14, 2023, 5:49 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>
---
drivers/platform/chrome/cros_ec.c | 1 +
drivers/platform/mellanox/mlxreg-hotplug.c | 1 -
drivers/platform/mellanox/mlxreg-io.c | 1 -
3 files changed, 1 insertion(+), 2 deletions(-)
Comments
On Fri, Jul 14, 2023 at 11:49:09AM -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> For cros_ec: Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org> The driver uses platform_device_unregister() which is in platform_device.h. > diff --git a/drivers/platform/chrome/cros_ec.c b/drivers/platform/chrome/cros_ec.c > index 8b7949220382..5d36fbc75e1b 100644 > --- a/drivers/platform/chrome/cros_ec.c > +++ b/drivers/platform/chrome/cros_ec.c > @@ -12,6 +12,7 @@ > #include <linux/interrupt.h> > #include <linux/module.h> > #include <linux/of_platform.h> > +#include <linux/platform_device.h> > #include <linux/platform_data/cros_ec_commands.h> > #include <linux/platform_data/cros_ec_proto.h> > #include <linux/slab.h> nit: if we want to maintain the sort, "platform_device" should come after "platform_data".
Hi, On 7/14/23 19:49, 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> Thank you for your patch, I've applied this patch to my review-hans branch: https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans Note it will show up in my review-hans branch once I've pushed my local branch there, which might take a while. Once I've run some tests on this branch the patches there will be added to the platform-drivers-x86/for-next branch and eventually will be included in the pdx86 pull-request to Linus for the next merge-window. Regards, Hans > --- > drivers/platform/chrome/cros_ec.c | 1 + > drivers/platform/mellanox/mlxreg-hotplug.c | 1 - > drivers/platform/mellanox/mlxreg-io.c | 1 - > 3 files changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/platform/chrome/cros_ec.c b/drivers/platform/chrome/cros_ec.c > index 8b7949220382..5d36fbc75e1b 100644 > --- a/drivers/platform/chrome/cros_ec.c > +++ b/drivers/platform/chrome/cros_ec.c > @@ -12,6 +12,7 @@ > #include <linux/interrupt.h> > #include <linux/module.h> > #include <linux/of_platform.h> > +#include <linux/platform_device.h> > #include <linux/platform_data/cros_ec_commands.h> > #include <linux/platform_data/cros_ec_proto.h> > #include <linux/slab.h> > diff --git a/drivers/platform/mellanox/mlxreg-hotplug.c b/drivers/platform/mellanox/mlxreg-hotplug.c > index b7dcc64cd238..6ddfea0d4c5b 100644 > --- a/drivers/platform/mellanox/mlxreg-hotplug.c > +++ b/drivers/platform/mellanox/mlxreg-hotplug.c > @@ -12,7 +12,6 @@ > #include <linux/i2c.h> > #include <linux/interrupt.h> > #include <linux/module.h> > -#include <linux/of_device.h> > #include <linux/platform_data/mlxreg.h> > #include <linux/platform_device.h> > #include <linux/spinlock.h> > diff --git a/drivers/platform/mellanox/mlxreg-io.c b/drivers/platform/mellanox/mlxreg-io.c > index ddc08abf398c..83ba037408cd 100644 > --- a/drivers/platform/mellanox/mlxreg-io.c > +++ b/drivers/platform/mellanox/mlxreg-io.c > @@ -11,7 +11,6 @@ > #include <linux/hwmon.h> > #include <linux/hwmon-sysfs.h> > #include <linux/module.h> > -#include <linux/of_device.h> > #include <linux/platform_data/mlxreg.h> > #include <linux/platform_device.h> > #include <linux/regmap.h>
diff --git a/drivers/platform/chrome/cros_ec.c b/drivers/platform/chrome/cros_ec.c index 8b7949220382..5d36fbc75e1b 100644 --- a/drivers/platform/chrome/cros_ec.c +++ b/drivers/platform/chrome/cros_ec.c @@ -12,6 +12,7 @@ #include <linux/interrupt.h> #include <linux/module.h> #include <linux/of_platform.h> +#include <linux/platform_device.h> #include <linux/platform_data/cros_ec_commands.h> #include <linux/platform_data/cros_ec_proto.h> #include <linux/slab.h> diff --git a/drivers/platform/mellanox/mlxreg-hotplug.c b/drivers/platform/mellanox/mlxreg-hotplug.c index b7dcc64cd238..6ddfea0d4c5b 100644 --- a/drivers/platform/mellanox/mlxreg-hotplug.c +++ b/drivers/platform/mellanox/mlxreg-hotplug.c @@ -12,7 +12,6 @@ #include <linux/i2c.h> #include <linux/interrupt.h> #include <linux/module.h> -#include <linux/of_device.h> #include <linux/platform_data/mlxreg.h> #include <linux/platform_device.h> #include <linux/spinlock.h> diff --git a/drivers/platform/mellanox/mlxreg-io.c b/drivers/platform/mellanox/mlxreg-io.c index ddc08abf398c..83ba037408cd 100644 --- a/drivers/platform/mellanox/mlxreg-io.c +++ b/drivers/platform/mellanox/mlxreg-io.c @@ -11,7 +11,6 @@ #include <linux/hwmon.h> #include <linux/hwmon-sysfs.h> #include <linux/module.h> -#include <linux/of_device.h> #include <linux/platform_data/mlxreg.h> #include <linux/platform_device.h> #include <linux/regmap.h>