Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: mvneta: make stub functions static inline

If the CONFIG_MVNET_BA is not set, then make the stub functions
static inline to avoid trying to export them, and remove hte
following sparse warnings:

drivers/net/ethernet/marvell/mvneta_bm.h:163:6: warning: symbol 'mvneta_bm_pool_destroy' was not declared. Should it be static?
drivers/net/ethernet/marvell/mvneta_bm.h:165:6: warning: symbol 'mvneta_bm_bufs_free' was not declared. Should it be static?
drivers/net/ethernet/marvell/mvneta_bm.h:167:5: warning: symbol 'mvneta_bm_construct' was not declared. Should it be static?
drivers/net/ethernet/marvell/mvneta_bm.h:168:5: warning: symbol 'mvneta_bm_pool_refill' was not declared. Should it be static?
drivers/net/ethernet/marvell/mvneta_bm.h:170:23: warning: symbol 'mvneta_bm_pool_use' was not declared. Should it be static?
drivers/net/ethernet/marvell/mvneta_bm.h:181:18: warning: symbol 'mvneta_bm_get' was not declared. Should it be static?
drivers/net/ethernet/marvell/mvneta_bm.h:182:6: warning: symbol 'mvneta_bm_put' was not declared. Should it be static?

Signed-off-by: Ben Dooks (Codethink) <ben.dooks@codethink.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Ben Dooks (Codethink) and committed by
David S. Miller
3f6b2c44 fa784f2a

+20 -12
+20 -12
drivers/net/ethernet/marvell/mvneta_bm.h
··· 160 160 (bm_pool->id << MVNETA_BM_POOL_ACCESS_OFFS)); 161 161 } 162 162 #else 163 - void mvneta_bm_pool_destroy(struct mvneta_bm *priv, 164 - struct mvneta_bm_pool *bm_pool, u8 port_map) {} 165 - void mvneta_bm_bufs_free(struct mvneta_bm *priv, struct mvneta_bm_pool *bm_pool, 166 - u8 port_map) {} 167 - int mvneta_bm_construct(struct hwbm_pool *hwbm_pool, void *buf) { return 0; } 168 - int mvneta_bm_pool_refill(struct mvneta_bm *priv, 169 - struct mvneta_bm_pool *bm_pool) {return 0; } 170 - struct mvneta_bm_pool *mvneta_bm_pool_use(struct mvneta_bm *priv, u8 pool_id, 171 - enum mvneta_bm_type type, u8 port_id, 172 - int pkt_size) { return NULL; } 163 + static inline void mvneta_bm_pool_destroy(struct mvneta_bm *priv, 164 + struct mvneta_bm_pool *bm_pool, 165 + u8 port_map) {} 166 + static inline void mvneta_bm_bufs_free(struct mvneta_bm *priv, 167 + struct mvneta_bm_pool *bm_pool, 168 + u8 port_map) {} 169 + static inline int mvneta_bm_construct(struct hwbm_pool *hwbm_pool, void *buf) 170 + { return 0; } 171 + static inline int mvneta_bm_pool_refill(struct mvneta_bm *priv, 172 + struct mvneta_bm_pool *bm_pool) 173 + { return 0; } 174 + static inline struct mvneta_bm_pool *mvneta_bm_pool_use(struct mvneta_bm *priv, 175 + u8 pool_id, 176 + enum mvneta_bm_type type, 177 + u8 port_id, 178 + int pkt_size) 179 + { return NULL; } 173 180 174 181 static inline void mvneta_bm_pool_put_bp(struct mvneta_bm *priv, 175 182 struct mvneta_bm_pool *bm_pool, ··· 185 178 static inline u32 mvneta_bm_pool_get_bp(struct mvneta_bm *priv, 186 179 struct mvneta_bm_pool *bm_pool) 187 180 { return 0; } 188 - struct mvneta_bm *mvneta_bm_get(struct device_node *node) { return NULL; } 189 - void mvneta_bm_put(struct mvneta_bm *priv) {} 181 + static inline struct mvneta_bm *mvneta_bm_get(struct device_node *node) 182 + { return NULL; } 183 + static inline void mvneta_bm_put(struct mvneta_bm *priv) {} 190 184 #endif /* CONFIG_MVNETA_BM */ 191 185 #endif