[PATCH] staging: ste_rmi4: remove redundant __func__ from debug prints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Hari Prasath Gujulan Elango <hgujulan@xxxxxxxxxxx>

This patch removes the redundant __func__ from dynamic debug prints as
the pr_xxx set of functions can be dynamically controlled to include
function name as well.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@xxxxxxxxxxx>
---
 drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 44 ++++++++++-----------------
 1 file changed, 16 insertions(+), 28 deletions(-)

diff --git a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c
index 0f524bb..8935800 100644
--- a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c
+++ b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c
@@ -244,8 +244,8 @@ retry:
 	if (retval != size) {
 		if (++retry_count == MAX_RETRY_COUNT)
 			dev_err(&i2c->dev,
-				"%s:address 0x%04x size %d failed:%d\n",
-					__func__, address, size, retval);
+				"address 0x%04x size %d failed:%d\n",
+					address, size, retval);
 		else {
 			synaptics_rmi4_set_page(pdata, address);
 			goto retry;
@@ -339,8 +339,7 @@ static int synpatics_rmi4_touchpad_report(struct synaptics_rmi4_data *pdata,
 	retval = synaptics_rmi4_i2c_block_read(pdata, data_base_addr, values,
 							finger_registers);
 	if (retval != finger_registers) {
-		dev_err(&client->dev, "%s:read status registers failed\n",
-								__func__);
+		dev_err(&client->dev, "read status registers failed\n");
 		return 0;
 	}
 	/*
@@ -371,8 +370,7 @@ static int synpatics_rmi4_touchpad_report(struct synaptics_rmi4_data *pdata,
 						data_offset, data,
 						data_reg_blk_size);
 			if (retval != data_reg_blk_size) {
-				dev_err(&client->dev, "%s:read data failed\n",
-								__func__);
+				dev_err(&client->dev, "read data failed\n");
 				return 0;
 			}
 			x = (data[0] << 4) | (data[2] & MASK_4BIT);
@@ -419,8 +417,7 @@ static int synaptics_rmi4_report_device(struct synaptics_rmi4_data *pdata,
 	if (rfi->fn_number != SYNAPTICS_RMI4_TOUCHPAD_FUNC_NUM) {
 		num_error_reports++;
 		if (num_error_reports < MAX_ERROR_REPORT)
-			dev_err(&client->dev, "%s:report not supported\n",
-								__func__);
+			dev_err(&client->dev, "report not supported\n");
 	} else
 		touch = synpatics_rmi4_touchpad_report(pdata, rfi);
 	return touch;
@@ -545,8 +542,7 @@ static int synpatics_rmi4_touchpad_detect(struct synaptics_rmi4_data *pdata,
 							queries,
 							sizeof(queries));
 	if (retval != sizeof(queries)) {
-		dev_err(&client->dev, "%s:read function query registers\n",
-							__func__);
+		dev_err(&client->dev, "read function query registers\n");
 		return retval;
 	}
 	/*
@@ -670,16 +666,14 @@ static int synaptics_rmi4_touchpad_config(struct synaptics_rmi4_data *pdata,
 						rfi->fn_desc.query_base_addr,
 						data, QUERY_LEN);
 	if (retval != QUERY_LEN)
-		dev_err(&client->dev, "%s:read query registers failed\n",
-								__func__);
+		dev_err(&client->dev, "read query registers failed\n");
 	else {
 		retval = synaptics_rmi4_i2c_block_read(pdata,
 						rfi->fn_desc.ctrl_base_addr,
 						data, DATA_BUF_LEN);
 		if (retval != DATA_BUF_LEN) {
 			dev_err(&client->dev,
-				"%s:read control registers failed\n",
-								__func__);
+				"read control registers failed\n");
 			return retval;
 		}
 		/* Store these for use later*/
@@ -727,7 +721,7 @@ static int synaptics_rmi4_i2c_query_device(struct synaptics_rmi4_data *pdata)
 						sizeof(rmi_fd));
 		if (retval != sizeof(rmi_fd)) {
 			/* failed to read next PDT entry */
-			dev_err(&client->dev, "%s: read error\n", __func__);
+			dev_err(&client->dev, "read error\n");
 			return -EIO;
 		}
 		rfi = NULL;
@@ -776,8 +770,7 @@ static int synaptics_rmi4_i2c_query_device(struct synaptics_rmi4_data *pdata)
 			 * A zero in the function number
 			 * signals the end of the PDT
 			 */
-			dev_dbg(&client->dev,
-				"%s:end of PDT\n", __func__);
+			dev_dbg(&client->dev, "end of PDT\n");
 			break;
 		}
 	}
@@ -799,8 +792,7 @@ static int synaptics_rmi4_i2c_query_device(struct synaptics_rmi4_data *pdata)
 					std_queries,
 					sizeof(std_queries));
 	if (retval != sizeof(std_queries)) {
-		dev_err(&client->dev, "%s:Failed reading queries\n",
-							__func__);
+		dev_err(&client->dev, "Failed reading queries\n");
 		 return -EIO;
 	}
 
@@ -847,8 +839,7 @@ static int synaptics_rmi4_i2c_query_device(struct synaptics_rmi4_data *pdata)
 						return retval;
 				} else
 					dev_err(&client->dev,
-						"%s:fn_number not supported\n",
-								__func__);
+						"fn_number not supported\n");
 				/*
 				 * Turn on interrupts for this
 				 * function's data sources.
@@ -919,15 +910,13 @@ static int synaptics_rmi4_probe
 
 	rmi4_data->regulator = regulator_get(&client->dev, "vdd");
 	if (IS_ERR(rmi4_data->regulator)) {
-		dev_err(&client->dev, "%s:get regulator failed\n",
-							__func__);
+		dev_err(&client->dev, "get regulator failed\n");
 		retval = PTR_ERR(rmi4_data->regulator);
 		goto err_get_regulator;
 	}
 	retval = regulator_enable(rmi4_data->regulator);
 	if (retval < 0) {
-		dev_err(&client->dev, "%s:regulator enable failed\n",
-							__func__);
+		dev_err(&client->dev, "regulator enable failed\n");
 		goto err_regulator_enable;
 	}
 	init_waitqueue_head(&rmi4_data->wait);
@@ -952,8 +941,7 @@ static int synaptics_rmi4_probe
 	 */
 	retval = synaptics_rmi4_i2c_query_device(rmi4_data);
 	if (retval) {
-		dev_err(&client->dev, "%s: rmi4 query device failed\n",
-							__func__);
+		dev_err(&client->dev, "rmi4 query device failed\n");
 		goto err_query_dev;
 	}
 
@@ -997,7 +985,7 @@ static int synaptics_rmi4_probe
 
 	retval = input_register_device(rmi4_data->input_dev);
 	if (retval) {
-		dev_err(&client->dev, "%s:input register failed\n", __func__);
+		dev_err(&client->dev, "input register failed\n");
 		goto err_free_irq;
 	}
 
-- 
1.9.1
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux