* [PATCH] AlarmDev: Changing is_wakeup() to be a function to pass checkpatch
@ 2014-01-12 14:14 Joe
2014-01-12 15:33 ` Levente Kurusa
0 siblings, 1 reply; 5+ messages in thread
From: Joe @ 2014-01-12 14:14 UTC (permalink / raw)
To: gregkh; +Cc: john.stultz, dan.carpenter, cruzjbishop, linux-kernel,
cyborg101010
---
drivers/staging/android/alarm-dev.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/android/alarm-dev.c b/drivers/staging/android/alarm-dev.c
index 647694f..87f2a02 100644
--- a/drivers/staging/android/alarm-dev.c
+++ b/drivers/staging/android/alarm-dev.c
@@ -66,13 +66,15 @@ static struct devalarm alarms[ANDROID_ALARM_TYPE_COUNT];
*
* Return: 1 if this is a wakeup alarm, otherwise 0
*/
-static int is_wakeup(enum android_alarm_type type)
+static int is_wakeup(enum andriod_alarm_type type)
{
- return (type == ANDROID_ALARM_RTC_WAKEUP ||
- type == ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP);
+ if (type == ANDROID_ALARM_RTC_WAKEUP ||
+ type == ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP)
+ return 1;
+ else
+ return 0;
}
-
static void devalarm_start(struct devalarm *alrm, ktime_t exp)
{
if (is_wakeup(alrm->type))
--
1.8.3.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] AlarmDev: Changing is_wakeup() to be a function to pass checkpatch
2014-01-12 14:14 Joe
@ 2014-01-12 15:33 ` Levente Kurusa
0 siblings, 0 replies; 5+ messages in thread
From: Levente Kurusa @ 2014-01-12 15:33 UTC (permalink / raw)
To: Joe
Cc: Greg Kroah-Hartman, john.stultz, dan.carpenter, cruzjbishop,
linux-kernel@vger.kernel.org
Hello,
2014/1/12 Joe <cyborg101010@gmail.com>:
> ---
> drivers/staging/android/alarm-dev.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
You are missing a commit message. Your subject as well looks a bit weird.
>
> diff --git a/drivers/staging/android/alarm-dev.c b/drivers/staging/android/alarm-dev.c
> index 647694f..87f2a02 100644
> --- a/drivers/staging/android/alarm-dev.c
> +++ b/drivers/staging/android/alarm-dev.c
> @@ -66,13 +66,15 @@ static struct devalarm alarms[ANDROID_ALARM_TYPE_COUNT];
> *
> * Return: 1 if this is a wakeup alarm, otherwise 0
> */
> -static int is_wakeup(enum android_alarm_type type)
> +static int is_wakeup(enum andriod_alarm_type type)
What is this? andriod? Did it compile?
> {
> - return (type == ANDROID_ALARM_RTC_WAKEUP ||
> - type == ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP);
> + if (type == ANDROID_ALARM_RTC_WAKEUP ||
> + type == ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP)
> + return 1;
> + else
> + return 0;
While this is correct, the better fix would be to remove the parentheses..
Also, I think a similar patch was already applied, not sure though.
> [...]
--
Regards,
Levente Kurusa
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] AlarmDev: Changing is_wakeup() to be a function to pass checkpatch
@ 2014-01-13 20:10 Joe Borg
2014-01-13 20:32 ` Dan Carpenter
2014-01-13 21:10 ` Greg KH
0 siblings, 2 replies; 5+ messages in thread
From: Joe Borg @ 2014-01-13 20:10 UTC (permalink / raw)
To: dan.carpenter
Cc: cyborg101010, abbotti, hsweeten, gregkh, devel, linux-kernel
Signed-off-by Joe Borg <cyborg101010@gmail.com>
---
drivers/staging/android/alarm-dev.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/android/alarm-dev.c b/drivers/staging/android/alarm-dev.c
index 647694f..87f2a02 100644
--- a/drivers/staging/android/alarm-dev.c
+++ b/drivers/staging/android/alarm-dev.c
@@ -66,13 +66,15 @@ static struct devalarm alarms[ANDROID_ALARM_TYPE_COUNT];
*
* Return: 1 if this is a wakeup alarm, otherwise 0
*/
-static int is_wakeup(enum android_alarm_type type)
+static int is_wakeup(enum andriod_alarm_type type)
{
- return (type == ANDROID_ALARM_RTC_WAKEUP ||
- type == ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP);
+ if (type == ANDROID_ALARM_RTC_WAKEUP ||
+ type == ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP)
+ return 1;
+ else
+ return 0;
}
-
static void devalarm_start(struct devalarm *alrm, ktime_t exp)
{
if (is_wakeup(alrm->type))
--
1.8.5.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] AlarmDev: Changing is_wakeup() to be a function to pass checkpatch
2014-01-13 20:10 [PATCH] AlarmDev: Changing is_wakeup() to be a function to pass checkpatch Joe Borg
@ 2014-01-13 20:32 ` Dan Carpenter
2014-01-13 21:10 ` Greg KH
1 sibling, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2014-01-13 20:32 UTC (permalink / raw)
To: Joe Borg; +Cc: devel, gregkh, linux-kernel, abbotti, Levente Kurusa
On Mon, Jan 13, 2014 at 08:10:36PM +0000, Joe Borg wrote:
> Signed-off-by Joe Borg <cyborg101010@gmail.com>
> ---
> drivers/staging/android/alarm-dev.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/android/alarm-dev.c b/drivers/staging/android/alarm-dev.c
> index 647694f..87f2a02 100644
> --- a/drivers/staging/android/alarm-dev.c
> +++ b/drivers/staging/android/alarm-dev.c
> @@ -66,13 +66,15 @@ static struct devalarm alarms[ANDROID_ALARM_TYPE_COUNT];
> *
> * Return: 1 if this is a wakeup alarm, otherwise 0
> */
> -static int is_wakeup(enum android_alarm_type type)
> +static int is_wakeup(enum andriod_alarm_type type)
Levente already pointed out that this breaks the build. Really
Levente said was spot on and still applies to the v2 of the patch.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] AlarmDev: Changing is_wakeup() to be a function to pass checkpatch
2014-01-13 20:10 [PATCH] AlarmDev: Changing is_wakeup() to be a function to pass checkpatch Joe Borg
2014-01-13 20:32 ` Dan Carpenter
@ 2014-01-13 21:10 ` Greg KH
1 sibling, 0 replies; 5+ messages in thread
From: Greg KH @ 2014-01-13 21:10 UTC (permalink / raw)
To: Joe Borg; +Cc: dan.carpenter, abbotti, hsweeten, devel, linux-kernel
On Mon, Jan 13, 2014 at 08:10:36PM +0000, Joe Borg wrote:
> Signed-off-by Joe Borg <cyborg101010@gmail.com>
> ---
> drivers/staging/android/alarm-dev.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/android/alarm-dev.c b/drivers/staging/android/alarm-dev.c
> index 647694f..87f2a02 100644
> --- a/drivers/staging/android/alarm-dev.c
> +++ b/drivers/staging/android/alarm-dev.c
> @@ -66,13 +66,15 @@ static struct devalarm alarms[ANDROID_ALARM_TYPE_COUNT];
> *
> * Return: 1 if this is a wakeup alarm, otherwise 0
> */
> -static int is_wakeup(enum android_alarm_type type)
> +static int is_wakeup(enum andriod_alarm_type type)
Always build test your patches, this one wasn't.
> {
> - return (type == ANDROID_ALARM_RTC_WAKEUP ||
> - type == ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP);
> + if (type == ANDROID_ALARM_RTC_WAKEUP ||
> + type == ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP)
> + return 1;
> + else
> + return 0;
Why are you making this change? There is no logic change here at all.
> }
>
> -
Why remove this line?
Again, you are going to need changelog comments for any patch, please
redo them properly if you wish us to accept your patches.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-01-13 21:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-13 20:10 [PATCH] AlarmDev: Changing is_wakeup() to be a function to pass checkpatch Joe Borg
2014-01-13 20:32 ` Dan Carpenter
2014-01-13 21:10 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2014-01-12 14:14 Joe
2014-01-12 15:33 ` Levente Kurusa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox