From: Rashika Kheria <rashika.kheria@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Len Brown <lenb@kernel.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Borislav Petkov <bp@suse.de>,
"Chen, Gong" <gong.chen@linux.intel.com>,
Rashika Kheria <rashika.kheria@gmail.com>,
Tony Luck <tony.luck@intel.com>,
Mauro Carvalho Chehab <m.chehab@samsung.com>,
linux-acpi@vger.kernel.org, josh@joshtriplett.org
Subject: [PATCH] drivers: firmware: Move prototype declartions to header file cper.h
Date: Wed, 18 Dec 2013 12:21:31 +0530 [thread overview]
Message-ID: <20131218064527.GA3353@rashika> (raw)
Move prototype declarations of function cper_estatus_print(),
cper_estatus_check_header() and cper_estatus_check() from file
drivers/acpi/apei/apei-internal.h to header file include/linux/cper.h
because these functions are used by both acpi driver and firmware
driver.
The header file include/linux/cper.h was chosen because it is included
in both the drivers.
This eliminates the following warnings in efi/cper.c:
drivers/firmware/efi/cper.c:346:6: warning: no previous prototype for ‘cper_estatus_print’ [-Wmissing-prototypes]
drivers/firmware/efi/cper.c:374:5: warning: no previous prototype for ‘cper_estatus_check_header’ [-Wmissing-prototypes]
drivers/firmware/efi/cper.c:387:5: warning: no previous prototype for ‘cper_estatus_check’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
drivers/acpi/apei/apei-internal.h | 5 -----
include/linux/cper.h | 8 ++++++++
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/acpi/apei/apei-internal.h b/drivers/acpi/apei/apei-internal.h
index 21ba34a..4ae847d 100644
--- a/drivers/acpi/apei/apei-internal.h
+++ b/drivers/acpi/apei/apei-internal.h
@@ -135,10 +135,5 @@ static inline u32 cper_estatus_len(struct acpi_generic_status *estatus)
return sizeof(*estatus) + estatus->data_length;
}
-void cper_estatus_print(const char *pfx,
- const struct acpi_generic_status *estatus);
-int cper_estatus_check_header(const struct acpi_generic_status *estatus);
-int cper_estatus_check(const struct acpi_generic_status *estatus);
-
int apei_osc_setup(void);
#endif
diff --git a/include/linux/cper.h b/include/linux/cper.h
index 2fc0ec3..080f5f7 100644
--- a/include/linux/cper.h
+++ b/include/linux/cper.h
@@ -22,6 +22,14 @@
#define LINUX_CPER_H
#include <linux/uuid.h>
+#include <linux/acpi.h>
+
+/* Prototype declaration of functions common between acpi and firmware driver*/
+void cper_estatus_print(const char *pfx,
+ const struct acpi_generic_status *estatus);
+int cper_estatus_check_header(const struct acpi_generic_status *estatus);
+int cper_estatus_check(const struct acpi_generic_status *estatus);
+
/* CPER record signature and the size */
#define CPER_SIG_RECORD "CPER"
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
reply other threads:[~2013-12-18 6:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20131218064527.GA3353@rashika \
--to=rashika.kheria@gmail.com \
--cc=bp@suse.de \
--cc=gong.chen@linux.intel.com \
--cc=josh@joshtriplett.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.chehab@samsung.com \
--cc=rjw@rjwysocki.net \
--cc=tony.luck@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;
as well as URLs for NNTP newsgroup(s).