Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1579170

[PATCH 2/2] arch/x86: Fix sparse warning symbol not declared

From "Tobin C. Harding" <me@tobin.cc>
Newsgroups linux.kernel
Subject [PATCH 2/2] arch/x86: Fix sparse warning symbol not declared
Date 2017-02-12 07:50 +0100
Message-ID <t9W8W-2TD-11@gated-at.bofh.it> (permalink)
References <t9W8W-2TD-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


This patch adds function declaration in order to quiet sparse symbol
not declared warning.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
---

Unsure why adding declaration quiets sparse. This may not be the
correct solution. Only testing done is building and booting kernel.
Since 'purgatory' is called from assembler and does not need forward
declaration the only advantage to this patch seems to be to save the
next newbie from investigating the sparse warning.

arch/x86/purgatory/purgatory.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/purgatory/purgatory.c b/arch/x86/purgatory/purgatory.c
index 2a2cbe5..129433c 100644
--- a/arch/x86/purgatory/purgatory.c
+++ b/arch/x86/purgatory/purgatory.c
@@ -18,6 +18,8 @@ struct sha_region {
 	unsigned long len;
 };
 
+void purgatory(void);
+
 static unsigned long backup_dest = 0;
 static unsigned long backup_src = 0;
 static unsigned long backup_sz = 0;
-- 
2.7.4

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 2/2] arch/x86: Fix sparse warning symbol not declared "Tobin C. Harding" <me@tobin.cc> - 2017-02-12 07:50 +0100
  Re: [PATCH 2/2] arch/x86: Fix sparse warning symbol not declared Thomas Gleixner <tglx@linutronix.de> - 2017-02-12 12:10 +0100

csiph-web