From: "Ben Dooks (Codethink)" <ben.dooks@codethink.co.uk>
To: linux-kernel@lists.codethink.co.uk
Cc: "Ben Dooks (Codethink)" <ben.dooks@codethink.co.uk>,
Russell King <linux@armlinux.org.uk>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] decompressor: fix undeclared items
Date: Tue, 15 Oct 2019 16:36:15 +0100 [thread overview]
Message-ID: <20191015153615.5721-1-ben.dooks@codethink.co.uk> (raw)
The follow items are not declared but also not exported
so use __attribute__((__externally_visible__)) to silence
the following sparse warnings:
./include/linux/decompress/mm.h:31:30: warning: symbol 'malloc_ptr' was not declared. Should it be static?
./include/linux/decompress/mm.h:32:20: warning: symbol 'malloc_count' was not declared. Should it be static?
arch/arm/boot/compressed/decompress.c:59:5: warning: symbol 'do_decompress' was not declared. Should it be static?
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Russell King <linux@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
arch/arm/boot/compressed/decompress.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/compressed/decompress.c b/arch/arm/boot/compressed/decompress.c
index aa075d8372ea..8f4969916151 100644
--- a/arch/arm/boot/compressed/decompress.c
+++ b/arch/arm/boot/compressed/decompress.c
@@ -9,7 +9,7 @@
#include "misc.h"
#define STATIC static
-#define STATIC_RW_DATA /* non-static please */
+#define STATIC_RW_DATA __attribute__((__externally_visible__)) /* non-static please */
/* Diagnostic functions */
#ifdef DEBUG
@@ -56,7 +56,8 @@ extern char * strchrnul(const char *, int);
#include "../../../../lib/decompress_unlz4.c"
#endif
-int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x))
+int __attribute__((__externally_visible__))
+do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x))
{
return __decompress(input, len, NULL, NULL, output, 0, NULL, error);
}
--
2.23.0
reply other threads:[~2019-10-15 15:36 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=20191015153615.5721-1-ben.dooks@codethink.co.uk \
--to=ben.dooks@codethink.co.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@lists.codethink.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
/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
all inboxes | Powered by JetHome®