From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Zheng, Lv" <lv.zheng@intel.com>
Cc: "Wysocki, Rafael J" <rafael.j.wysocki@intel.com>,
"linux-acpi @ vger . kernel . org" <linux-acpi@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] SFI: fix compilation warnings
Date: Tue, 10 Dec 2013 14:07:32 +0200 [thread overview]
Message-ID: <1386677252.1871.142.camel@smile> (raw)
In-Reply-To: <1AE640813FDE7649BE1B193DEA596E88024969FB@SHSMSX101.ccr.corp.intel.com>
On Tue, 2013-12-10 at 01:30 +0000, Zheng, Lv wrote:
> Hi, Andy
>
> IMO:
> 1. sfi_acpi.h should include both <linux/acpi.h> and <linux/sfi.h> and it should include <acpi/acpi.h> for !CONFIG_ACPI builds.
> 2. then we should include sfi_acpi.h instead of <linux/acpi.h>, <linux/sfi.h> and <acpi/acpi.h> for all of its users.
>
> I think the patch in the linux-pm/bleeding-edge queue can fix the issue you've reported:
> https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=bleeding-edge&id=c099eacbcaec4475936fbf73e499507728ce47e1
I think so, I'll test this later.
Only one thing I don't like is the FIXME stuff in the sfi_acpi.h.
Could it be fixed as well?
>
> I made it a part of my header cleanup series.
> The story can be found in this mailing list thread:
> http://www.spinics.net/lists/linux-acpi/msg47510.html
>
> Thanks and best regards
> -Lv
>
>
> > -----Original Message-----
> > From: Andy Shevchenko [mailto:andriy.shevchenko@linux.intel.com]
> > Sent: Monday, December 09, 2013 5:09 PM
> > To: Wysocki, Rafael J; linux-acpi @ vger . kernel . org; LKML; Zheng, Lv
> > Cc: Andy Shevchenko
> > Subject: [PATCH v2] SFI: fix compilation warnings
> >
> > When build kernel with make W=1 we get the following compiler error.
> >
> > In file included from drivers/sfi/sfi_acpi.c:66:0:
> > include/linux/sfi_acpi.h: In function ‘acpi_sfi_table_parse’:
> > include/linux/sfi_acpi.h:72:2: error: implicit declaration of function ‘acpi_table_parse’ [-Werror=implicit-function-declaration]
> > if (!acpi_table_parse(signature, handler))
> > ^
> > cc1: some warnings being treated as errors
> >
> > The patch add linux/acpi.h to the top of file.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> > Changes to v2:
> > - fix for build when ACPI=n, SFI=y
> > drivers/sfi/sfi_acpi.c | 2 +-
> > include/linux/sfi_acpi.h | 4 +++-
> > 2 files changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/sfi/sfi_acpi.c b/drivers/sfi/sfi_acpi.c
> > index 5e753d7..5589ec5 100644
> > --- a/drivers/sfi/sfi_acpi.c
> > +++ b/drivers/sfi/sfi_acpi.c
> > @@ -60,7 +60,7 @@
> > #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
> >
> > #include <linux/kernel.h>
> > -#include <acpi/acpi.h> /* FIXME: inclusion should be removed */
> > +#include <linux/acpi.h>
> >
> > #include <linux/sfi.h>
> > #include "sfi_core.h"
> > diff --git a/include/linux/sfi_acpi.h b/include/linux/sfi_acpi.h
> > index 2cfcb79..ecc2344 100644
> > --- a/include/linux/sfi_acpi.h
> > +++ b/include/linux/sfi_acpi.h
> > @@ -60,7 +60,9 @@
> > #define _LINUX_SFI_ACPI_H
> >
> > #ifdef CONFIG_SFI
> > -#include <acpi/acpi.h> /* FIXME: inclusion should be removed */
> > +
> > +#include <acpi/acpi.h>
> > +#include <linux/acpi.h>
> >
> > extern int sfi_acpi_table_parse(char *signature, char *oem_id,
> > char *oem_table_id,
> > --
> > 1.8.4.4
>
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
next prev parent reply other threads:[~2013-12-10 12:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-09 9:09 [PATCH v2] SFI: fix compilation warnings Andy Shevchenko
2013-12-10 1:30 ` Zheng, Lv
2013-12-10 12:07 ` Andy Shevchenko [this message]
2013-12-11 0:22 ` Zheng, Lv
2013-12-10 12:45 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1386677252.1871.142.camel@smile \
--to=andriy.shevchenko@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lv.zheng@intel.com \
--cc=rafael.j.wysocki@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox