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


Groups > linux.kernel > #1471279 > unrolled thread

[PATCH] memstick: r592: add missing declaration in r592.h

Started byBaoyou Xie <baoyou.xie@linaro.org>
First post2016-08-28 08:30 +0200
Last post2016-08-28 08:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] memstick: r592: add missing declaration in r592.h Baoyou Xie <baoyou.xie@linaro.org> - 2016-08-28 08:30 +0200

#1471279 — [PATCH] memstick: r592: add missing declaration in r592.h

FromBaoyou Xie <baoyou.xie@linaro.org>
Date2016-08-28 08:30 +0200
Subject[PATCH] memstick: r592: add missing declaration in r592.h
Message-ID<sb1Ls-6yq-3@gated-at.bofh.it>
We get 1 warning when build kernel with W=1:
drivers/memstick/host/r592.c:50:13: warning: no previous prototype for 'memstick_debug_get_tpc_name' [-Wmissing-prototypes]

in fact, function memstick_debug_get_tpc_name is implemented in r592.c
and exported but need to be declared in header file.

so this patch add its declaration in r592.h

in addition, this function don't check if the parameter tpc is valid, 
it will cause a panic and incur attack. 
but this need another patch to fix it.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
---
 drivers/memstick/host/r592.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/memstick/host/r592.h b/drivers/memstick/host/r592.h
index c5726c1..8f69fc1 100644
--- a/drivers/memstick/host/r592.h
+++ b/drivers/memstick/host/r592.h
@@ -172,4 +172,5 @@ struct r592_device {
 #define dbg_verbose(format, ...)	__dbg(2, format, ## __VA_ARGS__)
 #define dbg_reg(format, ...)		__dbg(3, format, ## __VA_ARGS__)
 
+const char *memstick_debug_get_tpc_name(int tpc);
 #endif
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web