diff mbox

net: deprecate print_mac

Message ID 1247671403.10754.8.camel@johannes.local
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Johannes Berg July 15, 2009, 3:23 p.m. UTC
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().

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
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(-)



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller July 15, 2009, 6:31 p.m. UTC | #1
From: Johannes Berg <johannes@sipsolutions.net>
Date: Wed, 15 Jul 2009 17:23:23 +0200

> 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().
> 
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> ---
> 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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Johannes Berg July 15, 2009, 6:35 p.m. UTC | #2
On Wed, 2009-07-15 at 11:31 -0700, David Miller wrote:
> From: Johannes Berg <johannes@sipsolutions.net>
> Date: Wed, 15 Jul 2009 17:23:23 +0200
> 
> > 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
David Miller July 15, 2009, 6:40 p.m. UTC | #3
From: Johannes Berg <johannes@sipsolutions.net>
Date: Wed, 15 Jul 2009 20:35:26 +0200

> 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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller July 27, 2009, 2:48 a.m. UTC | #4
From: Johannes Berg <johannes@sipsolutions.net>
Date: Wed, 15 Jul 2009 17:23:23 +0200

> 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().
> 
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- wireless-testing.orig/include/linux/if_ether.h	2009-07-15 17:13:31.000000000 +0200
+++ wireless-testing/include/linux/if_ether.h	2009-07-15 17:13:36.000000000 +0200
@@ -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