Skip to content

Commit

Permalink
ehea: Use the standard logging functions
Browse files Browse the repository at this point in the history
Remove ehea_error, ehea_info and ehea_debug macros.
Use pr_fmt, pr_<level>, netdev_<level> and netif_<level> as appropriate.
Fix messages to use trailing "\n", some messages had an extra one
as the old ehea_<level> macros added a trailing "\n".
Coalesced long format strings.

Uncompiled/untested.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Breno Leitao<leitao@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Joe Perches authored and David S. Miller committed Dec 6, 2010
1 parent 7903264 commit 539995d
Show file tree
Hide file tree
Showing 5 changed files with 274 additions and 293 deletions.
13 changes: 0 additions & 13 deletions drivers/net/ehea/ehea.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,19 +130,6 @@

/* utility functions */

#define ehea_info(fmt, args...) \
printk(KERN_INFO DRV_NAME ": " fmt "\n", ## args)

#define ehea_error(fmt, args...) \
printk(KERN_ERR DRV_NAME ": Error in %s: " fmt "\n", __func__, ## args)

#ifdef DEBUG
#define ehea_debug(fmt, args...) \
printk(KERN_DEBUG DRV_NAME ": " fmt, ## args)
#else
#define ehea_debug(fmt, args...) do {} while (0)
#endif

void ehea_dump(void *adr, int len, char *msg);

#define EHEA_BMASK(pos, length) (((pos) << 16) + (length))
Expand Down
18 changes: 10 additions & 8 deletions drivers/net/ehea/ehea_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include "ehea.h"
#include "ehea_phyp.h"

Expand Down Expand Up @@ -118,10 +120,10 @@ static int ehea_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
ret = ehea_set_portspeed(port, sp);

if (!ret)
ehea_info("%s: Port speed successfully set: %dMbps "
"%s Duplex",
port->netdev->name, port->port_speed,
port->full_duplex == 1 ? "Full" : "Half");
netdev_info(dev,
"Port speed successfully set: %dMbps %s Duplex\n",
port->port_speed,
port->full_duplex == 1 ? "Full" : "Half");
out:
return ret;
}
Expand All @@ -134,10 +136,10 @@ static int ehea_nway_reset(struct net_device *dev)
ret = ehea_set_portspeed(port, EHEA_SPEED_AUTONEG);

if (!ret)
ehea_info("%s: Port speed successfully set: %dMbps "
"%s Duplex",
port->netdev->name, port->port_speed,
port->full_duplex == 1 ? "Full" : "Half");
netdev_info(port->netdev,
"Port speed successfully set: %dMbps %s Duplex\n",
port->port_speed,
port->full_duplex == 1 ? "Full" : "Half");
return ret;
}

Expand Down
Loading

0 comments on commit 539995d

Please sign in to comment.