Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3816627ybv; Mon, 10 Feb 2020 06:57:47 -0800 (PST) X-Google-Smtp-Source: APXvYqzduzwhD/b8X8TRs+ZUf524PeEoTHz13iSyVVSmExfILxsVG0rXuKq+AV8Al7dFxUytL1LX X-Received: by 2002:a05:6830:1049:: with SMTP id b9mr1450296otp.100.1581346667609; Mon, 10 Feb 2020 06:57:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581346667; cv=none; d=google.com; s=arc-20160816; b=HwOuYo+s/0Ypt59wszOi3Rr6rDq+NYOXaw3XBlnjsbosDLxR14/XLk4+AeZ+e8l4+U mA0+3ib062S/7gxpqBEQm9Pj6qOen+SmahqOprm34IjL1NWeVTzNVTgKBMED37rkjEQf 3pYZUu3pcy9aAMT5xu8QLytByCSyLTZzaTA1DW9cFYqWWdp+dwQOMkUb4q79EW6vGl90 fBB63xzHcsTHfXrCsM3xLvCZ3eiNA2A5kMXe2R9ui13Nkd01qnwv6+NNNXtG5xCmz6jv V/SPpQENDi1C0heFj9Jo/C0d4yzXCRj+MjBr7NBZeO86lSed06V3ximxVuvy+kFfo26c qtFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :from:date; bh=huEqffwy76u1nO0NSGhe4GJMIvti/iO9L+dxtRbZ9uo=; b=Q6TMNMJq/G0X/VTkex/zmMW7iX7Rn1KTXzqr3ZNKWRzSFr9IQXnJa05MGlsisExjVF dFSCCKcVFC44LihB84F+5rfPDk1tO8BbDfM6lCR7WwtPXjEh+4nfYPaSpng+H7drNBH8 3VQQPIbCwVjmZ/e8aFX2WQURqkWpGKnFgfrtuQyIHgf9n+RCTuYzw1D+J1SrRYKqo448 um9Lhi2OknfHsgcoIMAP+VySwTP+LYURAYeeb4v5cpwiuf9Tt4GK2v3ufvFCvj07/P22 ajH8keONo1TJjoeeaivh58eDRwOtpdPgm984/+5FyCp5frt0uFOdCmyyl5pDMBHGCqWR 3afA== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k15si250713oij.134.2020.02.10.06.57.36; Mon, 10 Feb 2020 06:57:47 -0800 (PST) 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727941AbgBJO5W (ORCPT + 99 others); Mon, 10 Feb 2020 09:57:22 -0500 Received: from mga11.intel.com ([192.55.52.93]:12675 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727008AbgBJO5V (ORCPT ); Mon, 10 Feb 2020 09:57:21 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Feb 2020 06:57:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,425,1574150400"; d="scan'208";a="226170352" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga008.jf.intel.com with ESMTP; 10 Feb 2020 06:57:19 -0800 Received: from andy by smile with local (Exim 4.93) (envelope-from ) id 1j1AUz-000Zdi-H8; Mon, 10 Feb 2020 16:57:21 +0200 Date: Mon, 10 Feb 2020 16:57:21 +0200 From: Andy Shevchenko To: Enric Balletbo i Serra , Nick Crews , linux-kernel@vger.kernel.org, Daniel Campello Subject: Re: [PATCH v2] platform/chrome: wilco_ec: Platform data shan't include kernel.h Message-ID: <20200210145721.GX10400@smile.fi.intel.com> References: <20200205094828.77940-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200205094828.77940-1-andriy.shevchenko@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 05, 2020 at 11:48:28AM +0200, Andy Shevchenko wrote: > Replace with appropriate types.h. > > Also there is no need to include device.h, but mutex.h. > For the pointers to unknown structures use forward declarations. > > In the *.c files we need to include all headers that provide APIs > being used in the module. Anybody to comment? > > Signed-off-by: Andy Shevchenko > --- > v2: update *.c files (kbuild test robot) > drivers/platform/chrome/wilco_ec/properties.c | 3 +++ > drivers/platform/chrome/wilco_ec/sysfs.c | 4 ++++ > include/linux/platform_data/wilco-ec.h | 8 ++++++-- > 3 files changed, 13 insertions(+), 2 deletions(-) > > diff --git a/drivers/platform/chrome/wilco_ec/properties.c b/drivers/platform/chrome/wilco_ec/properties.c > index e69682c95ea2..a0cbd8bd2851 100644 > --- a/drivers/platform/chrome/wilco_ec/properties.c > +++ b/drivers/platform/chrome/wilco_ec/properties.c > @@ -3,8 +3,11 @@ > * Copyright 2019 Google LLC > */ > > +#include > +#include > #include > #include > +#include > #include > > /* Operation code; what the EC should do with the property */ > diff --git a/drivers/platform/chrome/wilco_ec/sysfs.c b/drivers/platform/chrome/wilco_ec/sysfs.c > index f0d174b6bb21..3c587b4054a5 100644 > --- a/drivers/platform/chrome/wilco_ec/sysfs.c > +++ b/drivers/platform/chrome/wilco_ec/sysfs.c > @@ -8,8 +8,12 @@ > * See Documentation/ABI/testing/sysfs-platform-wilco-ec for more information. > */ > > +#include > +#include > #include > +#include > #include > +#include > > #define CMD_KB_CMOS 0x7C > #define SUB_CMD_KB_CMOS_AUTO_ON 0x03 > diff --git a/include/linux/platform_data/wilco-ec.h b/include/linux/platform_data/wilco-ec.h > index afede15a95bf..25f46a939637 100644 > --- a/include/linux/platform_data/wilco-ec.h > +++ b/include/linux/platform_data/wilco-ec.h > @@ -8,8 +8,8 @@ > #ifndef WILCO_EC_H > #define WILCO_EC_H > > -#include > -#include > +#include > +#include > > /* Message flags for using the mailbox() interface */ > #define WILCO_EC_FLAG_NO_RESPONSE BIT(0) /* EC does not respond */ > @@ -17,6 +17,10 @@ > /* Normal commands have a maximum 32 bytes of data */ > #define EC_MAILBOX_DATA_SIZE 32 > > +struct device; > +struct resource; > +struct platform_device; > + > /** > * struct wilco_ec_device - Wilco Embedded Controller handle. > * @dev: Device handle. > -- > 2.24.1 > -- With Best Regards, Andy Shevchenko