2014-01-15 22:30:33

by Michał Kwiatkowski

[permalink] [raw]
Subject: [PATCH] Staging: android: fix parentheses coding style issue in alarm-dev.c

This is a patch to the alarm-dev.c file that removes parentheses which
should not appear in return statement. This error was found by the
checkpatch.pl tool.

Signed-off-by: Michał Kwiatkowski <[email protected]>
---
drivers/staging/android/alarm-dev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/android/alarm-dev.c b/drivers/staging/android/alarm-dev.c
index 647694f..96b2f53 100644
--- a/drivers/staging/android/alarm-dev.c
+++ b/drivers/staging/android/alarm-dev.c
@@ -68,8 +68,8 @@ static struct devalarm alarms[ANDROID_ALARM_TYPE_COUNT];
*/
static int is_wakeup(enum android_alarm_type type)
{
- return (type == ANDROID_ALARM_RTC_WAKEUP ||
- type == ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP);
+ return type == ANDROID_ALARM_RTC_WAKEUP ||
+ type == ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP;
}


--
1.7.9.5


2014-01-16 17:51:11

by Levente Kurusa

[permalink] [raw]
Subject: Re: [PATCH] Staging: android: fix parentheses coding style issue in alarm-dev.c

Hello,

On 01/16/2014 12:32 AM, Michał Kwiatkowski wrote:
> This is a patch to the alarm-dev.c file that removes parentheses which
> should not appear in return statement. This error was found by the
> checkpatch.pl tool.
>
> Signed-off-by: Michał Kwiatkowski <[email protected]>
> [...]
> +++ b/drivers/staging/android/alarm-dev.c
> @@ -68,8 +68,8 @@ static struct devalarm alarms[ANDROID_ALARM_TYPE_COUNT];
> */
> static int is_wakeup(enum android_alarm_type type)
> {
> - return (type == ANDROID_ALARM_RTC_WAKEUP ||
> - type == ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP);
> + return type == ANDROID_ALARM_RTC_WAKEUP ||
> + type == ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP;
> }

This is the fourth patch that does the exact same, an other similar patch
was already applied, hence this one will not apply. Please base your patches
on -next or the staging.git tree.

--
Regards,
Levente Kurusa