All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] irda: irproc.c: Remove unneeded linux/miscdevice.h include
@ 2016-12-15 10:42 Corentin Labbe
  2016-12-15 10:42 ` [PATCH 2/5] irda: irnet: Move " Corentin Labbe
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Corentin Labbe @ 2016-12-15 10:42 UTC (permalink / raw)
  To: arnd, gregkh, samuel, davem; +Cc: linux-kernel, netdev, Corentin Labbe

irproc.c does not use any miscdevice so this patch remove this
unnecessary inclusion.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
 net/irda/irproc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/irda/irproc.c b/net/irda/irproc.c
index b9ac598..77cfdde 100644
--- a/net/irda/irproc.c
+++ b/net/irda/irproc.c
@@ -23,7 +23,6 @@
  *
  ********************************************************************/
 
-#include <linux/miscdevice.h>
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 #include <linux/module.h>
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/5] irda: irnet: Move linux/miscdevice.h include
  2016-12-15 10:42 [PATCH 1/5] irda: irproc.c: Remove unneeded linux/miscdevice.h include Corentin Labbe
@ 2016-12-15 10:42 ` Corentin Labbe
  2016-12-17 16:18   ` David Miller
  2016-12-15 10:42 ` [PATCH 3/5] irnet: ppp: move IRNET_MINOR to include/linux/miscdevice.h Corentin Labbe
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Corentin Labbe @ 2016-12-15 10:42 UTC (permalink / raw)
  To: arnd, gregkh, samuel, davem; +Cc: linux-kernel, netdev, Corentin Labbe

The only use of miscdevice is irda_ppp so no need to include
linux/miscdevice.h for all irda files.
This patch move the linux/miscdevice.h include to irnet_ppp.h

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
 net/irda/irnet/irnet.h     | 1 -
 net/irda/irnet/irnet_ppp.h | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/irda/irnet/irnet.h b/net/irda/irnet/irnet.h
index 8d65bb9..c69f0f3 100644
--- a/net/irda/irnet/irnet.h
+++ b/net/irda/irnet/irnet.h
@@ -245,7 +245,6 @@
 #include <linux/tty.h>
 #include <linux/proc_fs.h>
 #include <linux/netdevice.h>
-#include <linux/miscdevice.h>
 #include <linux/poll.h>
 #include <linux/capability.h>
 #include <linux/ctype.h>	/* isspace() */
diff --git a/net/irda/irnet/irnet_ppp.h b/net/irda/irnet/irnet_ppp.h
index 9402258..693ebc0 100644
--- a/net/irda/irnet/irnet_ppp.h
+++ b/net/irda/irnet/irnet_ppp.h
@@ -15,6 +15,7 @@
 /***************************** INCLUDES *****************************/
 
 #include "irnet.h"		/* Module global include */
+#include <linux/miscdevice.h>
 
 /************************ CONSTANTS & MACROS ************************/
 
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/5] irnet: ppp: move IRNET_MINOR to include/linux/miscdevice.h
  2016-12-15 10:42 [PATCH 1/5] irda: irproc.c: Remove unneeded linux/miscdevice.h include Corentin Labbe
  2016-12-15 10:42 ` [PATCH 2/5] irda: irnet: Move " Corentin Labbe
@ 2016-12-15 10:42 ` Corentin Labbe
  2016-12-15 11:54   ` Greg KH
  2016-12-17 16:18   ` David Miller
  2016-12-15 10:42 ` [PATCH 4/5] irda: irnet: Remove unused IRNET_MAJOR define Corentin Labbe
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 11+ messages in thread
From: Corentin Labbe @ 2016-12-15 10:42 UTC (permalink / raw)
  To: arnd, gregkh, samuel, davem; +Cc: linux-kernel, netdev, Corentin Labbe

This patch move the define for IRNET_MINOR to include/linux/miscdevice.h
It is better that all minor number definitions are in the same place.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
 include/linux/miscdevice.h | 1 +
 net/irda/irnet/irnet_ppp.h | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h
index 18b2e3b..5ea0a65 100644
--- a/include/linux/miscdevice.h
+++ b/include/linux/miscdevice.h
@@ -37,6 +37,7 @@
 #define HWRNG_MINOR		183
 #define MICROCODE_MINOR		184
 #define KEYPAD_MINOR		185
+#define IRNET_MINOR		187
 #define D7S_MINOR		193
 #define VFIO_MINOR		196
 #define TUN_MINOR		200
diff --git a/net/irda/irnet/irnet_ppp.h b/net/irda/irnet/irnet_ppp.h
index 693ebc0..18fcead 100644
--- a/net/irda/irnet/irnet_ppp.h
+++ b/net/irda/irnet/irnet_ppp.h
@@ -21,7 +21,6 @@
 
 /* /dev/irnet file constants */
 #define IRNET_MAJOR	10	/* Misc range */
-#define IRNET_MINOR	187	/* Official allocation */
 
 /* IrNET control channel stuff */
 #define IRNET_MAX_COMMAND	256	/* Max length of a command line */
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/5] irda: irnet: Remove unused IRNET_MAJOR define
  2016-12-15 10:42 [PATCH 1/5] irda: irproc.c: Remove unneeded linux/miscdevice.h include Corentin Labbe
  2016-12-15 10:42 ` [PATCH 2/5] irda: irnet: Move " Corentin Labbe
  2016-12-15 10:42 ` [PATCH 3/5] irnet: ppp: move IRNET_MINOR to include/linux/miscdevice.h Corentin Labbe
@ 2016-12-15 10:42 ` Corentin Labbe
  2016-12-17 16:18   ` David Miller
  2016-12-15 10:42 ` [PATCH 5/5] irda: irnet: add member name to the miscdevice declaration Corentin Labbe
  2016-12-17 16:18 ` [PATCH 1/5] irda: irproc.c: Remove unneeded linux/miscdevice.h include David Miller
  4 siblings, 1 reply; 11+ messages in thread
From: Corentin Labbe @ 2016-12-15 10:42 UTC (permalink / raw)
  To: arnd, gregkh, samuel, davem; +Cc: linux-kernel, netdev, Corentin Labbe

The IRNET_MAJOR define is not used, so this patch remove it.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
 net/irda/irnet/irnet_ppp.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/net/irda/irnet/irnet_ppp.h b/net/irda/irnet/irnet_ppp.h
index 18fcead..ec092c9 100644
--- a/net/irda/irnet/irnet_ppp.h
+++ b/net/irda/irnet/irnet_ppp.h
@@ -19,9 +19,6 @@
 
 /************************ CONSTANTS & MACROS ************************/
 
-/* /dev/irnet file constants */
-#define IRNET_MAJOR	10	/* Misc range */
-
 /* IrNET control channel stuff */
 #define IRNET_MAX_COMMAND	256	/* Max length of a command line */
 
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 5/5] irda: irnet: add member name to the miscdevice declaration
  2016-12-15 10:42 [PATCH 1/5] irda: irproc.c: Remove unneeded linux/miscdevice.h include Corentin Labbe
                   ` (2 preceding siblings ...)
  2016-12-15 10:42 ` [PATCH 4/5] irda: irnet: Remove unused IRNET_MAJOR define Corentin Labbe
@ 2016-12-15 10:42 ` Corentin Labbe
  2016-12-17 16:18   ` David Miller
  2016-12-17 16:18 ` [PATCH 1/5] irda: irproc.c: Remove unneeded linux/miscdevice.h include David Miller
  4 siblings, 1 reply; 11+ messages in thread
From: Corentin Labbe @ 2016-12-15 10:42 UTC (permalink / raw)
  To: arnd, gregkh, samuel, davem; +Cc: linux-kernel, netdev, Corentin Labbe

Since the struct miscdevice have many members, it is dangerous to init
it without members name relying only on member order.

This patch add member name to the init declaration.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
 net/irda/irnet/irnet_ppp.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/irda/irnet/irnet_ppp.h b/net/irda/irnet/irnet_ppp.h
index ec092c9..1ed17f9 100644
--- a/net/irda/irnet/irnet_ppp.h
+++ b/net/irda/irnet/irnet_ppp.h
@@ -108,9 +108,9 @@ static const struct file_operations irnet_device_fops =
 /* Structure so that the misc major (drivers/char/misc.c) take care of us... */
 static struct miscdevice irnet_misc_device =
 {
-	IRNET_MINOR,
-	"irnet",
-	&irnet_device_fops
+	.minor = IRNET_MINOR,
+	.name = "irnet",
+	.file_operations = &irnet_device_fops
 };
 
 #endif /* IRNET_PPP_H */
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/5] irnet: ppp: move IRNET_MINOR to include/linux/miscdevice.h
  2016-12-15 10:42 ` [PATCH 3/5] irnet: ppp: move IRNET_MINOR to include/linux/miscdevice.h Corentin Labbe
@ 2016-12-15 11:54   ` Greg KH
  2016-12-17 16:18   ` David Miller
  1 sibling, 0 replies; 11+ messages in thread
From: Greg KH @ 2016-12-15 11:54 UTC (permalink / raw)
  To: Corentin Labbe; +Cc: arnd, samuel, davem, linux-kernel, netdev

On Thu, Dec 15, 2016 at 11:42:48AM +0100, Corentin Labbe wrote:
> This patch move the define for IRNET_MINOR to include/linux/miscdevice.h
> It is better that all minor number definitions are in the same place.
> 
> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
> ---
>  include/linux/miscdevice.h | 1 +
>  net/irda/irnet/irnet_ppp.h | 1 -
>  2 files changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h
> index 18b2e3b..5ea0a65 100644
> --- a/include/linux/miscdevice.h
> +++ b/include/linux/miscdevice.h
> @@ -37,6 +37,7 @@
>  #define HWRNG_MINOR		183
>  #define MICROCODE_MINOR		184
>  #define KEYPAD_MINOR		185
> +#define IRNET_MINOR		187
>  #define D7S_MINOR		193
>  #define VFIO_MINOR		196
>  #define TUN_MINOR		200
> diff --git a/net/irda/irnet/irnet_ppp.h b/net/irda/irnet/irnet_ppp.h
> index 693ebc0..18fcead 100644
> --- a/net/irda/irnet/irnet_ppp.h
> +++ b/net/irda/irnet/irnet_ppp.h
> @@ -21,7 +21,6 @@
>  
>  /* /dev/irnet file constants */
>  #define IRNET_MAJOR	10	/* Misc range */
> -#define IRNET_MINOR	187	/* Official allocation */
>  
>  /* IrNET control channel stuff */
>  #define IRNET_MAX_COMMAND	256	/* Max length of a command line */
> -- 
> 2.10.2

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/5] irda: irproc.c: Remove unneeded linux/miscdevice.h include
  2016-12-15 10:42 [PATCH 1/5] irda: irproc.c: Remove unneeded linux/miscdevice.h include Corentin Labbe
                   ` (3 preceding siblings ...)
  2016-12-15 10:42 ` [PATCH 5/5] irda: irnet: add member name to the miscdevice declaration Corentin Labbe
@ 2016-12-17 16:18 ` David Miller
  4 siblings, 0 replies; 11+ messages in thread
From: David Miller @ 2016-12-17 16:18 UTC (permalink / raw)
  To: clabbe.montjoie; +Cc: arnd, gregkh, samuel, linux-kernel, netdev

From: Corentin Labbe <clabbe.montjoie@gmail.com>
Date: Thu, 15 Dec 2016 11:42:46 +0100

> irproc.c does not use any miscdevice so this patch remove this
> unnecessary inclusion.
> 
> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/5] irda: irnet: Move linux/miscdevice.h include
  2016-12-15 10:42 ` [PATCH 2/5] irda: irnet: Move " Corentin Labbe
@ 2016-12-17 16:18   ` David Miller
  0 siblings, 0 replies; 11+ messages in thread
From: David Miller @ 2016-12-17 16:18 UTC (permalink / raw)
  To: clabbe.montjoie; +Cc: arnd, gregkh, samuel, linux-kernel, netdev

From: Corentin Labbe <clabbe.montjoie@gmail.com>
Date: Thu, 15 Dec 2016 11:42:47 +0100

> The only use of miscdevice is irda_ppp so no need to include
> linux/miscdevice.h for all irda files.
> This patch move the linux/miscdevice.h include to irnet_ppp.h
> 
> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/5] irnet: ppp: move IRNET_MINOR to include/linux/miscdevice.h
  2016-12-15 10:42 ` [PATCH 3/5] irnet: ppp: move IRNET_MINOR to include/linux/miscdevice.h Corentin Labbe
  2016-12-15 11:54   ` Greg KH
@ 2016-12-17 16:18   ` David Miller
  1 sibling, 0 replies; 11+ messages in thread
From: David Miller @ 2016-12-17 16:18 UTC (permalink / raw)
  To: clabbe.montjoie; +Cc: arnd, gregkh, samuel, linux-kernel, netdev

From: Corentin Labbe <clabbe.montjoie@gmail.com>
Date: Thu, 15 Dec 2016 11:42:48 +0100

> This patch move the define for IRNET_MINOR to include/linux/miscdevice.h
> It is better that all minor number definitions are in the same place.
> 
> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 4/5] irda: irnet: Remove unused IRNET_MAJOR define
  2016-12-15 10:42 ` [PATCH 4/5] irda: irnet: Remove unused IRNET_MAJOR define Corentin Labbe
@ 2016-12-17 16:18   ` David Miller
  0 siblings, 0 replies; 11+ messages in thread
From: David Miller @ 2016-12-17 16:18 UTC (permalink / raw)
  To: clabbe.montjoie; +Cc: arnd, gregkh, samuel, linux-kernel, netdev

From: Corentin Labbe <clabbe.montjoie@gmail.com>
Date: Thu, 15 Dec 2016 11:42:49 +0100

> The IRNET_MAJOR define is not used, so this patch remove it.
> 
> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 5/5] irda: irnet: add member name to the miscdevice declaration
  2016-12-15 10:42 ` [PATCH 5/5] irda: irnet: add member name to the miscdevice declaration Corentin Labbe
@ 2016-12-17 16:18   ` David Miller
  0 siblings, 0 replies; 11+ messages in thread
From: David Miller @ 2016-12-17 16:18 UTC (permalink / raw)
  To: clabbe.montjoie; +Cc: arnd, gregkh, samuel, linux-kernel, netdev

From: Corentin Labbe <clabbe.montjoie@gmail.com>
Date: Thu, 15 Dec 2016 11:42:50 +0100

> Since the struct miscdevice have many members, it is dangerous to init
> it without members name relying only on member order.
> 
> This patch add member name to the init declaration.
> 
> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-12-17 16:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-15 10:42 [PATCH 1/5] irda: irproc.c: Remove unneeded linux/miscdevice.h include Corentin Labbe
2016-12-15 10:42 ` [PATCH 2/5] irda: irnet: Move " Corentin Labbe
2016-12-17 16:18   ` David Miller
2016-12-15 10:42 ` [PATCH 3/5] irnet: ppp: move IRNET_MINOR to include/linux/miscdevice.h Corentin Labbe
2016-12-15 11:54   ` Greg KH
2016-12-17 16:18   ` David Miller
2016-12-15 10:42 ` [PATCH 4/5] irda: irnet: Remove unused IRNET_MAJOR define Corentin Labbe
2016-12-17 16:18   ` David Miller
2016-12-15 10:42 ` [PATCH 5/5] irda: irnet: add member name to the miscdevice declaration Corentin Labbe
2016-12-17 16:18   ` David Miller
2016-12-17 16:18 ` [PATCH 1/5] irda: irproc.c: Remove unneeded linux/miscdevice.h include David Miller

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.