Revert "ehea: Use the standard logging functions"

This reverts commit 539995d18649023199986424d140f1d620372ce5.

As reported by Stephen Rothwell, this breaks the build.

Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/drivers/net/ehea/ehea_qmr.c b/drivers/net/ehea/ehea_qmr.c
index cd44bb8..89128b6 100644
--- a/drivers/net/ehea/ehea_qmr.c
+++ b/drivers/net/ehea/ehea_qmr.c
@@ -26,8 +26,6 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
 #include <linux/mm.h>
 #include <linux/slab.h>
 #include "ehea.h"
@@ -47,7 +45,7 @@
 		queue->current_q_offset -= queue->pagesize;
 		retvalue = NULL;
 	} else if (((u64) retvalue) & (EHEA_PAGESIZE-1)) {
-		pr_err("not on pageboundary\n");
+		ehea_error("not on pageboundary");
 		retvalue = NULL;
 	}
 	return retvalue;
@@ -60,15 +58,15 @@
 	int i, k;
 
 	if ((pagesize > PAGE_SIZE) || (!pages_per_kpage)) {
-		pr_err("pagesize conflict! kernel pagesize=%d, ehea pagesize=%d\n",
-		       (int)PAGE_SIZE, (int)pagesize);
+		ehea_error("pagesize conflict! kernel pagesize=%d, "
+			   "ehea pagesize=%d", (int)PAGE_SIZE, (int)pagesize);
 		return -EINVAL;
 	}
 
 	queue->queue_length = nr_of_pages * pagesize;
 	queue->queue_pages = kmalloc(nr_of_pages * sizeof(void *), GFP_KERNEL);
 	if (!queue->queue_pages) {
-		pr_err("no mem for queue_pages\n");
+		ehea_error("no mem for queue_pages");
 		return -ENOMEM;
 	}
 
@@ -132,7 +130,7 @@
 
 	cq = kzalloc(sizeof(*cq), GFP_KERNEL);
 	if (!cq) {
-		pr_err("no mem for cq\n");
+		ehea_error("no mem for cq");
 		goto out_nomem;
 	}
 
@@ -149,7 +147,7 @@
 	hret = ehea_h_alloc_resource_cq(adapter->handle, &cq->attr,
 					&cq->fw_handle, &cq->epas);
 	if (hret != H_SUCCESS) {
-		pr_err("alloc_resource_cq failed\n");
+		ehea_error("alloc_resource_cq failed");
 		goto out_freemem;
 	}
 
@@ -161,7 +159,7 @@
 	for (counter = 0; counter < cq->attr.nr_pages; counter++) {
 		vpage = hw_qpageit_get_inc(&cq->hw_queue);
 		if (!vpage) {
-			pr_err("hw_qpageit_get_inc failed\n");
+			ehea_error("hw_qpageit_get_inc failed");
 			goto out_kill_hwq;
 		}
 
@@ -170,8 +168,9 @@
 					     0, EHEA_CQ_REGISTER_ORIG,
 					     cq->fw_handle, rpage, 1);
 		if (hret < H_SUCCESS) {
-			pr_err("register_rpage_cq failed ehea_cq=%p hret=%llx counter=%i act_pages=%i\n",
-			       cq, hret, counter, cq->attr.nr_pages);
+			ehea_error("register_rpage_cq failed ehea_cq=%p "
+				   "hret=%llx counter=%i act_pages=%i",
+				   cq, hret, counter, cq->attr.nr_pages);
 			goto out_kill_hwq;
 		}
 
@@ -179,14 +178,14 @@
 			vpage = hw_qpageit_get_inc(&cq->hw_queue);
 
 			if ((hret != H_SUCCESS) || (vpage)) {
-				pr_err("registration of pages not complete hret=%llx\n",
-				       hret);
+				ehea_error("registration of pages not "
+					   "complete hret=%llx\n", hret);
 				goto out_kill_hwq;
 			}
 		} else {
 			if (hret != H_PAGE_REGISTERED) {
-				pr_err("CQ: registration of page failed hret=%llx\n",
-				       hret);
+				ehea_error("CQ: registration of page failed "
+					   "hret=%llx\n", hret);
 				goto out_kill_hwq;
 			}
 		}
@@ -242,7 +241,7 @@
 	}
 
 	if (hret != H_SUCCESS) {
-		pr_err("destroy CQ failed\n");
+		ehea_error("destroy CQ failed");
 		return -EIO;
 	}
 
@@ -260,7 +259,7 @@
 
 	eq = kzalloc(sizeof(*eq), GFP_KERNEL);
 	if (!eq) {
-		pr_err("no mem for eq\n");
+		ehea_error("no mem for eq");
 		return NULL;
 	}
 
@@ -273,21 +272,21 @@
 	hret = ehea_h_alloc_resource_eq(adapter->handle,
 					&eq->attr, &eq->fw_handle);
 	if (hret != H_SUCCESS) {
-		pr_err("alloc_resource_eq failed\n");
+		ehea_error("alloc_resource_eq failed");
 		goto out_freemem;
 	}
 
 	ret = hw_queue_ctor(&eq->hw_queue, eq->attr.nr_pages,
 			    EHEA_PAGESIZE, sizeof(struct ehea_eqe));
 	if (ret) {
-		pr_err("can't allocate eq pages\n");
+		ehea_error("can't allocate eq pages");
 		goto out_freeres;
 	}
 
 	for (i = 0; i < eq->attr.nr_pages; i++) {
 		vpage = hw_qpageit_get_inc(&eq->hw_queue);
 		if (!vpage) {
-			pr_err("hw_qpageit_get_inc failed\n");
+			ehea_error("hw_qpageit_get_inc failed");
 			hret = H_RESOURCE;
 			goto out_kill_hwq;
 		}
@@ -371,7 +370,7 @@
 	}
 
 	if (hret != H_SUCCESS) {
-		pr_err("destroy EQ failed\n");
+		ehea_error("destroy EQ failed");
 		return -EIO;
 	}
 
@@ -396,7 +395,7 @@
 	for (cnt = 0; cnt < nr_pages; cnt++) {
 		vpage = hw_qpageit_get_inc(hw_queue);
 		if (!vpage) {
-			pr_err("hw_qpageit_get_inc failed\n");
+			ehea_error("hw_qpageit_get_inc failed");
 			goto out_kill_hwq;
 		}
 		rpage = virt_to_abs(vpage);
@@ -404,7 +403,7 @@
 					     0, h_call_q_selector,
 					     qp->fw_handle, rpage, 1);
 		if (hret < H_SUCCESS) {
-			pr_err("register_rpage_qp failed\n");
+			ehea_error("register_rpage_qp failed");
 			goto out_kill_hwq;
 		}
 	}
@@ -433,7 +432,7 @@
 
 	qp = kzalloc(sizeof(*qp), GFP_KERNEL);
 	if (!qp) {
-		pr_err("no mem for qp\n");
+		ehea_error("no mem for qp");
 		return NULL;
 	}
 
@@ -442,7 +441,7 @@
 	hret = ehea_h_alloc_resource_qp(adapter->handle, init_attr, pd,
 					&qp->fw_handle, &qp->epas);
 	if (hret != H_SUCCESS) {
-		pr_err("ehea_h_alloc_resource_qp failed\n");
+		ehea_error("ehea_h_alloc_resource_qp failed");
 		goto out_freemem;
 	}
 
@@ -456,7 +455,7 @@
 				     init_attr->act_wqe_size_enc_sq, adapter,
 				     0);
 	if (ret) {
-		pr_err("can't register for sq ret=%x\n", ret);
+		ehea_error("can't register for sq ret=%x", ret);
 		goto out_freeres;
 	}
 
@@ -466,7 +465,7 @@
 				     init_attr->act_wqe_size_enc_rq1,
 				     adapter, 1);
 	if (ret) {
-		pr_err("can't register for rq1 ret=%x\n", ret);
+		ehea_error("can't register for rq1 ret=%x", ret);
 		goto out_kill_hwsq;
 	}
 
@@ -477,7 +476,7 @@
 					     init_attr->act_wqe_size_enc_rq2,
 					     adapter, 2);
 		if (ret) {
-			pr_err("can't register for rq2 ret=%x\n", ret);
+			ehea_error("can't register for rq2 ret=%x", ret);
 			goto out_kill_hwr1q;
 		}
 	}
@@ -489,7 +488,7 @@
 					     init_attr->act_wqe_size_enc_rq3,
 					     adapter, 3);
 		if (ret) {
-			pr_err("can't register for rq3 ret=%x\n", ret);
+			ehea_error("can't register for rq3 ret=%x", ret);
 			goto out_kill_hwr2q;
 		}
 	}
@@ -554,7 +553,7 @@
 	}
 
 	if (hret != H_SUCCESS) {
-		pr_err("destroy QP failed\n");
+		ehea_error("destroy QP failed");
 		return -EIO;
 	}
 
@@ -843,7 +842,7 @@
 		    (hret != H_PAGE_REGISTERED)) {
 			ehea_h_free_resource(adapter->handle, mr->handle,
 					     FORCE_FREE);
-			pr_err("register_rpage_mr failed\n");
+			ehea_error("register_rpage_mr failed");
 			return hret;
 		}
 	}
@@ -897,7 +896,7 @@
 
 	pt = (void *)get_zeroed_page(GFP_KERNEL);
 	if (!pt) {
-		pr_err("no mem\n");
+		ehea_error("no mem");
 		ret = -ENOMEM;
 		goto out;
 	}
@@ -907,14 +906,14 @@
 					&mr->handle, &mr->lkey);
 
 	if (hret != H_SUCCESS) {
-		pr_err("alloc_resource_mr failed\n");
+		ehea_error("alloc_resource_mr failed");
 		ret = -EIO;
 		goto out;
 	}
 
 	if (!ehea_bmap) {
 		ehea_h_free_resource(adapter->handle, mr->handle, FORCE_FREE);
-		pr_err("no busmap available\n");
+		ehea_error("no busmap available");
 		ret = -EIO;
 		goto out;
 	}
@@ -930,7 +929,7 @@
 
 	if (hret != H_SUCCESS) {
 		ehea_h_free_resource(adapter->handle, mr->handle, FORCE_FREE);
-		pr_err("registering mr failed\n");
+		ehea_error("registering mr failed");
 		ret = -EIO;
 		goto out;
 	}
@@ -953,7 +952,7 @@
 	hret = ehea_h_free_resource(mr->adapter->handle, mr->handle,
 				    FORCE_FREE);
 	if (hret != H_SUCCESS) {
-		pr_err("destroy MR failed\n");
+		ehea_error("destroy MR failed");
 		return -EIO;
 	}
 
@@ -988,14 +987,14 @@
 		length = EHEA_PAGESIZE;
 
 	if (type == EHEA_AER_RESTYPE_QP)
-		pr_err("QP (resource=%llX) state: AER=0x%llX, AERR=0x%llX, port=%llX\n",
-		       resource, data[6], data[12], data[22]);
+		ehea_error("QP (resource=%llX) state: AER=0x%llX, AERR=0x%llX, "
+			   "port=%llX", resource, data[6], data[12], data[22]);
 	else if (type == EHEA_AER_RESTYPE_CQ)
-		pr_err("CQ (resource=%llX) state: AER=0x%llX\n",
-		       resource, data[6]);
+		ehea_error("CQ (resource=%llX) state: AER=0x%llX", resource,
+			   data[6]);
 	else if (type == EHEA_AER_RESTYPE_EQ)
-		pr_err("EQ (resource=%llX) state: AER=0x%llX\n",
-		       resource, data[6]);
+		ehea_error("EQ (resource=%llX) state: AER=0x%llX", resource,
+			   data[6]);
 
 	ehea_dump(data, length, "error data");
 }
@@ -1009,7 +1008,7 @@
 
 	rblock = (void *)get_zeroed_page(GFP_KERNEL);
 	if (!rblock) {
-		pr_err("Cannot allocate rblock memory\n");
+		ehea_error("Cannot allocate rblock memory.");
 		goto out;
 	}
 
@@ -1021,9 +1020,9 @@
 		*aerr = rblock[12];
 		print_error_data(rblock);
 	} else if (ret == H_R_STATE) {
-		pr_err("No error data available: %llX\n", res_handle);
+		ehea_error("No error data available: %llX.", res_handle);
 	} else
-		pr_err("Error data could not be fetched: %llX\n", res_handle);
+		ehea_error("Error data could not be fetched: %llX", res_handle);
 
 	free_page((unsigned long)rblock);
 out: