* [PATCH] drivers: sbe-2t3e3: Mark functions as static in ctrl.c
@ 2013-12-21 10:17 Rashika Kheria
2013-12-21 10:52 ` Josh Triplett
0 siblings, 1 reply; 2+ messages in thread
From: Rashika Kheria @ 2013-12-21 10:17 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, Rashika Kheria, devel, josh
Mark functions t3e3_set_loopback(), t3e3_reg_read(), t3e3_reg_write(),
t3e3_port_get(), t3e3_port_set(), t3e3_port_get_stats() and
t3e3_port_del_stats() as static in ctrl.c because they are not used
outside this file.
This eliminates the following warnings in ctrl.c:
drivers/staging/sbe-2t3e3/ctrl.c:34:6: warning: no previous prototype for ‘t3e3_set_loopback’ [-Wmissing-prototypes]
drivers/staging/sbe-2t3e3/ctrl.c:98:6: warning: no previous prototype for ‘t3e3_reg_read’ [-Wmissing-prototypes]
drivers/staging/sbe-2t3e3/ctrl.c:135:6: warning: no previous prototype for ‘t3e3_reg_write’ [-Wmissing-prototypes]
drivers/staging/sbe-2t3e3/ctrl.c:167:6: warning: no previous prototype for ‘t3e3_port_get’ [-Wmissing-prototypes]
drivers/staging/sbe-2t3e3/ctrl.c:172:6: warning: no previous prototype for ‘t3e3_port_set’ [-Wmissing-prototypes]
drivers/staging/sbe-2t3e3/ctrl.c:219:6: warning: no previous prototype for ‘t3e3_port_get_stats’ [-Wmissing-prototypes]
drivers/staging/sbe-2t3e3/ctrl.c:285:6: warning: no previous prototype for ‘t3e3_port_del_stats’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
drivers/staging/sbe-2t3e3/ctrl.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/sbe-2t3e3/ctrl.c b/drivers/staging/sbe-2t3e3/ctrl.c
index a5825d7..d280bcf 100644
--- a/drivers/staging/sbe-2t3e3/ctrl.c
+++ b/drivers/staging/sbe-2t3e3/ctrl.c
@@ -31,7 +31,7 @@ void t3e3_set_frame_type(struct channel *sc, u32 mode)
sc->p.frame_type = mode;
}
-void t3e3_set_loopback(struct channel *sc, u32 mode)
+static void t3e3_set_loopback(struct channel *sc, u32 mode)
{
u32 tx, rx;
@@ -95,7 +95,7 @@ void t3e3_set_loopback(struct channel *sc, u32 mode)
}
-void t3e3_reg_read(struct channel *sc, u32 *reg, u32 *val)
+static void t3e3_reg_read(struct channel *sc, u32 *reg, u32 *val)
{
u32 i;
@@ -132,7 +132,7 @@ void t3e3_reg_read(struct channel *sc, u32 *reg, u32 *val)
}
}
-void t3e3_reg_write(struct channel *sc, u32 *reg)
+static void t3e3_reg_write(struct channel *sc, u32 *reg)
{
u32 i;
@@ -164,12 +164,12 @@ void t3e3_reg_write(struct channel *sc, u32 *reg)
}
}
-void t3e3_port_get(struct channel *sc, t3e3_param_t *param)
+static void t3e3_port_get(struct channel *sc, t3e3_param_t *param)
{
memcpy(param, &(sc->p), sizeof(t3e3_param_t));
}
-void t3e3_port_set(struct channel *sc, t3e3_param_t *param)
+static void t3e3_port_set(struct channel *sc, t3e3_param_t *param)
{
if (param->frame_mode != 0xff)
cpld_set_frame_mode(sc, param->frame_mode);
@@ -216,7 +216,7 @@ void t3e3_port_set(struct channel *sc, t3e3_param_t *param)
cpld_set_scrambler(sc, param->scrambler);
}
-void t3e3_port_get_stats(struct channel *sc,
+static void t3e3_port_get_stats(struct channel *sc,
t3e3_stats_t *stats)
{
u32 result;
@@ -282,7 +282,7 @@ void t3e3_port_get_stats(struct channel *sc,
memcpy(stats, &(sc->s), sizeof(t3e3_stats_t));
}
-void t3e3_port_del_stats(struct channel *sc)
+static void t3e3_port_del_stats(struct channel *sc)
{
memset(&(sc->s), 0, sizeof(t3e3_stats_t));
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] drivers: sbe-2t3e3: Mark functions as static in ctrl.c
2013-12-21 10:17 [PATCH] drivers: sbe-2t3e3: Mark functions as static in ctrl.c Rashika Kheria
@ 2013-12-21 10:52 ` Josh Triplett
0 siblings, 0 replies; 2+ messages in thread
From: Josh Triplett @ 2013-12-21 10:52 UTC (permalink / raw)
To: Rashika Kheria; +Cc: linux-kernel, Greg Kroah-Hartman, devel
On Sat, Dec 21, 2013 at 03:47:13PM +0530, Rashika Kheria wrote:
> Mark functions t3e3_set_loopback(), t3e3_reg_read(), t3e3_reg_write(),
> t3e3_port_get(), t3e3_port_set(), t3e3_port_get_stats() and
> t3e3_port_del_stats() as static in ctrl.c because they are not used
> outside this file.
>
> This eliminates the following warnings in ctrl.c:
> drivers/staging/sbe-2t3e3/ctrl.c:34:6: warning: no previous prototype for ‘t3e3_set_loopback’ [-Wmissing-prototypes]
> drivers/staging/sbe-2t3e3/ctrl.c:98:6: warning: no previous prototype for ‘t3e3_reg_read’ [-Wmissing-prototypes]
> drivers/staging/sbe-2t3e3/ctrl.c:135:6: warning: no previous prototype for ‘t3e3_reg_write’ [-Wmissing-prototypes]
> drivers/staging/sbe-2t3e3/ctrl.c:167:6: warning: no previous prototype for ‘t3e3_port_get’ [-Wmissing-prototypes]
> drivers/staging/sbe-2t3e3/ctrl.c:172:6: warning: no previous prototype for ‘t3e3_port_set’ [-Wmissing-prototypes]
> drivers/staging/sbe-2t3e3/ctrl.c:219:6: warning: no previous prototype for ‘t3e3_port_get_stats’ [-Wmissing-prototypes]
> drivers/staging/sbe-2t3e3/ctrl.c:285:6: warning: no previous prototype for ‘t3e3_port_del_stats’ [-Wmissing-prototypes]
>
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
> drivers/staging/sbe-2t3e3/ctrl.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/sbe-2t3e3/ctrl.c b/drivers/staging/sbe-2t3e3/ctrl.c
> index a5825d7..d280bcf 100644
> --- a/drivers/staging/sbe-2t3e3/ctrl.c
> +++ b/drivers/staging/sbe-2t3e3/ctrl.c
> @@ -31,7 +31,7 @@ void t3e3_set_frame_type(struct channel *sc, u32 mode)
> sc->p.frame_type = mode;
> }
>
> -void t3e3_set_loopback(struct channel *sc, u32 mode)
> +static void t3e3_set_loopback(struct channel *sc, u32 mode)
> {
> u32 tx, rx;
>
> @@ -95,7 +95,7 @@ void t3e3_set_loopback(struct channel *sc, u32 mode)
> }
>
>
> -void t3e3_reg_read(struct channel *sc, u32 *reg, u32 *val)
> +static void t3e3_reg_read(struct channel *sc, u32 *reg, u32 *val)
> {
> u32 i;
>
> @@ -132,7 +132,7 @@ void t3e3_reg_read(struct channel *sc, u32 *reg, u32 *val)
> }
> }
>
> -void t3e3_reg_write(struct channel *sc, u32 *reg)
> +static void t3e3_reg_write(struct channel *sc, u32 *reg)
> {
> u32 i;
>
> @@ -164,12 +164,12 @@ void t3e3_reg_write(struct channel *sc, u32 *reg)
> }
> }
>
> -void t3e3_port_get(struct channel *sc, t3e3_param_t *param)
> +static void t3e3_port_get(struct channel *sc, t3e3_param_t *param)
> {
> memcpy(param, &(sc->p), sizeof(t3e3_param_t));
> }
>
> -void t3e3_port_set(struct channel *sc, t3e3_param_t *param)
> +static void t3e3_port_set(struct channel *sc, t3e3_param_t *param)
> {
> if (param->frame_mode != 0xff)
> cpld_set_frame_mode(sc, param->frame_mode);
> @@ -216,7 +216,7 @@ void t3e3_port_set(struct channel *sc, t3e3_param_t *param)
> cpld_set_scrambler(sc, param->scrambler);
> }
>
> -void t3e3_port_get_stats(struct channel *sc,
> +static void t3e3_port_get_stats(struct channel *sc,
> t3e3_stats_t *stats)
> {
> u32 result;
> @@ -282,7 +282,7 @@ void t3e3_port_get_stats(struct channel *sc,
> memcpy(stats, &(sc->s), sizeof(t3e3_stats_t));
> }
>
> -void t3e3_port_del_stats(struct channel *sc)
> +static void t3e3_port_del_stats(struct channel *sc)
> {
> memset(&(sc->s), 0, sizeof(t3e3_stats_t));
> }
> --
> 1.7.9.5
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-21 10:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-21 10:17 [PATCH] drivers: sbe-2t3e3: Mark functions as static in ctrl.c Rashika Kheria
2013-12-21 10:52 ` Josh Triplett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox