All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtc/ds3232: fix ds3232 get a WARNING trace in resume function
@ 2015-07-07  6:12 ` Dongsheng Wang
  0 siblings, 0 replies; 10+ messages in thread
From: Dongsheng Wang @ 2015-07-07  6:12 UTC (permalink / raw)
  To: a.zummo; +Cc: alexandre.belloni, rtc-linux, linux-kernel, Wang Dongsheng

From: Wang Dongsheng <dongsheng.wang@freescale.com>

If ds3232 work on some platform that is not implementation
irq_set_wake, ds3232 will get a WARNING trace in resume.
So fix ds3232->suspended state to false when irq_set_irq_wake
return error.

------------[ cut here ]------------
WARNING: CPU: 0 PID: 729 at kernel/irq/manage.c:604
irq_set_irq_wake+0x4b/0x8c()
Unbalanced IRQ 201 wake disable
Modules linked in:
CPU: 0 PID: 729 Comm: sh Not tainted 3.12.19-rt30+ #25
[<800107d9>] (unwind_backtrace+0x1/0x88) from [<8000e4ef>]
(show_stack+0xb/0xc)
[<8000e4ef>] (show_stack+0xb/0xc) from [<802b5fa9>]
(dump_stack+0x4d/0x60)
[<802b5fa9>] (dump_stack+0x4d/0x60) from [<800186dd>]
(warn_slowpath_common+0x45/0x64)
[<800186dd>] (warn_slowpath_common+0x45/0x64) from [<80018717>]
(warn_slowpath_fmt+0x1b/0x24)
[<80018717>] (warn_slowpath_fmt+0x1b/0x24) from [<8003a8d3>]
(irq_set_irq_wake+0x4b/0x8c)
[<8003a8d3>] (irq_set_irq_wake+0x4b/0x8c) from [<80204fcb>]
(ds3232_resume+0x2d/0x36)
[<80204fcb>] (ds3232_resume+0x2d/0x36) from [<801954c7>]
(dpm_run_callback.isra.13+0xb/0x28)
[<801954c7>] (dpm_run_callback.isra.13+0xb/0x28) from [<80195b1b>]
(device_resume+0x7b/0xa2)
[<80195b1b>] (device_resume+0x7b/0xa2) from [<80195f0f>]
(dpm_resume+0xbb/0x19c)
[<80195f0f>] (dpm_resume+0xbb/0x19c) from [<801960d9>]
(dpm_resume_end+0x9/0x12)
[<801960d9>] (dpm_resume_end+0x9/0x12) from [<80037e1d>]
(suspend_devices_and_enter+0x17d/0x1d0)
[<80037e1d>] (suspend_devices_and_enter+0x17d/0x1d0) from [<80037ee1>]
(pm_suspend+0x71/0x128)
[<80037ee1>] (pm_suspend+0x71/0x128) from [<80037449>]
(state_store+0x6d/0x80)
[<80037449>] (state_store+0x6d/0x80) from [<800af4d5>]
(sysfs_write_file+0x9f/0xde)
[<800af4d5>] (sysfs_write_file+0x9f/0xde) from [<8007a437>]
(vfs_write+0x7b/0x104)
[<8007a437>] (vfs_write+0x7b/0x104) from [<8007a7f7>]
(SyS_write+0x27/0x48)
[<8007a7f7>] (SyS_write+0x27/0x48) from [<8000c121>]
(ret_fast_syscall+0x1/0x44)
---[ end trace 640959d2e8de6ccc ]---

Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>

diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c
index 7e48e53..2081155 100644
--- a/drivers/rtc/rtc-ds3232.c
+++ b/drivers/rtc/rtc-ds3232.c
@@ -463,7 +463,10 @@ static int ds3232_suspend(struct device *dev)
 
 	if (device_can_wakeup(dev)) {
 		ds3232->suspended = true;
-		irq_set_irq_wake(client->irq, 1);
+		if (irq_set_irq_wake(client->irq, 1)) {
+			dev_info(dev, "Cannot serve as a wakeup source\n");
+			ds3232->suspended = false;
+		}
 	}
 
 	return 0;
-- 
2.1.0.27.g96db324


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

* [rtc-linux] [PATCH] rtc/ds3232: fix ds3232 get a WARNING trace in resume function
@ 2015-07-07  6:12 ` Dongsheng Wang
  0 siblings, 0 replies; 10+ messages in thread
From: Dongsheng Wang @ 2015-07-07  6:12 UTC (permalink / raw)
  To: a.zummo; +Cc: alexandre.belloni, rtc-linux, linux-kernel, Wang Dongsheng

From: Wang Dongsheng <dongsheng.wang@freescale.com>

If ds3232 work on some platform that is not implementation
irq_set_wake, ds3232 will get a WARNING trace in resume.
So fix ds3232->suspended state to false when irq_set_irq_wake
return error.

------------[ cut here ]------------
WARNING: CPU: 0 PID: 729 at kernel/irq/manage.c:604
irq_set_irq_wake+0x4b/0x8c()
Unbalanced IRQ 201 wake disable
Modules linked in:
CPU: 0 PID: 729 Comm: sh Not tainted 3.12.19-rt30+ #25
[<800107d9>] (unwind_backtrace+0x1/0x88) from [<8000e4ef>]
(show_stack+0xb/0xc)
[<8000e4ef>] (show_stack+0xb/0xc) from [<802b5fa9>]
(dump_stack+0x4d/0x60)
[<802b5fa9>] (dump_stack+0x4d/0x60) from [<800186dd>]
(warn_slowpath_common+0x45/0x64)
[<800186dd>] (warn_slowpath_common+0x45/0x64) from [<80018717>]
(warn_slowpath_fmt+0x1b/0x24)
[<80018717>] (warn_slowpath_fmt+0x1b/0x24) from [<8003a8d3>]
(irq_set_irq_wake+0x4b/0x8c)
[<8003a8d3>] (irq_set_irq_wake+0x4b/0x8c) from [<80204fcb>]
(ds3232_resume+0x2d/0x36)
[<80204fcb>] (ds3232_resume+0x2d/0x36) from [<801954c7>]
(dpm_run_callback.isra.13+0xb/0x28)
[<801954c7>] (dpm_run_callback.isra.13+0xb/0x28) from [<80195b1b>]
(device_resume+0x7b/0xa2)
[<80195b1b>] (device_resume+0x7b/0xa2) from [<80195f0f>]
(dpm_resume+0xbb/0x19c)
[<80195f0f>] (dpm_resume+0xbb/0x19c) from [<801960d9>]
(dpm_resume_end+0x9/0x12)
[<801960d9>] (dpm_resume_end+0x9/0x12) from [<80037e1d>]
(suspend_devices_and_enter+0x17d/0x1d0)
[<80037e1d>] (suspend_devices_and_enter+0x17d/0x1d0) from [<80037ee1>]
(pm_suspend+0x71/0x128)
[<80037ee1>] (pm_suspend+0x71/0x128) from [<80037449>]
(state_store+0x6d/0x80)
[<80037449>] (state_store+0x6d/0x80) from [<800af4d5>]
(sysfs_write_file+0x9f/0xde)
[<800af4d5>] (sysfs_write_file+0x9f/0xde) from [<8007a437>]
(vfs_write+0x7b/0x104)
[<8007a437>] (vfs_write+0x7b/0x104) from [<8007a7f7>]
(SyS_write+0x27/0x48)
[<8007a7f7>] (SyS_write+0x27/0x48) from [<8000c121>]
(ret_fast_syscall+0x1/0x44)
---[ end trace 640959d2e8de6ccc ]---

Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>

diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c
index 7e48e53..2081155 100644
--- a/drivers/rtc/rtc-ds3232.c
+++ b/drivers/rtc/rtc-ds3232.c
@@ -463,7 +463,10 @@ static int ds3232_suspend(struct device *dev)
 
 	if (device_can_wakeup(dev)) {
 		ds3232->suspended = true;
-		irq_set_irq_wake(client->irq, 1);
+		if (irq_set_irq_wake(client->irq, 1)) {
+			dev_info(dev, "Cannot serve as a wakeup source\n");
+			ds3232->suspended = false;
+		}
 	}
 
 	return 0;
-- 
2.1.0.27.g96db324

-- 
-- 
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] 10+ messages in thread

* Re: [PATCH] rtc/ds3232: fix ds3232 get a WARNING trace in resume function
  2015-07-07  6:12 ` [rtc-linux] " Dongsheng Wang
@ 2015-07-14 22:50   ` Alexandre Belloni
  -1 siblings, 0 replies; 10+ messages in thread
From: Alexandre Belloni @ 2015-07-14 22:50 UTC (permalink / raw)
  To: Dongsheng Wang; +Cc: a.zummo, rtc-linux, linux-kernel

Hi,

This seems ok, one small nitpick:

On 07/07/2015 at 14:12:56 +0800, Dongsheng Wang wrote :
> From: Wang Dongsheng <dongsheng.wang@freescale.com>
> diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c
> index 7e48e53..2081155 100644
> --- a/drivers/rtc/rtc-ds3232.c
> +++ b/drivers/rtc/rtc-ds3232.c
> @@ -463,7 +463,10 @@ static int ds3232_suspend(struct device *dev)
>  
>  	if (device_can_wakeup(dev)) {
>  		ds3232->suspended = true;
> -		irq_set_irq_wake(client->irq, 1);
> +		if (irq_set_irq_wake(client->irq, 1)) {
> +			dev_info(dev, "Cannot serve as a wakeup source\n");

I would use dev_warn_once or dev_info_once here to avoid spamming the
log each time the machine is suspended.

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

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

* [rtc-linux] Re: [PATCH] rtc/ds3232: fix ds3232 get a WARNING trace in resume function
@ 2015-07-14 22:50   ` Alexandre Belloni
  0 siblings, 0 replies; 10+ messages in thread
From: Alexandre Belloni @ 2015-07-14 22:50 UTC (permalink / raw)
  To: Dongsheng Wang; +Cc: a.zummo, rtc-linux, linux-kernel

Hi,

This seems ok, one small nitpick:

On 07/07/2015 at 14:12:56 +0800, Dongsheng Wang wrote :
> From: Wang Dongsheng <dongsheng.wang@freescale.com>
> diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c
> index 7e48e53..2081155 100644
> --- a/drivers/rtc/rtc-ds3232.c
> +++ b/drivers/rtc/rtc-ds3232.c
> @@ -463,7 +463,10 @@ static int ds3232_suspend(struct device *dev)
>  
>  	if (device_can_wakeup(dev)) {
>  		ds3232->suspended = true;
> -		irq_set_irq_wake(client->irq, 1);
> +		if (irq_set_irq_wake(client->irq, 1)) {
> +			dev_info(dev, "Cannot serve as a wakeup source\n");

I would use dev_warn_once or dev_info_once here to avoid spamming the
log each time the machine is suspended.

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

-- 
-- 
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] 10+ messages in thread

* RE: [PATCH] rtc/ds3232: fix ds3232 get a WARNING trace in resume function
  2015-07-14 22:50   ` [rtc-linux] " Alexandre Belloni
@ 2015-07-15  2:06     ` Wang Dongsheng
  -1 siblings, 0 replies; 10+ messages in thread
From: Wang Dongsheng @ 2015-07-15  2:06 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-kernel@vger.kernel.org

Thanks Belloni. :)

Regards,
-Dongsheng

> -----Original Message-----
> From: Alexandre Belloni [mailto:alexandre.belloni@free-electrons.com]
> Sent: Wednesday, July 15, 2015 6:51 AM
> To: Wang Dongsheng-B40534
> Cc: a.zummo@towertech.it; rtc-linux@googlegroups.com; linux-
> kernel@vger.kernel.org
> Subject: Re: [PATCH] rtc/ds3232: fix ds3232 get a WARNING trace in resume
> function
> 
> Hi,
> 
> This seems ok, one small nitpick:
> 
> On 07/07/2015 at 14:12:56 +0800, Dongsheng Wang wrote :
> > From: Wang Dongsheng <dongsheng.wang@freescale.com> diff --git
> > a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c index
> > 7e48e53..2081155 100644
> > --- a/drivers/rtc/rtc-ds3232.c
> > +++ b/drivers/rtc/rtc-ds3232.c
> > @@ -463,7 +463,10 @@ static int ds3232_suspend(struct device *dev)
> >
> >  	if (device_can_wakeup(dev)) {
> >  		ds3232->suspended = true;
> > -		irq_set_irq_wake(client->irq, 1);
> > +		if (irq_set_irq_wake(client->irq, 1)) {
> > +			dev_info(dev, "Cannot serve as a wakeup source\n");
> 
> I would use dev_warn_once or dev_info_once here to avoid spamming the log each
> time the machine is suspended.
> 
> --
> Alexandre Belloni, Free Electrons
> Embedded Linux, Kernel and Android engineering http://free-electrons.com

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

* [rtc-linux] RE: [PATCH] rtc/ds3232: fix ds3232 get a WARNING trace in resume function
@ 2015-07-15  2:06     ` Wang Dongsheng
  0 siblings, 0 replies; 10+ messages in thread
From: Wang Dongsheng @ 2015-07-15  2:06 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-kernel@vger.kernel.org

Thanks Belloni. :)

Regards,
-Dongsheng

> -----Original Message-----
> From: Alexandre Belloni [mailto:alexandre.belloni@free-electrons.com]
> Sent: Wednesday, July 15, 2015 6:51 AM
> To: Wang Dongsheng-B40534
> Cc: a.zummo@towertech.it; rtc-linux@googlegroups.com; linux-
> kernel@vger.kernel.org
> Subject: Re: [PATCH] rtc/ds3232: fix ds3232 get a WARNING trace in resume
> function
> 
> Hi,
> 
> This seems ok, one small nitpick:
> 
> On 07/07/2015 at 14:12:56 +0800, Dongsheng Wang wrote :
> > From: Wang Dongsheng <dongsheng.wang@freescale.com> diff --git
> > a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c index
> > 7e48e53..2081155 100644
> > --- a/drivers/rtc/rtc-ds3232.c
> > +++ b/drivers/rtc/rtc-ds3232.c
> > @@ -463,7 +463,10 @@ static int ds3232_suspend(struct device *dev)
> >
> >  	if (device_can_wakeup(dev)) {
> >  		ds3232->suspended = true;
> > -		irq_set_irq_wake(client->irq, 1);
> > +		if (irq_set_irq_wake(client->irq, 1)) {
> > +			dev_info(dev, "Cannot serve as a wakeup source\n");
> 
> I would use dev_warn_once or dev_info_once here to avoid spamming the log each
> time the machine is suspended.
> 
> --
> Alexandre Belloni, Free Electrons
> Embedded Linux, Kernel and Android engineering http://free-electrons.com

-- 
-- 
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] 10+ messages in thread

* RE: [PATCH] rtc/ds3232: fix ds3232 get a WARNING trace in resume function
  2015-07-14 22:50   ` [rtc-linux] " Alexandre Belloni
@ 2015-08-12  7:50     ` Wang Dongsheng
  -1 siblings, 0 replies; 10+ messages in thread
From: Wang Dongsheng @ 2015-08-12  7:50 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-kernel@vger.kernel.org

Hi Belloni,

I am not found this patch in your tree(rtc-fixes and rtc-next), Need I send v2 patch? :)

Regards,
-Dongsheng

> -----Original Message-----
> From: Wang Dongsheng-B40534
> Sent: Wednesday, July 15, 2015 10:06 AM
> To: 'Alexandre Belloni'
> Cc: a.zummo@towertech.it; rtc-linux@googlegroups.com; linux-
> kernel@vger.kernel.org
> Subject: RE: [PATCH] rtc/ds3232: fix ds3232 get a WARNING trace in resume
> function
> 
> Thanks Belloni. :)
> 
> Regards,
> -Dongsheng
> 
> > -----Original Message-----
> > From: Alexandre Belloni [mailto:alexandre.belloni@free-electrons.com]
> > Sent: Wednesday, July 15, 2015 6:51 AM
> > To: Wang Dongsheng-B40534
> > Cc: a.zummo@towertech.it; rtc-linux@googlegroups.com; linux-
> > kernel@vger.kernel.org
> > Subject: Re: [PATCH] rtc/ds3232: fix ds3232 get a WARNING trace in
> > resume function
> >
> > Hi,
> >
> > This seems ok, one small nitpick:
> >
> > On 07/07/2015 at 14:12:56 +0800, Dongsheng Wang wrote :
> > > From: Wang Dongsheng <dongsheng.wang@freescale.com> diff --git
> > > a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c index
> > > 7e48e53..2081155 100644
> > > --- a/drivers/rtc/rtc-ds3232.c
> > > +++ b/drivers/rtc/rtc-ds3232.c
> > > @@ -463,7 +463,10 @@ static int ds3232_suspend(struct device *dev)
> > >
> > >  	if (device_can_wakeup(dev)) {
> > >  		ds3232->suspended = true;
> > > -		irq_set_irq_wake(client->irq, 1);
> > > +		if (irq_set_irq_wake(client->irq, 1)) {
> > > +			dev_info(dev, "Cannot serve as a wakeup source\n");
> >
> > I would use dev_warn_once or dev_info_once here to avoid spamming the
> > log each time the machine is suspended.
> >
> > --
> > Alexandre Belloni, Free Electrons
> > Embedded Linux, Kernel and Android engineering
> > http://free-electrons.com

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

* [rtc-linux] RE: [PATCH] rtc/ds3232: fix ds3232 get a WARNING trace in resume function
@ 2015-08-12  7:50     ` Wang Dongsheng
  0 siblings, 0 replies; 10+ messages in thread
From: Wang Dongsheng @ 2015-08-12  7:50 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-kernel@vger.kernel.org

Hi Belloni,

I am not found this patch in your tree(rtc-fixes and rtc-next), Need I send v2 patch? :)

Regards,
-Dongsheng

> -----Original Message-----
> From: Wang Dongsheng-B40534
> Sent: Wednesday, July 15, 2015 10:06 AM
> To: 'Alexandre Belloni'
> Cc: a.zummo@towertech.it; rtc-linux@googlegroups.com; linux-
> kernel@vger.kernel.org
> Subject: RE: [PATCH] rtc/ds3232: fix ds3232 get a WARNING trace in resume
> function
> 
> Thanks Belloni. :)
> 
> Regards,
> -Dongsheng
> 
> > -----Original Message-----
> > From: Alexandre Belloni [mailto:alexandre.belloni@free-electrons.com]
> > Sent: Wednesday, July 15, 2015 6:51 AM
> > To: Wang Dongsheng-B40534
> > Cc: a.zummo@towertech.it; rtc-linux@googlegroups.com; linux-
> > kernel@vger.kernel.org
> > Subject: Re: [PATCH] rtc/ds3232: fix ds3232 get a WARNING trace in
> > resume function
> >
> > Hi,
> >
> > This seems ok, one small nitpick:
> >
> > On 07/07/2015 at 14:12:56 +0800, Dongsheng Wang wrote :
> > > From: Wang Dongsheng <dongsheng.wang@freescale.com> diff --git
> > > a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c index
> > > 7e48e53..2081155 100644
> > > --- a/drivers/rtc/rtc-ds3232.c
> > > +++ b/drivers/rtc/rtc-ds3232.c
> > > @@ -463,7 +463,10 @@ static int ds3232_suspend(struct device *dev)
> > >
> > >  	if (device_can_wakeup(dev)) {
> > >  		ds3232->suspended = true;
> > > -		irq_set_irq_wake(client->irq, 1);
> > > +		if (irq_set_irq_wake(client->irq, 1)) {
> > > +			dev_info(dev, "Cannot serve as a wakeup source\n");
> >
> > I would use dev_warn_once or dev_info_once here to avoid spamming the
> > log each time the machine is suspended.
> >
> > --
> > Alexandre Belloni, Free Electrons
> > Embedded Linux, Kernel and Android engineering
> > http://free-electrons.com

-- 
-- 
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] 10+ messages in thread

* Re: [PATCH] rtc/ds3232: fix ds3232 get a WARNING trace in resume function
  2015-08-12  7:50     ` [rtc-linux] " Wang Dongsheng
@ 2015-08-12  8:10       ` Alexandre Belloni
  -1 siblings, 0 replies; 10+ messages in thread
From: Alexandre Belloni @ 2015-08-12  8:10 UTC (permalink / raw)
  To: Wang Dongsheng
  Cc: a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-kernel@vger.kernel.org

Hi,

On 12/08/2015 at 07:50:03 +0000, Wang Dongsheng wrote :
> Hi Belloni,
> 
> I am not found this patch in your tree(rtc-fixes and rtc-next), Need I send v2 patch? :)
> 

Yes, I was expecting that you would send a new version.

> Regards,
> -Dongsheng
> 
> > -----Original Message-----
> > From: Wang Dongsheng-B40534
> > Sent: Wednesday, July 15, 2015 10:06 AM
> > To: 'Alexandre Belloni'
> > Cc: a.zummo@towertech.it; rtc-linux@googlegroups.com; linux-
> > kernel@vger.kernel.org
> > Subject: RE: [PATCH] rtc/ds3232: fix ds3232 get a WARNING trace in resume
> > function
> > 
> > Thanks Belloni. :)
> > 
> > Regards,
> > -Dongsheng
> > 
> > > -----Original Message-----
> > > From: Alexandre Belloni [mailto:alexandre.belloni@free-electrons.com]
> > > Sent: Wednesday, July 15, 2015 6:51 AM
> > > To: Wang Dongsheng-B40534
> > > Cc: a.zummo@towertech.it; rtc-linux@googlegroups.com; linux-
> > > kernel@vger.kernel.org
> > > Subject: Re: [PATCH] rtc/ds3232: fix ds3232 get a WARNING trace in
> > > resume function
> > >
> > > Hi,
> > >
> > > This seems ok, one small nitpick:
> > >
> > > On 07/07/2015 at 14:12:56 +0800, Dongsheng Wang wrote :
> > > > From: Wang Dongsheng <dongsheng.wang@freescale.com> diff --git
> > > > a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c index
> > > > 7e48e53..2081155 100644
> > > > --- a/drivers/rtc/rtc-ds3232.c
> > > > +++ b/drivers/rtc/rtc-ds3232.c
> > > > @@ -463,7 +463,10 @@ static int ds3232_suspend(struct device *dev)
> > > >
> > > >  	if (device_can_wakeup(dev)) {
> > > >  		ds3232->suspended = true;
> > > > -		irq_set_irq_wake(client->irq, 1);
> > > > +		if (irq_set_irq_wake(client->irq, 1)) {
> > > > +			dev_info(dev, "Cannot serve as a wakeup source\n");
> > >
> > > I would use dev_warn_once or dev_info_once here to avoid spamming the
> > > log each time the machine is suspended.
> > >
> > > --
> > > Alexandre Belloni, Free Electrons
> > > Embedded Linux, Kernel and Android engineering
> > > http://free-electrons.com

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

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

* [rtc-linux] Re: [PATCH] rtc/ds3232: fix ds3232 get a WARNING trace in resume function
@ 2015-08-12  8:10       ` Alexandre Belloni
  0 siblings, 0 replies; 10+ messages in thread
From: Alexandre Belloni @ 2015-08-12  8:10 UTC (permalink / raw)
  To: Wang Dongsheng
  Cc: a.zummo@towertech.it, rtc-linux@googlegroups.com,
	linux-kernel@vger.kernel.org

Hi,

On 12/08/2015 at 07:50:03 +0000, Wang Dongsheng wrote :
> Hi Belloni,
> 
> I am not found this patch in your tree(rtc-fixes and rtc-next), Need I send v2 patch? :)
> 

Yes, I was expecting that you would send a new version.

> Regards,
> -Dongsheng
> 
> > -----Original Message-----
> > From: Wang Dongsheng-B40534
> > Sent: Wednesday, July 15, 2015 10:06 AM
> > To: 'Alexandre Belloni'
> > Cc: a.zummo@towertech.it; rtc-linux@googlegroups.com; linux-
> > kernel@vger.kernel.org
> > Subject: RE: [PATCH] rtc/ds3232: fix ds3232 get a WARNING trace in resume
> > function
> > 
> > Thanks Belloni. :)
> > 
> > Regards,
> > -Dongsheng
> > 
> > > -----Original Message-----
> > > From: Alexandre Belloni [mailto:alexandre.belloni@free-electrons.com]
> > > Sent: Wednesday, July 15, 2015 6:51 AM
> > > To: Wang Dongsheng-B40534
> > > Cc: a.zummo@towertech.it; rtc-linux@googlegroups.com; linux-
> > > kernel@vger.kernel.org
> > > Subject: Re: [PATCH] rtc/ds3232: fix ds3232 get a WARNING trace in
> > > resume function
> > >
> > > Hi,
> > >
> > > This seems ok, one small nitpick:
> > >
> > > On 07/07/2015 at 14:12:56 +0800, Dongsheng Wang wrote :
> > > > From: Wang Dongsheng <dongsheng.wang@freescale.com> diff --git
> > > > a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c index
> > > > 7e48e53..2081155 100644
> > > > --- a/drivers/rtc/rtc-ds3232.c
> > > > +++ b/drivers/rtc/rtc-ds3232.c
> > > > @@ -463,7 +463,10 @@ static int ds3232_suspend(struct device *dev)
> > > >
> > > >  	if (device_can_wakeup(dev)) {
> > > >  		ds3232->suspended = true;
> > > > -		irq_set_irq_wake(client->irq, 1);
> > > > +		if (irq_set_irq_wake(client->irq, 1)) {
> > > > +			dev_info(dev, "Cannot serve as a wakeup source\n");
> > >
> > > I would use dev_warn_once or dev_info_once here to avoid spamming the
> > > log each time the machine is suspended.
> > >
> > > --
> > > Alexandre Belloni, Free Electrons
> > > Embedded Linux, Kernel and Android engineering
> > > http://free-electrons.com

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

-- 
-- 
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] 10+ messages in thread

end of thread, other threads:[~2015-08-12  8:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-07  6:12 [PATCH] rtc/ds3232: fix ds3232 get a WARNING trace in resume function Dongsheng Wang
2015-07-07  6:12 ` [rtc-linux] " Dongsheng Wang
2015-07-14 22:50 ` Alexandre Belloni
2015-07-14 22:50   ` [rtc-linux] " Alexandre Belloni
2015-07-15  2:06   ` Wang Dongsheng
2015-07-15  2:06     ` [rtc-linux] " Wang Dongsheng
2015-08-12  7:50   ` Wang Dongsheng
2015-08-12  7:50     ` [rtc-linux] " Wang Dongsheng
2015-08-12  8:10     ` Alexandre Belloni
2015-08-12  8:10       ` [rtc-linux] " 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.