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

sfc/ethtool_common: Make some function to static

Fix sparse warning:

drivers/net/ethernet/sfc/ethtool_common.c
warning: symbol 'efx_fill_test' was not declared. Should it be static?
warning: symbol 'efx_fill_loopback_test' was not declared.
Should it be static?
warning: symbol 'efx_describe_per_queue_stats' was not declared.
Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
Reviewed-by: Martin Habets <mhabets@solarflare.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Zhang Xiaoxu and committed by
Jakub Kicinski
428cd523 e07c5f2e

+9 -8
+9 -8
drivers/net/ethernet/sfc/ethtool_common.c
··· 147 147 * 148 148 * Fill in an individual self-test entry. 149 149 */ 150 - void efx_fill_test(unsigned int test_index, u8 *strings, u64 *data, 151 - int *test, const char *unit_format, int unit_id, 152 - const char *test_format, const char *test_id) 150 + static void efx_fill_test(unsigned int test_index, u8 *strings, u64 *data, 151 + int *test, const char *unit_format, int unit_id, 152 + const char *test_format, const char *test_id) 153 153 { 154 154 char unit_str[ETH_GSTRING_LEN], test_str[ETH_GSTRING_LEN]; 155 155 ··· 189 189 * Fill in a block of loopback self-test entries. Return new test 190 190 * index. 191 191 */ 192 - int efx_fill_loopback_test(struct efx_nic *efx, 193 - struct efx_loopback_self_tests *lb_tests, 194 - enum efx_loopback_mode mode, 195 - unsigned int test_index, u8 *strings, u64 *data) 192 + static int efx_fill_loopback_test(struct efx_nic *efx, 193 + struct efx_loopback_self_tests *lb_tests, 194 + enum efx_loopback_mode mode, 195 + unsigned int test_index, 196 + u8 *strings, u64 *data) 196 197 { 197 198 struct efx_channel *channel = 198 199 efx_get_channel(efx, efx->tx_channel_offset); ··· 294 293 return n; 295 294 } 296 295 297 - size_t efx_describe_per_queue_stats(struct efx_nic *efx, u8 *strings) 296 + static size_t efx_describe_per_queue_stats(struct efx_nic *efx, u8 *strings) 298 297 { 299 298 size_t n_stats = 0; 300 299 struct efx_channel *channel;