All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtc: max77686: Cleanup and reduce dmesg output
@ 2016-01-27  6:46 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2016-01-27  6:46 UTC (permalink / raw)
  To: Chanwoo Choi, Krzysztof Kozlowski, Alessandro Zummo,
	Alexandre Belloni, linux-kernel, rtc-linux,
	Javier Martinez Canillas
  Cc: Andi Shyti, Laxman Dewangan

Cleanup of entire driver of its dmesg output:
1. Remove printing of the function name, because printing device name is
   sufficient. This also makes the dev_err()-like functions more compact
   and readable (not need of line break).
2. Lower from info to debug printing of each RTC interrupt (no need to
   make noise on each alarm).
3. Remove dev_info() at beginning of probe because a message is already
   always printed by either probe failure or from registering the RTC
   device as /dev/rtcX.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

---

Patch rebased on top of Javier's v4:
[PATCH v4 00/10] rtc: max77686: Extend driver and add max77802 support
http://www.spinics.net/lists/arm-kernel/msg477194.html

Feel free to join with these series.
---
 drivers/rtc/rtc-max77686.c | 39 ++++++++++++++-------------------------
 1 file changed, 14 insertions(+), 25 deletions(-)

diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c
index da47b1d85793..5a03e1ecad83 100644
--- a/drivers/rtc/rtc-max77686.c
+++ b/drivers/rtc/rtc-max77686.c
@@ -271,8 +271,8 @@ static int max77686_rtc_update(struct max77686_rtc_info *info,
 				 info->drv_data->map[REG_RTC_UPDATE0],
 				 data, data);
 	if (ret < 0)
-		dev_err(info->dev, "%s: fail to write update reg(ret=%d, data=0x%x)\n",
-				__func__, ret, data);
+		dev_err(info->dev, "Fail to write update reg(ret=%d, data=0x%x)\n",
+			ret, data);
 	else {
 		/* Minimum delay required before RTC update. */
 		usleep_range(delay, delay * 2);
@@ -297,7 +297,7 @@ static int max77686_rtc_read_time(struct device *dev, struct rtc_time *tm)
 			       info->drv_data->map[REG_RTC_SEC],
 			       data, ARRAY_SIZE(data));
 	if (ret < 0) {
-		dev_err(info->dev, "%s: fail to read time reg(%d)\n", __func__,	ret);
+		dev_err(info->dev, "Fail to read time reg(%d)\n", ret);
 		goto out;
 	}
 
@@ -326,8 +326,7 @@ static int max77686_rtc_set_time(struct device *dev, struct rtc_time *tm)
 				info->drv_data->map[REG_RTC_SEC],
 				data, ARRAY_SIZE(data));
 	if (ret < 0) {
-		dev_err(info->dev, "%s: fail to write time reg(%d)\n", __func__,
-				ret);
+		dev_err(info->dev, "Fail to write time reg(%d)\n", ret);
 		goto out;
 	}
 
@@ -355,8 +354,7 @@ static int max77686_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
 	ret = regmap_bulk_read(info->max77686->rtc_regmap,
 			       map[REG_ALARM1_SEC], data, ARRAY_SIZE(data));
 	if (ret < 0) {
-		dev_err(info->dev, "%s:%d fail to read alarm reg(%d)\n",
-				__func__, __LINE__, ret);
+		dev_err(info->dev, "Fail to read alarm reg(%d)\n", ret);
 		goto out;
 	}
 
@@ -394,8 +392,7 @@ static int max77686_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
 	alrm->pending = 0;
 	ret = regmap_read(info->max77686->regmap, MAX77686_REG_STATUS2, &val);
 	if (ret < 0) {
-		dev_err(info->dev, "%s:%d fail to read status2 reg(%d)\n",
-				__func__, __LINE__, ret);
+		dev_err(info->dev, "Fail to read status2 reg(%d)\n", ret);
 		goto out;
 	}
 
@@ -426,8 +423,7 @@ static int max77686_rtc_stop_alarm(struct max77686_rtc_info *info)
 				       map[REG_ALARM1_SEC], data,
 				       ARRAY_SIZE(data));
 		if (ret < 0) {
-			dev_err(info->dev, "%s: fail to read alarm reg(%d)\n",
-				__func__, ret);
+			dev_err(info->dev, "Fail to read alarm reg(%d)\n", ret);
 			goto out;
 		}
 
@@ -452,8 +448,7 @@ static int max77686_rtc_stop_alarm(struct max77686_rtc_info *info)
 	}
 
 	if (ret < 0) {
-		dev_err(info->dev, "%s: fail to write alarm reg(%d)\n",
-				__func__, ret);
+		dev_err(info->dev, "Fail to write alarm reg(%d)\n", ret);
 		goto out;
 	}
 
@@ -481,8 +476,7 @@ static int max77686_rtc_start_alarm(struct max77686_rtc_info *info)
 				       map[REG_ALARM1_SEC], data,
 				       ARRAY_SIZE(data));
 		if (ret < 0) {
-			dev_err(info->dev, "%s: fail to read alarm reg(%d)\n",
-				__func__, ret);
+			dev_err(info->dev, "Fail to read alarm reg(%d)\n", ret);
 			goto out;
 		}
 
@@ -508,8 +502,7 @@ static int max77686_rtc_start_alarm(struct max77686_rtc_info *info)
 	}
 
 	if (ret < 0) {
-		dev_err(info->dev, "%s: fail to write alarm reg(%d)\n",
-				__func__, ret);
+		dev_err(info->dev, "Fail to write alarm reg(%d)\n", ret);
 		goto out;
 	}
 
@@ -539,8 +532,7 @@ static int max77686_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
 				data, ARRAY_SIZE(data));
 
 	if (ret < 0) {
-		dev_err(info->dev, "%s: fail to write alarm reg(%d)\n",
-				__func__, ret);
+		dev_err(info->dev, "Fail to write alarm reg(%d)\n", ret);
 		goto out;
 	}
 
@@ -575,7 +567,7 @@ static irqreturn_t max77686_rtc_alarm_irq(int irq, void *data)
 {
 	struct max77686_rtc_info *info = data;
 
-	dev_info(info->dev, "%s:irq(%d)\n", __func__, irq);
+	dev_dbg(info->dev, "RTC alarm IRQ: %d\n", irq);
 
 	rtc_update_irq(info->rtc_dev, 1, RTC_IRQF | RTC_AF);
 
@@ -605,8 +597,7 @@ static int max77686_rtc_init_reg(struct max77686_rtc_info *info)
 				info->drv_data->map[REG_RTC_CONTROLM],
 				data, ARRAY_SIZE(data));
 	if (ret < 0) {
-		dev_err(info->dev, "%s: fail to write controlm reg(%d)\n",
-				__func__, ret);
+		dev_err(info->dev, "Fail to write controlm reg(%d)\n", ret);
 		return ret;
 	}
 
@@ -621,8 +612,6 @@ static int max77686_rtc_probe(struct platform_device *pdev)
 	const struct platform_device_id *id = platform_get_device_id(pdev);
 	int ret;
 
-	dev_info(&pdev->dev, "%s\n", __func__);
-
 	info = devm_kzalloc(&pdev->dev, sizeof(struct max77686_rtc_info),
 				GFP_KERNEL);
 	if (!info)
@@ -662,7 +651,7 @@ static int max77686_rtc_probe(struct platform_device *pdev)
 
 	if (!max77686->rtc_irq_data) {
 		ret = -EINVAL;
-		dev_err(&pdev->dev, "%s: no RTC regmap IRQ chip\n", __func__);
+		dev_err(&pdev->dev, "No RTC regmap IRQ chip\n");
 		goto err_rtc;
 	}
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [rtc-linux] [PATCH] rtc: max77686: Cleanup and reduce dmesg output
@ 2016-01-27  6:46 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2016-01-27  6:46 UTC (permalink / raw)
  To: Chanwoo Choi, Krzysztof Kozlowski, Alessandro Zummo,
	Alexandre Belloni, linux-kernel, rtc-linux,
	Javier Martinez Canillas
  Cc: Andi Shyti, Laxman Dewangan

Cleanup of entire driver of its dmesg output:
1. Remove printing of the function name, because printing device name is
   sufficient. This also makes the dev_err()-like functions more compact
   and readable (not need of line break).
2. Lower from info to debug printing of each RTC interrupt (no need to
   make noise on each alarm).
3. Remove dev_info() at beginning of probe because a message is already
   always printed by either probe failure or from registering the RTC
   device as /dev/rtcX.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

---

Patch rebased on top of Javier's v4:
[PATCH v4 00/10] rtc: max77686: Extend driver and add max77802 support
http://www.spinics.net/lists/arm-kernel/msg477194.html

Feel free to join with these series.
---
 drivers/rtc/rtc-max77686.c | 39 ++++++++++++++-------------------------
 1 file changed, 14 insertions(+), 25 deletions(-)

diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c
index da47b1d85793..5a03e1ecad83 100644
--- a/drivers/rtc/rtc-max77686.c
+++ b/drivers/rtc/rtc-max77686.c
@@ -271,8 +271,8 @@ static int max77686_rtc_update(struct max77686_rtc_info *info,
 				 info->drv_data->map[REG_RTC_UPDATE0],
 				 data, data);
 	if (ret < 0)
-		dev_err(info->dev, "%s: fail to write update reg(ret=%d, data=0x%x)\n",
-				__func__, ret, data);
+		dev_err(info->dev, "Fail to write update reg(ret=%d, data=0x%x)\n",
+			ret, data);
 	else {
 		/* Minimum delay required before RTC update. */
 		usleep_range(delay, delay * 2);
@@ -297,7 +297,7 @@ static int max77686_rtc_read_time(struct device *dev, struct rtc_time *tm)
 			       info->drv_data->map[REG_RTC_SEC],
 			       data, ARRAY_SIZE(data));
 	if (ret < 0) {
-		dev_err(info->dev, "%s: fail to read time reg(%d)\n", __func__,	ret);
+		dev_err(info->dev, "Fail to read time reg(%d)\n", ret);
 		goto out;
 	}
 
@@ -326,8 +326,7 @@ static int max77686_rtc_set_time(struct device *dev, struct rtc_time *tm)
 				info->drv_data->map[REG_RTC_SEC],
 				data, ARRAY_SIZE(data));
 	if (ret < 0) {
-		dev_err(info->dev, "%s: fail to write time reg(%d)\n", __func__,
-				ret);
+		dev_err(info->dev, "Fail to write time reg(%d)\n", ret);
 		goto out;
 	}
 
@@ -355,8 +354,7 @@ static int max77686_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
 	ret = regmap_bulk_read(info->max77686->rtc_regmap,
 			       map[REG_ALARM1_SEC], data, ARRAY_SIZE(data));
 	if (ret < 0) {
-		dev_err(info->dev, "%s:%d fail to read alarm reg(%d)\n",
-				__func__, __LINE__, ret);
+		dev_err(info->dev, "Fail to read alarm reg(%d)\n", ret);
 		goto out;
 	}
 
@@ -394,8 +392,7 @@ static int max77686_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
 	alrm->pending = 0;
 	ret = regmap_read(info->max77686->regmap, MAX77686_REG_STATUS2, &val);
 	if (ret < 0) {
-		dev_err(info->dev, "%s:%d fail to read status2 reg(%d)\n",
-				__func__, __LINE__, ret);
+		dev_err(info->dev, "Fail to read status2 reg(%d)\n", ret);
 		goto out;
 	}
 
@@ -426,8 +423,7 @@ static int max77686_rtc_stop_alarm(struct max77686_rtc_info *info)
 				       map[REG_ALARM1_SEC], data,
 				       ARRAY_SIZE(data));
 		if (ret < 0) {
-			dev_err(info->dev, "%s: fail to read alarm reg(%d)\n",
-				__func__, ret);
+			dev_err(info->dev, "Fail to read alarm reg(%d)\n", ret);
 			goto out;
 		}
 
@@ -452,8 +448,7 @@ static int max77686_rtc_stop_alarm(struct max77686_rtc_info *info)
 	}
 
 	if (ret < 0) {
-		dev_err(info->dev, "%s: fail to write alarm reg(%d)\n",
-				__func__, ret);
+		dev_err(info->dev, "Fail to write alarm reg(%d)\n", ret);
 		goto out;
 	}
 
@@ -481,8 +476,7 @@ static int max77686_rtc_start_alarm(struct max77686_rtc_info *info)
 				       map[REG_ALARM1_SEC], data,
 				       ARRAY_SIZE(data));
 		if (ret < 0) {
-			dev_err(info->dev, "%s: fail to read alarm reg(%d)\n",
-				__func__, ret);
+			dev_err(info->dev, "Fail to read alarm reg(%d)\n", ret);
 			goto out;
 		}
 
@@ -508,8 +502,7 @@ static int max77686_rtc_start_alarm(struct max77686_rtc_info *info)
 	}
 
 	if (ret < 0) {
-		dev_err(info->dev, "%s: fail to write alarm reg(%d)\n",
-				__func__, ret);
+		dev_err(info->dev, "Fail to write alarm reg(%d)\n", ret);
 		goto out;
 	}
 
@@ -539,8 +532,7 @@ static int max77686_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
 				data, ARRAY_SIZE(data));
 
 	if (ret < 0) {
-		dev_err(info->dev, "%s: fail to write alarm reg(%d)\n",
-				__func__, ret);
+		dev_err(info->dev, "Fail to write alarm reg(%d)\n", ret);
 		goto out;
 	}
 
@@ -575,7 +567,7 @@ static irqreturn_t max77686_rtc_alarm_irq(int irq, void *data)
 {
 	struct max77686_rtc_info *info = data;
 
-	dev_info(info->dev, "%s:irq(%d)\n", __func__, irq);
+	dev_dbg(info->dev, "RTC alarm IRQ: %d\n", irq);
 
 	rtc_update_irq(info->rtc_dev, 1, RTC_IRQF | RTC_AF);
 
@@ -605,8 +597,7 @@ static int max77686_rtc_init_reg(struct max77686_rtc_info *info)
 				info->drv_data->map[REG_RTC_CONTROLM],
 				data, ARRAY_SIZE(data));
 	if (ret < 0) {
-		dev_err(info->dev, "%s: fail to write controlm reg(%d)\n",
-				__func__, ret);
+		dev_err(info->dev, "Fail to write controlm reg(%d)\n", ret);
 		return ret;
 	}
 
@@ -621,8 +612,6 @@ static int max77686_rtc_probe(struct platform_device *pdev)
 	const struct platform_device_id *id = platform_get_device_id(pdev);
 	int ret;
 
-	dev_info(&pdev->dev, "%s\n", __func__);
-
 	info = devm_kzalloc(&pdev->dev, sizeof(struct max77686_rtc_info),
 				GFP_KERNEL);
 	if (!info)
@@ -662,7 +651,7 @@ static int max77686_rtc_probe(struct platform_device *pdev)
 
 	if (!max77686->rtc_irq_data) {
 		ret = -EINVAL;
-		dev_err(&pdev->dev, "%s: no RTC regmap IRQ chip\n", __func__);
+		dev_err(&pdev->dev, "No RTC regmap IRQ chip\n");
 		goto err_rtc;
 	}
 
-- 
1.9.1

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] rtc: max77686: Cleanup and reduce dmesg output
  2016-01-27  6:46 ` [rtc-linux] " Krzysztof Kozlowski
@ 2016-01-28  0:00   ` Javier Martinez Canillas
  -1 siblings, 0 replies; 7+ messages in thread
From: Javier Martinez Canillas @ 2016-01-28  0:00 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Chanwoo Choi, Alessandro Zummo,
	Alexandre Belloni, linux-kernel, rtc-linux
  Cc: Andi Shyti, Laxman Dewangan

Hello Krzysztof,

On 01/27/2016 03:46 AM, Krzysztof Kozlowski wrote:
> Cleanup of entire driver of its dmesg output:
> 1. Remove printing of the function name, because printing device name is
>     sufficient. This also makes the dev_err()-like functions more compact
>     and readable (not need of line break).
> 2. Lower from info to debug printing of each RTC interrupt (no need to
>     make noise on each alarm).
> 3. Remove dev_info() at beginning of probe because a message is already
>     always printed by either probe failure or from registering the RTC
>     device as /dev/rtcX.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
>

Patch looks good to me.

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [rtc-linux] Re: [PATCH] rtc: max77686: Cleanup and reduce dmesg output
@ 2016-01-28  0:00   ` Javier Martinez Canillas
  0 siblings, 0 replies; 7+ messages in thread
From: Javier Martinez Canillas @ 2016-01-28  0:00 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Chanwoo Choi, Alessandro Zummo,
	Alexandre Belloni, linux-kernel, rtc-linux
  Cc: Andi Shyti, Laxman Dewangan

Hello Krzysztof,

On 01/27/2016 03:46 AM, Krzysztof Kozlowski wrote:
> Cleanup of entire driver of its dmesg output:
> 1. Remove printing of the function name, because printing device name is
>     sufficient. This also makes the dev_err()-like functions more compact
>     and readable (not need of line break).
> 2. Lower from info to debug printing of each RTC interrupt (no need to
>     make noise on each alarm).
> 3. Remove dev_info() at beginning of probe because a message is already
>     always printed by either probe failure or from registering the RTC
>     device as /dev/rtcX.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
>

Patch looks good to me.

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] rtc: max77686: Cleanup and reduce dmesg output
  2016-01-27  6:46 ` [rtc-linux] " Krzysztof Kozlowski
@ 2016-01-28  1:15   ` Andi Shyti
  -1 siblings, 0 replies; 7+ messages in thread
From: Andi Shyti @ 2016-01-28  1:15 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Chanwoo Choi, Alessandro Zummo, Alexandre Belloni, linux-kernel,
	rtc-linux, Javier Martinez Canillas, Laxman Dewangan

On Wed, Jan 27, 2016 at 03:46:11PM +0900, Krzysztof Kozlowski wrote:
> Cleanup of entire driver of its dmesg output:
> 1. Remove printing of the function name, because printing device name is
>    sufficient. This also makes the dev_err()-like functions more compact
>    and readable (not need of line break).
> 2. Lower from info to debug printing of each RTC interrupt (no need to
>    make noise on each alarm).
> 3. Remove dev_info() at beginning of probe because a message is already
>    always printed by either probe failure or from registering the RTC
>    device as /dev/rtcX.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Looks good, Reviewed-by: Andi Shyti <andi.shyti@samsung.com>

> ---
> 
> Patch rebased on top of Javier's v4:
> [PATCH v4 00/10] rtc: max77686: Extend driver and add max77802 support
> http://www.spinics.net/lists/arm-kernel/msg477194.html
> 
> Feel free to join with these series.
> ---
>  drivers/rtc/rtc-max77686.c | 39 ++++++++++++++-------------------------
>  1 file changed, 14 insertions(+), 25 deletions(-)
> 
> diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c
> index da47b1d85793..5a03e1ecad83 100644
> --- a/drivers/rtc/rtc-max77686.c
> +++ b/drivers/rtc/rtc-max77686.c
> @@ -271,8 +271,8 @@ static int max77686_rtc_update(struct max77686_rtc_info *info,
>  				 info->drv_data->map[REG_RTC_UPDATE0],
>  				 data, data);
>  	if (ret < 0)
> -		dev_err(info->dev, "%s: fail to write update reg(ret=%d, data=0x%x)\n",
> -				__func__, ret, data);
> +		dev_err(info->dev, "Fail to write update reg(ret=%d, data=0x%x)\n",
> +			ret, data);
>  	else {
>  		/* Minimum delay required before RTC update. */
>  		usleep_range(delay, delay * 2);
> @@ -297,7 +297,7 @@ static int max77686_rtc_read_time(struct device *dev, struct rtc_time *tm)
>  			       info->drv_data->map[REG_RTC_SEC],
>  			       data, ARRAY_SIZE(data));
>  	if (ret < 0) {
> -		dev_err(info->dev, "%s: fail to read time reg(%d)\n", __func__,	ret);
> +		dev_err(info->dev, "Fail to read time reg(%d)\n", ret);
>  		goto out;
>  	}
>  
> @@ -326,8 +326,7 @@ static int max77686_rtc_set_time(struct device *dev, struct rtc_time *tm)
>  				info->drv_data->map[REG_RTC_SEC],
>  				data, ARRAY_SIZE(data));
>  	if (ret < 0) {
> -		dev_err(info->dev, "%s: fail to write time reg(%d)\n", __func__,
> -				ret);
> +		dev_err(info->dev, "Fail to write time reg(%d)\n", ret);
>  		goto out;
>  	}
>  
> @@ -355,8 +354,7 @@ static int max77686_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
>  	ret = regmap_bulk_read(info->max77686->rtc_regmap,
>  			       map[REG_ALARM1_SEC], data, ARRAY_SIZE(data));
>  	if (ret < 0) {
> -		dev_err(info->dev, "%s:%d fail to read alarm reg(%d)\n",
> -				__func__, __LINE__, ret);
> +		dev_err(info->dev, "Fail to read alarm reg(%d)\n", ret);
>  		goto out;
>  	}
>  
> @@ -394,8 +392,7 @@ static int max77686_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
>  	alrm->pending = 0;
>  	ret = regmap_read(info->max77686->regmap, MAX77686_REG_STATUS2, &val);
>  	if (ret < 0) {
> -		dev_err(info->dev, "%s:%d fail to read status2 reg(%d)\n",
> -				__func__, __LINE__, ret);
> +		dev_err(info->dev, "Fail to read status2 reg(%d)\n", ret);
>  		goto out;
>  	}
>  
> @@ -426,8 +423,7 @@ static int max77686_rtc_stop_alarm(struct max77686_rtc_info *info)
>  				       map[REG_ALARM1_SEC], data,
>  				       ARRAY_SIZE(data));
>  		if (ret < 0) {
> -			dev_err(info->dev, "%s: fail to read alarm reg(%d)\n",
> -				__func__, ret);
> +			dev_err(info->dev, "Fail to read alarm reg(%d)\n", ret);
>  			goto out;
>  		}
>  
> @@ -452,8 +448,7 @@ static int max77686_rtc_stop_alarm(struct max77686_rtc_info *info)
>  	}
>  
>  	if (ret < 0) {
> -		dev_err(info->dev, "%s: fail to write alarm reg(%d)\n",
> -				__func__, ret);
> +		dev_err(info->dev, "Fail to write alarm reg(%d)\n", ret);
>  		goto out;
>  	}
>  
> @@ -481,8 +476,7 @@ static int max77686_rtc_start_alarm(struct max77686_rtc_info *info)
>  				       map[REG_ALARM1_SEC], data,
>  				       ARRAY_SIZE(data));
>  		if (ret < 0) {
> -			dev_err(info->dev, "%s: fail to read alarm reg(%d)\n",
> -				__func__, ret);
> +			dev_err(info->dev, "Fail to read alarm reg(%d)\n", ret);
>  			goto out;
>  		}
>  
> @@ -508,8 +502,7 @@ static int max77686_rtc_start_alarm(struct max77686_rtc_info *info)
>  	}
>  
>  	if (ret < 0) {
> -		dev_err(info->dev, "%s: fail to write alarm reg(%d)\n",
> -				__func__, ret);
> +		dev_err(info->dev, "Fail to write alarm reg(%d)\n", ret);
>  		goto out;
>  	}
>  
> @@ -539,8 +532,7 @@ static int max77686_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
>  				data, ARRAY_SIZE(data));
>  
>  	if (ret < 0) {
> -		dev_err(info->dev, "%s: fail to write alarm reg(%d)\n",
> -				__func__, ret);
> +		dev_err(info->dev, "Fail to write alarm reg(%d)\n", ret);
>  		goto out;
>  	}
>  
> @@ -575,7 +567,7 @@ static irqreturn_t max77686_rtc_alarm_irq(int irq, void *data)
>  {
>  	struct max77686_rtc_info *info = data;
>  
> -	dev_info(info->dev, "%s:irq(%d)\n", __func__, irq);
> +	dev_dbg(info->dev, "RTC alarm IRQ: %d\n", irq);
>  
>  	rtc_update_irq(info->rtc_dev, 1, RTC_IRQF | RTC_AF);
>  
> @@ -605,8 +597,7 @@ static int max77686_rtc_init_reg(struct max77686_rtc_info *info)
>  				info->drv_data->map[REG_RTC_CONTROLM],
>  				data, ARRAY_SIZE(data));
>  	if (ret < 0) {
> -		dev_err(info->dev, "%s: fail to write controlm reg(%d)\n",
> -				__func__, ret);
> +		dev_err(info->dev, "Fail to write controlm reg(%d)\n", ret);
>  		return ret;
>  	}
>  
> @@ -621,8 +612,6 @@ static int max77686_rtc_probe(struct platform_device *pdev)
>  	const struct platform_device_id *id = platform_get_device_id(pdev);
>  	int ret;
>  
> -	dev_info(&pdev->dev, "%s\n", __func__);
> -
>  	info = devm_kzalloc(&pdev->dev, sizeof(struct max77686_rtc_info),
>  				GFP_KERNEL);
>  	if (!info)
> @@ -662,7 +651,7 @@ static int max77686_rtc_probe(struct platform_device *pdev)
>  
>  	if (!max77686->rtc_irq_data) {
>  		ret = -EINVAL;
> -		dev_err(&pdev->dev, "%s: no RTC regmap IRQ chip\n", __func__);
> +		dev_err(&pdev->dev, "No RTC regmap IRQ chip\n");
>  		goto err_rtc;
>  	}
>  
> -- 
> 1.9.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [rtc-linux] Re: [PATCH] rtc: max77686: Cleanup and reduce dmesg output
@ 2016-01-28  1:15   ` Andi Shyti
  0 siblings, 0 replies; 7+ messages in thread
From: Andi Shyti @ 2016-01-28  1:15 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Chanwoo Choi, Alessandro Zummo, Alexandre Belloni, linux-kernel,
	rtc-linux, Javier Martinez Canillas, Laxman Dewangan

On Wed, Jan 27, 2016 at 03:46:11PM +0900, Krzysztof Kozlowski wrote:
> Cleanup of entire driver of its dmesg output:
> 1. Remove printing of the function name, because printing device name is
>    sufficient. This also makes the dev_err()-like functions more compact
>    and readable (not need of line break).
> 2. Lower from info to debug printing of each RTC interrupt (no need to
>    make noise on each alarm).
> 3. Remove dev_info() at beginning of probe because a message is already
>    always printed by either probe failure or from registering the RTC
>    device as /dev/rtcX.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Looks good, Reviewed-by: Andi Shyti <andi.shyti@samsung.com>

> ---
> 
> Patch rebased on top of Javier's v4:
> [PATCH v4 00/10] rtc: max77686: Extend driver and add max77802 support
> http://www.spinics.net/lists/arm-kernel/msg477194.html
> 
> Feel free to join with these series.
> ---
>  drivers/rtc/rtc-max77686.c | 39 ++++++++++++++-------------------------
>  1 file changed, 14 insertions(+), 25 deletions(-)
> 
> diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c
> index da47b1d85793..5a03e1ecad83 100644
> --- a/drivers/rtc/rtc-max77686.c
> +++ b/drivers/rtc/rtc-max77686.c
> @@ -271,8 +271,8 @@ static int max77686_rtc_update(struct max77686_rtc_info *info,
>  				 info->drv_data->map[REG_RTC_UPDATE0],
>  				 data, data);
>  	if (ret < 0)
> -		dev_err(info->dev, "%s: fail to write update reg(ret=%d, data=0x%x)\n",
> -				__func__, ret, data);
> +		dev_err(info->dev, "Fail to write update reg(ret=%d, data=0x%x)\n",
> +			ret, data);
>  	else {
>  		/* Minimum delay required before RTC update. */
>  		usleep_range(delay, delay * 2);
> @@ -297,7 +297,7 @@ static int max77686_rtc_read_time(struct device *dev, struct rtc_time *tm)
>  			       info->drv_data->map[REG_RTC_SEC],
>  			       data, ARRAY_SIZE(data));
>  	if (ret < 0) {
> -		dev_err(info->dev, "%s: fail to read time reg(%d)\n", __func__,	ret);
> +		dev_err(info->dev, "Fail to read time reg(%d)\n", ret);
>  		goto out;
>  	}
>  
> @@ -326,8 +326,7 @@ static int max77686_rtc_set_time(struct device *dev, struct rtc_time *tm)
>  				info->drv_data->map[REG_RTC_SEC],
>  				data, ARRAY_SIZE(data));
>  	if (ret < 0) {
> -		dev_err(info->dev, "%s: fail to write time reg(%d)\n", __func__,
> -				ret);
> +		dev_err(info->dev, "Fail to write time reg(%d)\n", ret);
>  		goto out;
>  	}
>  
> @@ -355,8 +354,7 @@ static int max77686_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
>  	ret = regmap_bulk_read(info->max77686->rtc_regmap,
>  			       map[REG_ALARM1_SEC], data, ARRAY_SIZE(data));
>  	if (ret < 0) {
> -		dev_err(info->dev, "%s:%d fail to read alarm reg(%d)\n",
> -				__func__, __LINE__, ret);
> +		dev_err(info->dev, "Fail to read alarm reg(%d)\n", ret);
>  		goto out;
>  	}
>  
> @@ -394,8 +392,7 @@ static int max77686_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
>  	alrm->pending = 0;
>  	ret = regmap_read(info->max77686->regmap, MAX77686_REG_STATUS2, &val);
>  	if (ret < 0) {
> -		dev_err(info->dev, "%s:%d fail to read status2 reg(%d)\n",
> -				__func__, __LINE__, ret);
> +		dev_err(info->dev, "Fail to read status2 reg(%d)\n", ret);
>  		goto out;
>  	}
>  
> @@ -426,8 +423,7 @@ static int max77686_rtc_stop_alarm(struct max77686_rtc_info *info)
>  				       map[REG_ALARM1_SEC], data,
>  				       ARRAY_SIZE(data));
>  		if (ret < 0) {
> -			dev_err(info->dev, "%s: fail to read alarm reg(%d)\n",
> -				__func__, ret);
> +			dev_err(info->dev, "Fail to read alarm reg(%d)\n", ret);
>  			goto out;
>  		}
>  
> @@ -452,8 +448,7 @@ static int max77686_rtc_stop_alarm(struct max77686_rtc_info *info)
>  	}
>  
>  	if (ret < 0) {
> -		dev_err(info->dev, "%s: fail to write alarm reg(%d)\n",
> -				__func__, ret);
> +		dev_err(info->dev, "Fail to write alarm reg(%d)\n", ret);
>  		goto out;
>  	}
>  
> @@ -481,8 +476,7 @@ static int max77686_rtc_start_alarm(struct max77686_rtc_info *info)
>  				       map[REG_ALARM1_SEC], data,
>  				       ARRAY_SIZE(data));
>  		if (ret < 0) {
> -			dev_err(info->dev, "%s: fail to read alarm reg(%d)\n",
> -				__func__, ret);
> +			dev_err(info->dev, "Fail to read alarm reg(%d)\n", ret);
>  			goto out;
>  		}
>  
> @@ -508,8 +502,7 @@ static int max77686_rtc_start_alarm(struct max77686_rtc_info *info)
>  	}
>  
>  	if (ret < 0) {
> -		dev_err(info->dev, "%s: fail to write alarm reg(%d)\n",
> -				__func__, ret);
> +		dev_err(info->dev, "Fail to write alarm reg(%d)\n", ret);
>  		goto out;
>  	}
>  
> @@ -539,8 +532,7 @@ static int max77686_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
>  				data, ARRAY_SIZE(data));
>  
>  	if (ret < 0) {
> -		dev_err(info->dev, "%s: fail to write alarm reg(%d)\n",
> -				__func__, ret);
> +		dev_err(info->dev, "Fail to write alarm reg(%d)\n", ret);
>  		goto out;
>  	}
>  
> @@ -575,7 +567,7 @@ static irqreturn_t max77686_rtc_alarm_irq(int irq, void *data)
>  {
>  	struct max77686_rtc_info *info = data;
>  
> -	dev_info(info->dev, "%s:irq(%d)\n", __func__, irq);
> +	dev_dbg(info->dev, "RTC alarm IRQ: %d\n", irq);
>  
>  	rtc_update_irq(info->rtc_dev, 1, RTC_IRQF | RTC_AF);
>  
> @@ -605,8 +597,7 @@ static int max77686_rtc_init_reg(struct max77686_rtc_info *info)
>  				info->drv_data->map[REG_RTC_CONTROLM],
>  				data, ARRAY_SIZE(data));
>  	if (ret < 0) {
> -		dev_err(info->dev, "%s: fail to write controlm reg(%d)\n",
> -				__func__, ret);
> +		dev_err(info->dev, "Fail to write controlm reg(%d)\n", ret);
>  		return ret;
>  	}
>  
> @@ -621,8 +612,6 @@ static int max77686_rtc_probe(struct platform_device *pdev)
>  	const struct platform_device_id *id = platform_get_device_id(pdev);
>  	int ret;
>  
> -	dev_info(&pdev->dev, "%s\n", __func__);
> -
>  	info = devm_kzalloc(&pdev->dev, sizeof(struct max77686_rtc_info),
>  				GFP_KERNEL);
>  	if (!info)
> @@ -662,7 +651,7 @@ static int max77686_rtc_probe(struct platform_device *pdev)
>  
>  	if (!max77686->rtc_irq_data) {
>  		ret = -EINVAL;
> -		dev_err(&pdev->dev, "%s: no RTC regmap IRQ chip\n", __func__);
> +		dev_err(&pdev->dev, "No RTC regmap IRQ chip\n");
>  		goto err_rtc;
>  	}
>  
> -- 
> 1.9.1

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] rtc: max77686: Cleanup and reduce dmesg output
  2016-01-27  6:46 ` [rtc-linux] " Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  (?)
@ 2016-01-31 12:08 ` Alexandre Belloni
  -1 siblings, 0 replies; 7+ messages in thread
From: Alexandre Belloni @ 2016-01-31 12:08 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Chanwoo Choi, Alessandro Zummo, linux-kernel, rtc-linux,
	Javier Martinez Canillas, Andi Shyti, Laxman Dewangan

On 27/01/2016 at 15:46:11 +0900, Krzysztof Kozlowski wrote :
> Cleanup of entire driver of its dmesg output:
> 1. Remove printing of the function name, because printing device name is
>    sufficient. This also makes the dev_err()-like functions more compact
>    and readable (not need of line break).
> 2. Lower from info to debug printing of each RTC interrupt (no need to
>    make noise on each alarm).
> 3. Remove dev_info() at beginning of probe because a message is already
>    always printed by either probe failure or from registering the RTC
>    device as /dev/rtcX.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> 
> ---
> 
> Patch rebased on top of Javier's v4:
> [PATCH v4 00/10] rtc: max77686: Extend driver and add max77802 support
> http://www.spinics.net/lists/arm-kernel/msg477194.html
> 
> Feel free to join with these series.
> ---
>  drivers/rtc/rtc-max77686.c | 39 ++++++++++++++-------------------------
>  1 file changed, 14 insertions(+), 25 deletions(-)
> 
Applied, thanks.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-01-31 12:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-27  6:46 [PATCH] rtc: max77686: Cleanup and reduce dmesg output Krzysztof Kozlowski
2016-01-27  6:46 ` [rtc-linux] " Krzysztof Kozlowski
2016-01-28  0:00 ` Javier Martinez Canillas
2016-01-28  0:00   ` [rtc-linux] " Javier Martinez Canillas
2016-01-28  1:15 ` Andi Shyti
2016-01-28  1:15   ` [rtc-linux] " Andi Shyti
2016-01-31 12:08 ` Alexandre Belloni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.