All of lore.kernel.org
 help / color / mirror / Atom feed
From: vv <zhengdi05@gmail.com>
To: unlisted-recipients:; (no To-header on input)@casper.infradead.org
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	m.chehab@samsung.com, zhengdi05@gmail.com
Subject: [PATCH]staging: media: lirc_parallel.c: fix coding style
Date: Sun, 06 Jul 2014 21:37:06 +0800	[thread overview]
Message-ID: <53B95102.3030001@gmail.com> (raw)

>From 9d2c680fb573985588d33e31379d50ef3fb6e2fd Mon Sep 17 00:00:00 2001
From: Zheng Di <zhengdi05@gmail.com>
Date: Sun, 6 Jul 2014 20:41:53 +0800
Subject: [PATCH] staging: media: lirc_parallel.c: fix coding style

This patch fix checkpatch:
WARNING: else is not generally useful after a break or return
WARNING: line over 80 characters

Signed-off-by: Zheng Di <zhengdi05@gmail.com>
---
 drivers/staging/media/lirc/lirc_parallel.c |   32
++++++++++++++--------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/media/lirc/lirc_parallel.c
b/drivers/staging/media/lirc/lirc_parallel.c
index 1394f02..d7eb2a4 100644
--- a/drivers/staging/media/lirc/lirc_parallel.c
+++ b/drivers/staging/media/lirc/lirc_parallel.c
@@ -169,23 +169,23 @@ static unsigned int init_lirc_timer(void)
            newtimer = (1000000*count)/timeelapsed;
            pr_info("%u Hz timer detected\n", newtimer);
            return newtimer;
-       }  else {
-           newtimer = (1000000*count)/timeelapsed;
-           if (abs(newtimer - default_timer) > default_timer/10) {
-               /* bad timer */
-               pr_notice("bad timer: %u Hz\n", newtimer);
-               pr_notice("using default timer: %u Hz\n",
-                     default_timer);
-               return default_timer;
-           } else {
-               pr_info("%u Hz timer detected\n", newtimer);
-               return newtimer; /* use detected value */
-           }
        }
-   } else {
-       pr_notice("no timer detected\n");
-       return 0;
+
+       newtimer = (1000000*count)/timeelapsed;
+       if (abs(newtimer - default_timer) > default_timer/10) {
+           /* bad timer */
+           pr_notice("bad timer: %u Hz\n", newtimer);
+           pr_notice("using default timer: %u Hz\n",
+                 default_timer);
+           return default_timer;
+       }
+
+       pr_info("%u Hz timer detected\n", newtimer);
+       return newtimer; /* use detected value */
    }
+
+   pr_notice("no timer detected\n");
+   return 0;
 }

 static int lirc_claim(void)
@@ -661,7 +661,7 @@ static int __init lirc_parallel_init(void)
        goto exit_device_put;
    }
    ppdevice = parport_register_device(pport, LIRC_DRIVER_NAME,
-                      pf, kf, lirc_lirc_irq_handler, 0, NULL);
+                  pf, kf, lirc_lirc_irq_handler, 0, NULL);
    parport_put_port(pport);
    if (ppdevice == NULL) {
        pr_notice("parport_register_device() failed\n");
-- 
1.7.9.5

WARNING: multiple messages have this Message-ID (diff)
From: vv <zhengdi05@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	m.chehab@samsung.com, zhengdi05@gmail.com
Subject: [PATCH]staging: media: lirc_parallel.c: fix coding style
Date: Sun, 06 Jul 2014 21:37:06 +0800	[thread overview]
Message-ID: <53B95102.3030001@gmail.com> (raw)

>From 9d2c680fb573985588d33e31379d50ef3fb6e2fd Mon Sep 17 00:00:00 2001
From: Zheng Di <zhengdi05@gmail.com>
Date: Sun, 6 Jul 2014 20:41:53 +0800
Subject: [PATCH] staging: media: lirc_parallel.c: fix coding style

This patch fix checkpatch:
WARNING: else is not generally useful after a break or return
WARNING: line over 80 characters

Signed-off-by: Zheng Di <zhengdi05@gmail.com>
---
 drivers/staging/media/lirc/lirc_parallel.c |   32
++++++++++++++--------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/media/lirc/lirc_parallel.c
b/drivers/staging/media/lirc/lirc_parallel.c
index 1394f02..d7eb2a4 100644
--- a/drivers/staging/media/lirc/lirc_parallel.c
+++ b/drivers/staging/media/lirc/lirc_parallel.c
@@ -169,23 +169,23 @@ static unsigned int init_lirc_timer(void)
            newtimer = (1000000*count)/timeelapsed;
            pr_info("%u Hz timer detected\n", newtimer);
            return newtimer;
-       }  else {
-           newtimer = (1000000*count)/timeelapsed;
-           if (abs(newtimer - default_timer) > default_timer/10) {
-               /* bad timer */
-               pr_notice("bad timer: %u Hz\n", newtimer);
-               pr_notice("using default timer: %u Hz\n",
-                     default_timer);
-               return default_timer;
-           } else {
-               pr_info("%u Hz timer detected\n", newtimer);
-               return newtimer; /* use detected value */
-           }
        }
-   } else {
-       pr_notice("no timer detected\n");
-       return 0;
+
+       newtimer = (1000000*count)/timeelapsed;
+       if (abs(newtimer - default_timer) > default_timer/10) {
+           /* bad timer */
+           pr_notice("bad timer: %u Hz\n", newtimer);
+           pr_notice("using default timer: %u Hz\n",
+                 default_timer);
+           return default_timer;
+       }
+
+       pr_info("%u Hz timer detected\n", newtimer);
+       return newtimer; /* use detected value */
    }
+
+   pr_notice("no timer detected\n");
+   return 0;
 }

 static int lirc_claim(void)
@@ -661,7 +661,7 @@ static int __init lirc_parallel_init(void)
        goto exit_device_put;
    }
    ppdevice = parport_register_device(pport, LIRC_DRIVER_NAME,
-                      pf, kf, lirc_lirc_irq_handler, 0, NULL);
+                  pf, kf, lirc_lirc_irq_handler, 0, NULL);
    parport_put_port(pport);
    if (ppdevice == NULL) {
        pr_notice("parport_register_device() failed\n");
-- 
1.7.9.5

             reply	other threads:[~2014-07-15 14:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-06 13:37 vv [this message]
2014-07-06 13:37 ` [PATCH]staging: media: lirc_parallel.c: fix coding style vv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53B95102.3030001@gmail.com \
    --to=zhengdi05@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.