Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1700639 > unrolled thread

[PATCH] staging/pi433: Solved some coding style issues in pi433_if.c

Started byRishabh Hardas <rishabheudyptula@gmail.com>
First post2017-08-01 07:20 +0200
Last post2017-08-02 10:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] staging/pi433: Solved some coding style issues in pi433_if.c Rishabh Hardas <rishabheudyptula@gmail.com> - 2017-08-01 07:20 +0200
    Re: [PATCH] staging/pi433: Solved some coding style issues in  pi433_if.c "Wolf Entwicklungen" <Marcus.Wolf@Wolf-Entwicklungen.de> - 2017-08-02 10:20 +0200

#1700639 — [PATCH] staging/pi433: Solved some coding style issues in pi433_if.c

FromRishabh Hardas <rishabheudyptula@gmail.com>
Date2017-08-01 07:20 +0200
Subject[PATCH] staging/pi433: Solved some coding style issues in pi433_if.c
Message-ID<u9xL3-7ws-5@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1701833 — Re: [PATCH] staging/pi433: Solved some coding style issues in pi433_if.c

From"Wolf Entwicklungen" <Marcus.Wolf@Wolf-Entwicklungen.de>
Date2017-08-02 10:20 +0200
SubjectRe: [PATCH] staging/pi433: Solved some coding style issues in pi433_if.c
Message-ID<u9X2N-7mD-5@gated-at.bofh.it>
In reply to#1700639
Reviewed-by: Marcus Wolf <linux@wolf-entwicklungen.de>

Thank you :-)

Am Di, 1.08.2017, 07:09 schrieb Rishabh Hardas:
> 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
>
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web