diff mbox series

[2/2] ethernet: atarilance: mark init function static

Message ID 20230810122528.1220434-2-arnd@kernel.org (mailing list archive)
State Accepted
Commit 7191c140faa2631dd28d382ec53fb94d47c170cc
Delegated to: Netdev Maintainers
Headers show
Series [1/2] ethernet: ldmvsw: mark ldmvsw_open() static | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 9 this patch: 9
netdev/cc_maintainers success CCed 9 of 9 maintainers
netdev/build_clang success Errors and warnings before: 9 this patch: 9
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 9 this patch: 9
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Arnd Bergmann Aug. 10, 2023, 12:25 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

The init function is only referenced locally, so it should be static to
avoid this warning:

drivers/net/ethernet/amd/atarilance.c:370:28: error: no previous prototype for 'atarilance_probe' [-Werror=missing-prototypes]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/amd/atarilance.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Yang Yingliang Aug. 10, 2023, 12:50 p.m. UTC | #1
On 2023/8/10 20:25, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The init function is only referenced locally, so it should be static to
> avoid this warning:
>
> drivers/net/ethernet/amd/atarilance.c:370:28: error: no previous prototype for 'atarilance_probe' [-Werror=missing-prototypes]
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Yang Yingliang <yangyingliang@huawei.com>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/amd/atarilance.c b/drivers/net/ethernet/amd/atarilance.c
index ec704222925d8..751454d305c64 100644
--- a/drivers/net/ethernet/amd/atarilance.c
+++ b/drivers/net/ethernet/amd/atarilance.c
@@ -367,7 +367,7 @@  static void *slow_memcpy( void *dst, const void *src, size_t len )
 }
 
 
-struct net_device * __init atarilance_probe(void)
+static struct net_device * __init atarilance_probe(void)
 {
 	int i;
 	static int found;