mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
[NET]: Elminate spurious print_mac() calls.
Patrick McHardy notes that print_mac() can get invoked even if the result it unused (f.e. as an argument to pr_debug() when DEBUG is not defined). Mark this function as "__pure" to eliminate this problem. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
988d0093f9
commit
8f789c4844
@ -129,7 +129,7 @@ extern ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len);
|
||||
/*
|
||||
* Display a 6 byte device address (MAC) in a readable format.
|
||||
*/
|
||||
extern char *print_mac(char *buf, const unsigned char *addr);
|
||||
extern __pure char *print_mac(char *buf, const unsigned char *addr);
|
||||
#define MAC_BUF_SIZE 18
|
||||
#define DECLARE_MAC_BUF(var) char var[MAC_BUF_SIZE] __maybe_unused
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user