Skip to contentSkip to conversation

Remove deprecated print_mac to fix warnings

PATCH In review Andi Kleen 3 participants 6 messages Dec 6, 2009

Subsystems (2)
lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

PATCH 1/1 Remove deprecated print_mac to fix warnings

Remove deprecated and unused print_mac to fix warnings

There seems to be no user in tree of print_mac left. So just remove it.

This eliminates two compiler warnings for every build, because gcc complains about the deprecated use of the symbol in its EXPORT_SYMBOL.

---
 include/linux/if_ether.h |    1 -
 net/ethernet/eth.c       |    7 -------
 2 files changed, 8 deletions(-)
include/linux/if_ether.h +0 -1
Index: linux-2.6.32-ak/include/linux/if_ether.h
===================================================================
@@ -139,7 +139,6 @@ 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) __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]
net/ethernet/eth.c +0 -7
Index: linux-2.6.32-ak/net/ethernet/eth.c
===================================================================
@@ -393,10 +393,3 @@ ssize_t sysfs_format_mac(char *buf, cons
 	return ((ssize_t) l);
 }
 EXPORT_SYMBOL(sysfs_format_mac);
-
-char *print_mac(char *buf, const unsigned char *addr)
-{
-	_format_mac_addr(buf, MAC_BUF_SIZE, addr, ETH_ALEN);
-	return buf;
-}
-EXPORT_SYMBOL(print_mac);
#1 lore raw
Quoted 1 line · Andi Kleen

Remove deprecated and unused print_mac to fix warnings

[]

include/linux/if_ether.h extern ssize_t sysfs_format_mac(char *bu · line 144

Quoted 10 lines
include/linux/if_ether.h +0 -1
@@ -139,7 +139,6 @@ 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) __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]

#define MAC_BUF_SIZE and #define DECLARE_MAC_BUF
should be removed as well.

maintainer
#2 lore raw
In reply to Andi Kleen

From: Andi Kleen <[email protected]>
Date: Sun, 6 Dec 2009 15:08:28 +0100

Quoted 8 lines

Remove deprecated and unused print_mac to fix warnings

There seems to be no user in tree of print_mac left. So just remove it.

This eliminates two compiler warnings for every build, because gcc complains about the deprecated use of the symbol in its EXPORT_SYMBOL.

davem@sunset:~/src/GIT/net-next-2.6$ git grep print_mac
davem@sunset:~/src/GIT/net-next-2.6$ 
author
#3 lore raw
Quoted 7 lines · David Miller

From: Andi Kleen <[email protected]>
Date: Sun, 6 Dec 2009 15:08:28 +0100

Quoted 4 lines

Remove deprecated and unused print_mac to fix warnings

There seems to be no user in tree of print_mac left. So just remove it.

Quoted 7 lines
Quoted 4 lines

This eliminates two compiler warnings for every build, because gcc complains about the deprecated use of the symbol in its EXPORT_SYMBOL.

davem@sunset:~/src/GIT/net-next-2.6$ git grep print_mac
davem@sunset:~/src/GIT/net-next-2.6$ 

Great. I grepped in linux-next, but perhaps I raced with you.

But could that please be fixed in a 2.6.32 stable too? the warnings on every build are annoying.

-Andi

Signature · 1 line
[email protected] -- Speaking for myself only.
maintainer
#4 lore raw

From: Andi Kleen <[email protected]>
Date: Sun, 6 Dec 2009 20:19:26 +0100

Quoted 11 lines · David Miller
Quoted 10 lines

From: Andi Kleen <[email protected]>
Date: Sun, 6 Dec 2009 15:08:28 +0100

Quoted 7 lines

Remove deprecated and unused print_mac to fix warnings

There seems to be no user in tree of print_mac left. So just remove it.

This eliminates two compiler warnings for every build, because gcc complains about the deprecated use of the symbol in its EXPORT_SYMBOL.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line
davem@sunset:~/src/GIT/net-next-2.6$ git grep print_mac
davem@sunset:~/src/GIT/net-next-2.6$ 

Great. I grepped in linux-next, but perhaps I raced with you.

It's been removed in net-next-2.6 for weeks.

Quoted 2 lines

But could that please be fixed in a 2.6.32 stable too? the warnings on every build are annoying.

Sorry, no.

author
#5 lore raw
Quoted 4 lines
Quoted 2 lines

But could that please be fixed in a 2.6.32 stable too? the warnings on every build are annoying.

Sorry, no.

Thanks. I'll remember that on every build.

-Andi