Skip to contentSkip to conversation

block: blk-ioc.c: local functions should not be exposed globally

PATCH New H Hartley Sweeten 1 participant 1 message Apr 12, 2012 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block: blk-ioc.c: local functions should not be exposed globally

The function ioc_set_icq_flags is only referenced in this file and should be marked static to prevent it from being exposed globally.

This quiets the sparse warning:

warning: symbol 'ioc_set_icq_flags' was not declared. Should it be static?

---

block/blk-ioc.c +1 -1
index fb95dd2..167bae0 100644
@@ -382,7 +382,7 @@ struct io_cq *ioc_create_icq(struct request_queue *q, gfp_t gfp_mask)
 	return icq;
 }
 
-void ioc_set_icq_flags(struct io_context *ioc, unsigned int flags)
+static void ioc_set_icq_flags(struct io_context *ioc, unsigned int flags)
 {
 	struct io_cq *icq;
 	struct hlist_node *n;