ehea: Use the standard logging functions
[pandora-kernel.git] / drivers / net / ehea / ehea_phyp.c
index 2a33a61..0506967 100644 (file)
@@ -26,6 +26,8 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include "ehea_phyp.h"
 
 
@@ -67,12 +69,11 @@ static long ehea_plpar_hcall_norets(unsigned long opcode,
                }
 
                if (ret < H_SUCCESS)
-                       ehea_error("opcode=%lx ret=%lx"
-                                  " arg1=%lx arg2=%lx arg3=%lx arg4=%lx"
-                                  " arg5=%lx arg6=%lx arg7=%lx ",
-                                  opcode, ret,
-                                  arg1, arg2, arg3, arg4, arg5,
-                                  arg6, arg7);
+                       pr_err("opcode=%lx ret=%lx"
+                              " arg1=%lx arg2=%lx arg3=%lx arg4=%lx"
+                              " arg5=%lx arg6=%lx arg7=%lx\n",
+                              opcode, ret,
+                              arg1, arg2, arg3, arg4, arg5, arg6, arg7);
 
                return ret;
        }
@@ -114,19 +115,18 @@ static long ehea_plpar_hcall9(unsigned long opcode,
                    && (((cb_cat == H_PORT_CB4) && ((arg3 == H_PORT_CB4_JUMBO)
                    || (arg3 == H_PORT_CB4_SPEED))) || ((cb_cat == H_PORT_CB7)
                    && (arg3 == H_PORT_CB7_DUCQPN)))))
-                       ehea_error("opcode=%lx ret=%lx"
-                                  " arg1=%lx arg2=%lx arg3=%lx arg4=%lx"
-                                  " arg5=%lx arg6=%lx arg7=%lx arg8=%lx"
-                                  " arg9=%lx"
-                                  " out1=%lx out2=%lx out3=%lx out4=%lx"
-                                  " out5=%lx out6=%lx out7=%lx out8=%lx"
-                                  " out9=%lx",
-                                  opcode, ret,
-                                  arg1, arg2, arg3, arg4, arg5,
-                                  arg6, arg7, arg8, arg9,
-                                  outs[0], outs[1], outs[2], outs[3],
-                                  outs[4], outs[5], outs[6], outs[7],
-                                  outs[8]);
+                       pr_err("opcode=%lx ret=%lx"
+                              " arg1=%lx arg2=%lx arg3=%lx arg4=%lx"
+                              " arg5=%lx arg6=%lx arg7=%lx arg8=%lx"
+                              " arg9=%lx"
+                              " out1=%lx out2=%lx out3=%lx out4=%lx"
+                              " out5=%lx out6=%lx out7=%lx out8=%lx"
+                              " out9=%lx\n",
+                              opcode, ret,
+                              arg1, arg2, arg3, arg4, arg5,
+                              arg6, arg7, arg8, arg9,
+                              outs[0], outs[1], outs[2], outs[3], outs[4],
+                              outs[5], outs[6], outs[7], outs[8]);
                return ret;
        }
 
@@ -214,7 +214,7 @@ u64 ehea_h_alloc_resource_qp(const u64 adapter_handle,
                             u64 *qp_handle, struct h_epas *h_epas)
 {
        u64 hret;
-       u64 outs[PLPAR_HCALL9_BUFSIZE];
+       unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
        u64 allocate_controls =
            EHEA_BMASK_SET(H_ALL_RES_QP_EQPO, init_attr->low_lat_rq1 ? 1 : 0)
@@ -312,7 +312,7 @@ u64 ehea_h_alloc_resource_cq(const u64 adapter_handle,
                             u64 *cq_handle, struct h_epas *epas)
 {
        u64 hret;
-       u64 outs[PLPAR_HCALL9_BUFSIZE];
+       unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
        hret = ehea_plpar_hcall9(H_ALLOC_HEA_RESOURCE,
                                 outs,
@@ -374,7 +374,7 @@ u64 ehea_h_alloc_resource_eq(const u64 adapter_handle,
                             struct ehea_eq_attr *eq_attr, u64 *eq_handle)
 {
        u64 hret, allocate_controls;
-       u64 outs[PLPAR_HCALL9_BUFSIZE];
+       unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
        /* resource type */
        allocate_controls =
@@ -407,7 +407,7 @@ u64 ehea_h_modify_ehea_qp(const u64 adapter_handle, const u8 cat,
                          u16 *out_swr, u16 *out_rwr)
 {
        u64 hret;
-       u64 outs[PLPAR_HCALL9_BUFSIZE];
+       unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
        hret = ehea_plpar_hcall9(H_MODIFY_HEA_QP,
                                 outs,
@@ -449,7 +449,7 @@ u64 ehea_h_register_smr(const u64 adapter_handle, const u64 orig_mr_handle,
                        struct ehea_mr *mr)
 {
        u64 hret;
-       u64 outs[PLPAR_HCALL9_BUFSIZE];
+       unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
        hret = ehea_plpar_hcall9(H_REGISTER_SMR,
                                 outs,
@@ -468,7 +468,7 @@ u64 ehea_h_register_smr(const u64 adapter_handle, const u64 orig_mr_handle,
 
 u64 ehea_h_disable_and_get_hea(const u64 adapter_handle, const u64 qp_handle)
 {
-       u64 outs[PLPAR_HCALL9_BUFSIZE];
+       unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
        return ehea_plpar_hcall9(H_DISABLE_AND_GET_HEA,
                                 outs,
@@ -493,7 +493,7 @@ u64 ehea_h_alloc_resource_mr(const u64 adapter_handle, const u64 vaddr,
                             const u32 pd, u64 *mr_handle, u32 *lkey)
 {
        u64 hret;
-       u64 outs[PLPAR_HCALL9_BUFSIZE];
+       unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
        hret = ehea_plpar_hcall9(H_ALLOC_HEA_RESOURCE,
                                 outs,
@@ -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)
 {
        if ((count > 1) && (log_pageaddr & ~PAGE_MASK)) {
-               ehea_error("not on pageboundary");
+               pr_err("not on pageboundary\n");
                return H_PARAMETER;
        }
 
@@ -564,7 +564,7 @@ u64 ehea_h_modify_ehea_port(const u64 adapter_handle, const u16 port_num,
                            const u8 cb_cat, const u64 select_mask,
                            void *cb_addr)
 {
-       u64 outs[PLPAR_HCALL9_BUFSIZE];
+       unsigned long outs[PLPAR_HCALL9_BUFSIZE];
        u64 port_info;
        u64 arr_index = 0;
        u64 cb_logaddr = virt_to_abs(cb_addr);