Skip to contentSkip to conversation

iio: accel: bmc150: Remove redundant __func__ in dev_dbg()

PATCH In review Andy Shevchenko 2 participants 2 messages Feb 22, 2018 – Feb 24, 2018 IIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: accel: bmc150: Remove redundant __func__ in dev_dbg()

Dynamic debug has a run time knob to enable function name printing. Remove this from dev_dbg() calls.

Furthermore, functional tracing when enabled can show what function is called, therefore remove empty dev_dbg() calls.

---
 drivers/iio/accel/bmc150-accel-core.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/iio/accel/bmc150-accel-core.c +1 -5
index 870f92ef61c2..208f2d9f0e8a 100644
@@ -336,8 +336,7 @@ static int bmc150_accel_update_slope(struct bmc150_accel_data *data)
 		return ret;
 	}
 
-	dev_dbg(dev, "%s: %x %x\n", __func__, data->slope_thres,
-		data->slope_dur);
+	dev_dbg(dev, "%x %x\n", data->slope_thres, data->slope_dur);
 
 	return ret;
 }
@@ -1716,7 +1715,6 @@ static int bmc150_accel_runtime_suspend(struct device *dev)
 	struct bmc150_accel_data *data = iio_priv(indio_dev);
 	int ret;
 
-	dev_dbg(dev,  __func__);
 	ret = bmc150_accel_set_mode(data, BMC150_ACCEL_SLEEP_MODE_SUSPEND, 0);
 	if (ret < 0)
 		return -EAGAIN;
@@ -1731,8 +1729,6 @@ static int bmc150_accel_runtime_resume(struct device *dev)
 	int ret;
 	int sleep_val;
 
-	dev_dbg(dev,  __func__);
-
 	ret = bmc150_accel_set_mode(data, BMC150_ACCEL_SLEEP_MODE_NORMAL, 0);
 	if (ret < 0)
 		return ret;
Signature · 1 line
2.16.1
maintainer
#1 lore raw
Quoted 7 lines · On Thu, 22 Feb 2018 20:58:58 +0200 Andy Shevchenko…

Dynamic debug has a run time knob to enable function name printing. Remove this from dev_dbg() calls.

Furthermore, functional tracing when enabled can show what function is called, therefore remove empty dev_dbg() calls.

Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it.

Thanks,

Jonathan

Quoted 35 lines
---
 drivers/iio/accel/bmc150-accel-core.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/iio/accel/bmc150-accel-core.c +1 -5
index 870f92ef61c2..208f2d9f0e8a 100644
@@ -336,8 +336,7 @@ static int bmc150_accel_update_slope(struct bmc150_accel_data *data)
 		return ret;
 	}
 
-	dev_dbg(dev, "%s: %x %x\n", __func__, data->slope_thres,
-		data->slope_dur);
+	dev_dbg(dev, "%x %x\n", data->slope_thres, data->slope_dur);
 
 	return ret;
 }
@@ -1716,7 +1715,6 @@ static int bmc150_accel_runtime_suspend(struct device *dev)
 	struct bmc150_accel_data *data = iio_priv(indio_dev);
 	int ret;
 
-	dev_dbg(dev,  __func__);
 	ret = bmc150_accel_set_mode(data, BMC150_ACCEL_SLEEP_MODE_SUSPEND, 0);
 	if (ret < 0)
 		return -EAGAIN;
@@ -1731,8 +1729,6 @@ static int bmc150_accel_runtime_resume(struct device *dev)
 	int ret;
 	int sleep_val;
 
-	dev_dbg(dev,  __func__);
-
 	ret = bmc150_accel_set_mode(data, BMC150_ACCEL_SLEEP_MODE_NORMAL, 0);
 	if (ret < 0)
 		return ret;