* [PATCH] drivers: memstick: Mark function memstick_debug_get_tpc_name() as static in r592.c
@ 2013-12-14 13:07 Rashika Kheria
2013-12-14 20:46 ` Josh Triplett
2013-12-15 19:23 ` [PATCH v2] " Rashika Kheria
0 siblings, 2 replies; 4+ messages in thread
From: Rashika Kheria @ 2013-12-14 13:07 UTC (permalink / raw)
To: linux-kernel; +Cc: Maxim Levitsky, josh
This patch marks the function memstick_debug_get_tpc_name() as static in
host/r592.c because it is not used outside this file.
Thus, it also eliminates the following warning in host/r592.c:
drivers/memstick/host/r592.c:50:13: warning: no previous prototype for ‘memstick_debug_get_tpc_name’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
drivers/memstick/host/r592.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/memstick/host/r592.c b/drivers/memstick/host/r592.c
index 31727bf..1cd9307 100644
--- a/drivers/memstick/host/r592.c
+++ b/drivers/memstick/host/r592.c
@@ -47,7 +47,7 @@ static const char *tpc_names[] = {
* memstick_debug_get_tpc_name - debug helper that returns string for
* a TPC number
*/
-const char *memstick_debug_get_tpc_name(int tpc)
+static const char *memstick_debug_get_tpc_name(int tpc)
{
return tpc_names[tpc-1];
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drivers: memstick: Mark function memstick_debug_get_tpc_name() as static in r592.c
2013-12-14 13:07 [PATCH] drivers: memstick: Mark function memstick_debug_get_tpc_name() as static in r592.c Rashika Kheria
@ 2013-12-14 20:46 ` Josh Triplett
2013-12-15 19:23 ` [PATCH v2] " Rashika Kheria
1 sibling, 0 replies; 4+ messages in thread
From: Josh Triplett @ 2013-12-14 20:46 UTC (permalink / raw)
To: Rashika Kheria; +Cc: linux-kernel, Maxim Levitsky
On Sat, Dec 14, 2013 at 06:37:18PM +0530, Rashika Kheria wrote:
> This patch marks the function memstick_debug_get_tpc_name() as static in
> host/r592.c because it is not used outside this file.
>
> Thus, it also eliminates the following warning in host/r592.c:
> drivers/memstick/host/r592.c:50:13: warning: no previous prototype for ‘memstick_debug_get_tpc_name’ [-Wmissing-prototypes]
In this case, memstick_debug_get_tpc_name is exported. However, nothing
in the kernel uses it. Thus, I'd suggest additionally deleting the
EXPORT_SYMBOL for it, leaving it as a static function only used
internally within that file.
> drivers/memstick/host/r592.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/memstick/host/r592.c b/drivers/memstick/host/r592.c
> index 31727bf..1cd9307 100644
> --- a/drivers/memstick/host/r592.c
> +++ b/drivers/memstick/host/r592.c
> @@ -47,7 +47,7 @@ static const char *tpc_names[] = {
> * memstick_debug_get_tpc_name - debug helper that returns string for
> * a TPC number
> */
> -const char *memstick_debug_get_tpc_name(int tpc)
> +static const char *memstick_debug_get_tpc_name(int tpc)
> {
> return tpc_names[tpc-1];
> }
> --
> 1.7.9.5
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] drivers: memstick: Mark function memstick_debug_get_tpc_name() as static in r592.c
2013-12-14 13:07 [PATCH] drivers: memstick: Mark function memstick_debug_get_tpc_name() as static in r592.c Rashika Kheria
2013-12-14 20:46 ` Josh Triplett
@ 2013-12-15 19:23 ` Rashika Kheria
2013-12-15 20:13 ` Josh Triplett
1 sibling, 1 reply; 4+ messages in thread
From: Rashika Kheria @ 2013-12-15 19:23 UTC (permalink / raw)
To: linux-kernel, Maxim Levitsky, josh
This patch marks the function memstick_debug_get_tpc_name() as static in
host/r592.c because it is not used outside this file. It also removes the
EXPORT_SYMBOL because the function is not used anywhere else in the
kernel.
Thus, it also eliminates the following warning in host/r592.c:
drivers/memstick/host/r592.c:50:13: warning: no previous prototype for ‘memstick_debug_get_tpc_name’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
drivers/memstick/host/r592.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/memstick/host/r592.c b/drivers/memstick/host/r592.c
index 31727bf..d03aacb 100644
--- a/drivers/memstick/host/r592.c
+++ b/drivers/memstick/host/r592.c
@@ -47,12 +47,10 @@ static const char *tpc_names[] = {
* memstick_debug_get_tpc_name - debug helper that returns string for
* a TPC number
*/
-const char *memstick_debug_get_tpc_name(int tpc)
+static const char *memstick_debug_get_tpc_name(int tpc)
{
return tpc_names[tpc-1];
}
-EXPORT_SYMBOL(memstick_debug_get_tpc_name);
-
/* Read a register*/
static inline u32 r592_read_reg(struct r592_device *dev, int address)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] drivers: memstick: Mark function memstick_debug_get_tpc_name() as static in r592.c
2013-12-15 19:23 ` [PATCH v2] " Rashika Kheria
@ 2013-12-15 20:13 ` Josh Triplett
0 siblings, 0 replies; 4+ messages in thread
From: Josh Triplett @ 2013-12-15 20:13 UTC (permalink / raw)
To: Rashika Kheria; +Cc: linux-kernel, Maxim Levitsky
On Mon, Dec 16, 2013 at 12:53:02AM +0530, Rashika Kheria wrote:
> This patch marks the function memstick_debug_get_tpc_name() as static in
> host/r592.c because it is not used outside this file. It also removes the
> EXPORT_SYMBOL because the function is not used anywhere else in the
> kernel.
>
> Thus, it also eliminates the following warning in host/r592.c:
> drivers/memstick/host/r592.c:50:13: warning: no previous prototype for ‘memstick_debug_get_tpc_name’ [-Wmissing-prototypes]
>
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
> drivers/memstick/host/r592.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/memstick/host/r592.c b/drivers/memstick/host/r592.c
> index 31727bf..d03aacb 100644
> --- a/drivers/memstick/host/r592.c
> +++ b/drivers/memstick/host/r592.c
> @@ -47,12 +47,10 @@ static const char *tpc_names[] = {
> * memstick_debug_get_tpc_name - debug helper that returns string for
> * a TPC number
> */
> -const char *memstick_debug_get_tpc_name(int tpc)
> +static const char *memstick_debug_get_tpc_name(int tpc)
> {
> return tpc_names[tpc-1];
> }
> -EXPORT_SYMBOL(memstick_debug_get_tpc_name);
> -
>
> /* Read a register*/
> static inline u32 r592_read_reg(struct r592_device *dev, int address)
> --
> 1.7.9.5
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-12-15 20:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-14 13:07 [PATCH] drivers: memstick: Mark function memstick_debug_get_tpc_name() as static in r592.c Rashika Kheria
2013-12-14 20:46 ` Josh Triplett
2013-12-15 19:23 ` [PATCH v2] " Rashika Kheria
2013-12-15 20:13 ` Josh Triplett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox