Skip to contentSkip to conversation

net: deprecate print_mac

PATCH Applied Johannes Berg 2 participants 5 messages Jul 15, 2009 – Jul 27, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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
 
maintainer
#1 lore raw

From: 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_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().

Quoted 8 lines

---
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.

I think I'm going to apply this after John's next
wireless merge to me for net-next-2.6

#2 lore raw
Quoted 11 lines · David Miller

From: Johannes Berg <[email protected]>
Date: Wed, 15 Jul 2009 17:23:23 +0200

Quoted 5 lines

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().

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