mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rishabh Hardas <rishabheudyptula@gmail.com>
To: gregkh@linuxfoundation.org
Cc: colin.king@canonical.com, linux@Wolf-Entwicklungen.de,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Rishabh Hardas <rishabhhardas@gmail.com>
Subject: [PATCH] staging/pi433: Solved some coding style issues in pi433_if.c
Date: Tue,  1 Aug 2017 10:39:06 +0530	[thread overview]
Message-ID: <1501564146-17011-1-git-send-email-rishabheudyptula@gmail.com> (raw)

From: Rishabh Hardas <rishabhhardas@gmail.com>

Solved a few coding style issues, used BIT macro to set MINORBITS.

Signed-off-by: Rishabh Hardas <rishabhhardas@gmail.com>
---
 drivers/staging/pi433/pi433_if.c | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index d9328ce..f10ffc3 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -47,18 +47,18 @@
 #include <linux/kthread.h>
 #include <linux/wait.h>
 #include <linux/spi/spi.h>
+#include <linux/bitops.h>
 #ifdef CONFIG_COMPAT
-#include <asm/compat.h>
+#include <linux/compat.h>
 #endif

 #include "pi433_if.h"
 #include "rf69.h"

-
-#define N_PI433_MINORS			(1U << MINORBITS) /*32*/	/* ... up to 256 */
-#define MAX_MSG_SIZE			900	/* min: FIFO_SIZE! */
-#define MSG_FIFO_SIZE			65536   /* 65536 = 2^16  */
-#define NUM_DIO				2
+#define N_PI433_MINORS		BIT(MINORBITS) /*32*/ /* ... up to 256 */
+#define MAX_MSG_SIZE		900	/* min: FIFO_SIZE! */
+#define MSG_FIFO_SIZE		65536   /* 65536 = 2^16  */
+#define NUM_DIO			2

 static dev_t pi433_dev;
 static DEFINE_IDR(pi433_idr);
@@ -66,10 +66,14 @@

 static struct class *pi433_class; /* mainly for udev to create /dev/pi433 */

-/* tx config is instance specific
-	so with each open a new tx config struct is needed */
-/* rx config is device specific
-	so we have just one rx config, ebedded in device struct */
+/*
+ * tx config is instance specific
+ * so with each open a new tx config struct is needed
+ */
+/*
+ * rx config is device specific
+ * so we have just one rx config, ebedded in device struct
+ */
 struct pi433_device {
 	/* device handling related values */
 	dev_t			devt;
--
1.9.1

             reply	other threads:[~2017-08-01  5:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-01  5:09 Rishabh Hardas [this message]
2017-08-02  8:15 ` Wolf Entwicklungen
2017-08-15  0:54 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2017-07-31 10:21 RishabhHardas
2017-07-31 12:54 ` Wolf Entwicklungen
2017-07-31 15:56 ` Greg KH

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=1501564146-17011-1-git-send-email-rishabheudyptula@gmail.com \
    --to=rishabheudyptula@gmail.com \
    --cc=colin.king@canonical.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@Wolf-Entwicklungen.de \
    --cc=rishabhhardas@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome