Re: [PATCH v2 1/3] power: validate wakeup source before activating it.

2015-05-06 Thread Jin Qian
I have to break the line since it's over 80 characters : ) I'll follow CodingStyle and send a new patch. Thanks, jin On Wed, May 6, 2015 at 3:39 PM, Rafael J. Wysocki wrote: > On Wednesday, May 06, 2015 03:11:48 PM Jin Qian wrote: >> Hi Rafael, >> >> I kept braces since checkpatch.pl didn't

Re: [PATCH v2 1/3] power: validate wakeup source before activating it.

2015-05-06 Thread Rafael J. Wysocki
On Wednesday, May 06, 2015 03:11:48 PM Jin Qian wrote: > Hi Rafael, > > I kept braces since checkpatch.pl didn't report error or warning. The > if condition has two lines, a brace make the statement more clear I > think. Well, you don't have to break the "if" line. :-) As per CodingStyle, the

Re: [PATCH v2 1/3] power: validate wakeup source before activating it.

2015-05-06 Thread Jin Qian
Hi Rafael, I kept braces since checkpatch.pl didn't report error or warning. The if condition has two lines, a brace make the statement more clear I think. I removed the format string since ws->name can be random strings if the wakeup_source is not registered (i.e. using prepare functions). It's

Re: [PATCH v2 1/3] power: validate wakeup source before activating it.

2015-05-06 Thread Rafael J. Wysocki
On Wednesday, May 06, 2015 11:51:07 AM Jin Qian wrote: > A rogue wakeup source not registered in wakeup_sources list is not visible > from wakeup_sources_stats_show. Check if the wakeup source is registered > properly by looking at the timer struct. > > Signed-off-by: Jin Qian > --- >

[PATCH v2 1/3] power: validate wakeup source before activating it.

2015-05-06 Thread Jin Qian
A rogue wakeup source not registered in wakeup_sources list is not visible from wakeup_sources_stats_show. Check if the wakeup source is registered properly by looking at the timer struct. Signed-off-by: Jin Qian --- drivers/base/power/wakeup.c | 19 +++ 1 file changed, 19

Re: [PATCH v2 1/3] power: validate wakeup source before activating it.

2015-05-06 Thread Jin Qian
Hi Rafael, I kept braces since checkpatch.pl didn't report error or warning. The if condition has two lines, a brace make the statement more clear I think. I removed the format string since ws-name can be random strings if the wakeup_source is not registered (i.e. using prepare functions). It's

Re: [PATCH v2 1/3] power: validate wakeup source before activating it.

2015-05-06 Thread Jin Qian
I have to break the line since it's over 80 characters : ) I'll follow CodingStyle and send a new patch. Thanks, jin On Wed, May 6, 2015 at 3:39 PM, Rafael J. Wysocki r...@rjwysocki.net wrote: On Wednesday, May 06, 2015 03:11:48 PM Jin Qian wrote: Hi Rafael, I kept braces since checkpatch.pl

Re: [PATCH v2 1/3] power: validate wakeup source before activating it.

2015-05-06 Thread Rafael J. Wysocki
On Wednesday, May 06, 2015 03:11:48 PM Jin Qian wrote: Hi Rafael, I kept braces since checkpatch.pl didn't report error or warning. The if condition has two lines, a brace make the statement more clear I think. Well, you don't have to break the if line. :-) As per CodingStyle, the braces

Re: [PATCH v2 1/3] power: validate wakeup source before activating it.

2015-05-06 Thread Rafael J. Wysocki
On Wednesday, May 06, 2015 11:51:07 AM Jin Qian wrote: A rogue wakeup source not registered in wakeup_sources list is not visible from wakeup_sources_stats_show. Check if the wakeup source is registered properly by looking at the timer struct. Signed-off-by: Jin Qian jinq...@android.com ---

[PATCH v2 1/3] power: validate wakeup source before activating it.

2015-05-06 Thread Jin Qian
A rogue wakeup source not registered in wakeup_sources list is not visible from wakeup_sources_stats_show. Check if the wakeup source is registered properly by looking at the timer struct. Signed-off-by: Jin Qian jinq...@android.com --- drivers/base/power/wakeup.c | 19 +++ 1

Re: [PATCH v2 1/3] power: validate wakeup source before activating it.

2015-05-05 Thread Rafael J. Wysocki
On Tuesday, May 05, 2015 03:24:13 PM Jin Qian wrote: > A rogue wakeup source not registered in wakeup_sources list is not visible > from wakeup_sources_stats_show. Check if the wakeup source is registered > properly by looking at the timer function. > > Signed-off-by: Jin Qian > --- >

[PATCH v2 1/3] power: validate wakeup source before activating it.

2015-05-05 Thread Jin Qian
A rogue wakeup source not registered in wakeup_sources list is not visible from wakeup_sources_stats_show. Check if the wakeup source is registered properly by looking at the timer function. Signed-off-by: Jin Qian --- drivers/base/power/wakeup.c | 19 +++ 1 file changed, 19

Re: [PATCH v2 1/3] power: validate wakeup source before activating it.

2015-05-05 Thread Rafael J. Wysocki
On Tuesday, May 05, 2015 03:24:13 PM Jin Qian wrote: A rogue wakeup source not registered in wakeup_sources list is not visible from wakeup_sources_stats_show. Check if the wakeup source is registered properly by looking at the timer function. Signed-off-by: Jin Qian jinq...@android.com ---

[PATCH v2 1/3] power: validate wakeup source before activating it.

2015-05-05 Thread Jin Qian
A rogue wakeup source not registered in wakeup_sources list is not visible from wakeup_sources_stats_show. Check if the wakeup source is registered properly by looking at the timer function. Signed-off-by: Jin Qian jinq...@android.com --- drivers/base/power/wakeup.c | 19 +++ 1