net: deprecate print_mac
Subsystems (2)
PATCH 1/1 net: deprecate print_mac
We've had %pM for long enough now, time to deprecate print_mac() and remove the __maybe_unused attribute from DECLARE_MAC_BUF so that variables declared with that can be found and removed. Otherwise people are putting in new users of print_mac().
---
On my tree, with three other patches I have submitted to gianfar, fcoe and wireless, there's now no user of DECLARE_MAC_BUF() left. I'm open to just killing it right away, but that seems like a pain to coordinate and would likely get merge conflicts, so this is much simpler and then killing it next cycle.
include/linux/if_ether.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/if_ether.h +2 -2
@@ -138,10 +138,10 @@ extern ssize_t sysfs_format_mac(char *bu/* * Display a 6 byte device address (MAC) in a readable format. */ -extern char *print_mac (char *buf,const unsigned char *addr); +extern char *print_mac (char *buf,const unsigned char *addr)__deprecated ;#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"#define MAC_BUF_SIZE 18 -#define DECLARE_MAC_BUF (var) char var[MAC_BUF_SIZE] __maybe_unused +#define DECLARE_MAC_BUF (var) char var[MAC_BUF_SIZE]#endif
David Miller
maintainerFrom: Johannes Berg <[email protected]>
Date: Wed, 15 Jul 2009 17:23:23 +0200
Quoted 6 lines
We've had %pM for long enough now, time to deprecate
print_mac()and remove the__maybe_unusedattribute fromDECLARE_MAC_BUFso that variables declared with that can be found and removed. Otherwise people are putting in new users ofprint_mac().
Quoted 8 lines
Signed-off-by Johannes Berg <[email protected]>---
On my tree, with three other patches I have submitted to gianfar, fcoe and wireless, there's now no user ofDECLARE_MAC_BUF()left. I'm open to just killing it right away, but that seems like a pain to coordinate and would likely get merge conflicts, so this is much simpler and then killing it next cycle.
I think I'm going to apply this after John's next
wireless merge to me for net-next-2.6
Quoted 11 lines · David Miller
From: Johannes Berg <[email protected]>
Date: Wed, 15 Jul 2009 17:23:23 +0200Quoted 5 lines
We've had %pM for long enough now, time to deprecate
print_mac()and remove the__maybe_unusedattribute fromDECLARE_MAC_BUFso that variables declared with that can be found and removed. Otherwise people are putting in new users ofprint_mac().I think I'm going to apply this after John's next
wireless merge to me for net-next-2.6
Sounds good. There was one more user in fcoe where I've sent the conversion to the scsi folks, here:
http://marc.info/?l=linux-scsi&m=124767208229782&w=2
johannes
David Miller
maintainerFrom: Johannes Berg <[email protected]>
Date: Wed, 15 Jul 2009 20:35:26 +0200
Quoted 3 lines
There was one more user in fcoe where I've sent the conversion to the scsi folks, here:
http://marc.info/?l=linux-scsi&m=124767208229782&w=2
Yep, I noticed that.
From: Johannes Berg <[email protected]>
Date: Wed, 15 Jul 2009 17:23:23 +0200
Quoted 7 lines
We've had %pM for long enough now, time to deprecate
print_mac()and remove the__maybe_unusedattribute fromDECLARE_MAC_BUFso that variables declared with that can be found and removed. Otherwise people are putting in new users ofprint_mac().Signed-off-by Johannes Berg <[email protected]>
Applied.