Commit 8c4877a4 authored by Joe Perches's avatar Joe Perches Committed by David S. Miller

ehea: Use the standard logging functions

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.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarBreno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 323e126f
...@@ -130,19 +130,6 @@ ...@@ -130,19 +130,6 @@
/* utility functions */ /* 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); void ehea_dump(void *adr, int len, char *msg);
#define EHEA_BMASK(pos, length) (((pos) << 16) + (length)) #define EHEA_BMASK(pos, length) (((pos) << 16) + (length))
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include "ehea.h" #include "ehea.h"
#include "ehea_phyp.h" #include "ehea_phyp.h"
...@@ -118,10 +120,10 @@ static int ehea_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) ...@@ -118,10 +120,10 @@ static int ehea_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
ret = ehea_set_portspeed(port, sp); ret = ehea_set_portspeed(port, sp);
if (!ret) if (!ret)
ehea_info("%s: Port speed successfully set: %dMbps " netdev_info(dev,
"%s Duplex", "Port speed successfully set: %dMbps %s Duplex\n",
port->netdev->name, port->port_speed, port->port_speed,
port->full_duplex == 1 ? "Full" : "Half"); port->full_duplex == 1 ? "Full" : "Half");
out: out:
return ret; return ret;
} }
...@@ -134,10 +136,10 @@ static int ehea_nway_reset(struct net_device *dev) ...@@ -134,10 +136,10 @@ static int ehea_nway_reset(struct net_device *dev)
ret = ehea_set_portspeed(port, EHEA_SPEED_AUTONEG); ret = ehea_set_portspeed(port, EHEA_SPEED_AUTONEG);
if (!ret) if (!ret)
ehea_info("%s: Port speed successfully set: %dMbps " netdev_info(port->netdev,
"%s Duplex", "Port speed successfully set: %dMbps %s Duplex\n",
port->netdev->name, port->port_speed, port->port_speed,
port->full_duplex == 1 ? "Full" : "Half"); port->full_duplex == 1 ? "Full" : "Half");
return ret; return ret;
} }
......
This diff is collapsed.
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include "ehea_phyp.h" #include "ehea_phyp.h"
...@@ -67,12 +69,11 @@ static long ehea_plpar_hcall_norets(unsigned long opcode, ...@@ -67,12 +69,11 @@ static long ehea_plpar_hcall_norets(unsigned long opcode,
} }
if (ret < H_SUCCESS) if (ret < H_SUCCESS)
ehea_error("opcode=%lx ret=%lx" pr_err("opcode=%lx ret=%lx"
" arg1=%lx arg2=%lx arg3=%lx arg4=%lx" " arg1=%lx arg2=%lx arg3=%lx arg4=%lx"
" arg5=%lx arg6=%lx arg7=%lx ", " arg5=%lx arg6=%lx arg7=%lx\n",
opcode, ret, opcode, ret,
arg1, arg2, arg3, arg4, arg5, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
arg6, arg7);
return ret; return ret;
} }
...@@ -114,19 +115,18 @@ static long ehea_plpar_hcall9(unsigned long opcode, ...@@ -114,19 +115,18 @@ static long ehea_plpar_hcall9(unsigned long opcode,
&& (((cb_cat == H_PORT_CB4) && ((arg3 == H_PORT_CB4_JUMBO) && (((cb_cat == H_PORT_CB4) && ((arg3 == H_PORT_CB4_JUMBO)
|| (arg3 == H_PORT_CB4_SPEED))) || ((cb_cat == H_PORT_CB7) || (arg3 == H_PORT_CB4_SPEED))) || ((cb_cat == H_PORT_CB7)
&& (arg3 == H_PORT_CB7_DUCQPN))))) && (arg3 == H_PORT_CB7_DUCQPN)))))
ehea_error("opcode=%lx ret=%lx" pr_err("opcode=%lx ret=%lx"
" arg1=%lx arg2=%lx arg3=%lx arg4=%lx" " arg1=%lx arg2=%lx arg3=%lx arg4=%lx"
" arg5=%lx arg6=%lx arg7=%lx arg8=%lx" " arg5=%lx arg6=%lx arg7=%lx arg8=%lx"
" arg9=%lx" " arg9=%lx"
" out1=%lx out2=%lx out3=%lx out4=%lx" " out1=%lx out2=%lx out3=%lx out4=%lx"
" out5=%lx out6=%lx out7=%lx out8=%lx" " out5=%lx out6=%lx out7=%lx out8=%lx"
" out9=%lx", " out9=%lx\n",
opcode, ret, opcode, ret,
arg1, arg2, arg3, arg4, arg5, arg1, arg2, arg3, arg4, arg5,
arg6, arg7, arg8, arg9, arg6, arg7, arg8, arg9,
outs[0], outs[1], outs[2], outs[3], outs[0], outs[1], outs[2], outs[3], outs[4],
outs[4], outs[5], outs[6], outs[7], outs[5], outs[6], outs[7], outs[8]);
outs[8]);
return ret; return ret;
} }
...@@ -515,7 +515,7 @@ u64 ehea_h_register_rpage_mr(const u64 adapter_handle, const u64 mr_handle, ...@@ -515,7 +515,7 @@ u64 ehea_h_register_rpage_mr(const u64 adapter_handle, const u64 mr_handle,
const u64 log_pageaddr, const u64 count) const u64 log_pageaddr, const u64 count)
{ {
if ((count > 1) && (log_pageaddr & ~PAGE_MASK)) { if ((count > 1) && (log_pageaddr & ~PAGE_MASK)) {
ehea_error("not on pageboundary"); pr_err("not on pageboundary\n");
return H_PARAMETER; return H_PARAMETER;
} }
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment