[RESEND][PATCH net-next] net: sched: taprio: fix -Wmissing-prototypes warnings

Subsystems: cbs/etf/taprio qdiscs, networking [general], tc subsystem, the rest

2 messages, 2 authors, 2019-10-22 · open the first message on its own page

[RESEND][PATCH net-next] net: sched: taprio: fix -Wmissing-prototypes warnings

From: Yi Wang <hidden>
Date: 2019-10-21 23:55:40

We get one warnings when build kernel W=1:
net/sched/sch_taprio.c:1155:6: warning: no previous prototype for ‘taprio_offload_config_changed’ [-Wmissing-prototypes]

Make the function static to fix this.

Signed-off-by: Yi Wang <redacted>
Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
---
 net/sched/sch_taprio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c
index 6719a65..2121187 100644
--- a/net/sched/sch_taprio.c
+++ b/net/sched/sch_taprio.c
@@ -1152,7 +1152,7 @@ void taprio_offload_free(struct tc_taprio_qopt_offload *offload)
  * offload state (PENDING, ACTIVE, INACTIVE) so it can be visible in dump().
  * This is left as TODO.
  */
-void taprio_offload_config_changed(struct taprio_sched *q)
+static void taprio_offload_config_changed(struct taprio_sched *q)
 {
 	struct sched_gate_list *oper, *admin;
 
-- 
1.8.3.1

Re: [RESEND][PATCH net-next] net: sched: taprio: fix -Wmissing-prototypes warnings

From: Jakub Kicinski <hidden>
Date: 2019-10-22 20:39:32

On Tue, 22 Oct 2019 07:57:42 +0800, Yi Wang wrote:
We get one warnings when build kernel W=1:
net/sched/sch_taprio.c:1155:6: warning: no previous prototype for ‘taprio_offload_config_changed’ [-Wmissing-prototypes]

Make the function static to fix this.

Signed-off-by: Yi Wang <redacted>
Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Thank you!

I've added Fixes tag and applied this to the net tree, since the warning
is already present there.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help