Skip to content

Commit c099eac

Browse files
Lv Zhengrafaeljw
authored andcommitted
SFI / ACPI: Fix warnings reported during builds with W=1
The following warnings can be seen in W=1 builds, because the original sfi_acpi.[ch] header inclusions are incorrect: include/linux/sfi_acpi.h:72:2: error: implicit declaration of function 'acpi_table_parse' [-Werror=implicit-function-declaration] drivers/sfi/sfi_acpi.c:154:5: warning: no previous prototype for 'sfi_acpi_table_parse' [-Wmissing-prototypes] Fix linux/sfi_acpi.h and modify drivers/sfi/sfi_acpi.c accordingly. Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> [rjw: Subject and changelog] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent fe5e49c commit c099eac

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎arch/x86/pci/mmconfig-shared.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
#include <linux/pci.h>
1414
#include <linux/init.h>
15-
#include <linux/acpi.h>
1615
#include <linux/sfi_acpi.h>
1716
#include <linux/bitmap.h>
1817
#include <linux/dmi.h>

‎drivers/sfi/sfi_acpi.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@
6060
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
6161

6262
#include <linux/kernel.h>
63-
#include <acpi/acpi.h> /* FIXME: inclusion should be removed */
64-
65-
#include <linux/sfi.h>
63+
#include <linux/sfi_acpi.h>
6664
#include "sfi_core.h"
6765

6866
/*

‎include/linux/sfi_acpi.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@
5959
#ifndef _LINUX_SFI_ACPI_H
6060
#define _LINUX_SFI_ACPI_H
6161

62+
#include <linux/acpi.h>
63+
#include <linux/sfi.h>
64+
6265
#ifdef CONFIG_SFI
6366
#include <acpi/acpi.h> /* FIXME: inclusion should be removed */
6467

0 commit comments

Comments
 (0)