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


Groups > linux.kernel > #1542641 > unrolled thread

[PATCH 1/5] irda: irproc.c: Remove unneeded linux/miscdevice.h include

Started byCorentin Labbe <clabbe.montjoie@gmail.com>
First post2016-12-15 12:10 +0100
Last post2016-12-17 17:20 +0100
Articles 8 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/5] irda: irproc.c: Remove unneeded linux/miscdevice.h include Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-12-15 12:10 +0100
    [PATCH 5/5] irda: irnet: add member name to the miscdevice declaration Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-12-15 12:10 +0100
      Re: [PATCH 5/5] irda: irnet: add member name to the miscdevice  declaration David Miller <davem@davemloft.net> - 2016-12-17 17:20 +0100
    [PATCH 4/5] irda: irnet: Remove unused IRNET_MAJOR define Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-12-15 12:50 +0100
      Re: [PATCH 4/5] irda: irnet: Remove unused IRNET_MAJOR define David Miller <davem@davemloft.net> - 2016-12-17 17:20 +0100
    [PATCH 2/5] irda: irnet: Move linux/miscdevice.h include Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-12-15 13:00 +0100
      Re: [PATCH 2/5] irda: irnet: Move linux/miscdevice.h include David Miller <davem@davemloft.net> - 2016-12-17 17:20 +0100
    Re: [PATCH 1/5] irda: irproc.c: Remove unneeded linux/miscdevice.h  include David Miller <davem@davemloft.net> - 2016-12-17 17:20 +0100

#1542641 — [PATCH 1/5] irda: irproc.c: Remove unneeded linux/miscdevice.h include

FromCorentin Labbe <clabbe.montjoie@gmail.com>
Date2016-12-15 12:10 +0100
Subject[PATCH 1/5] irda: irproc.c: Remove unneeded linux/miscdevice.h include
Message-ID<sOC5c-52L-7@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1542642 — [PATCH 5/5] irda: irnet: add member name to the miscdevice declaration

FromCorentin Labbe <clabbe.montjoie@gmail.com>
Date2016-12-15 12:10 +0100
Subject[PATCH 5/5] irda: irnet: add member name to the miscdevice declaration
Message-ID<sOC5c-52L-13@gated-at.bofh.it>
In reply to#1542641
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

[toc] | [prev] | [next] | [standalone]


#1544003 — Re: [PATCH 5/5] irda: irnet: add member name to the miscdevice declaration

FromDavid Miller <davem@davemloft.net>
Date2016-12-17 17:20 +0100
SubjectRe: [PATCH 5/5] irda: irnet: add member name to the miscdevice declaration
Message-ID<sPpSi-3tm-23@gated-at.bofh.it>
In reply to#1542642
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.

[toc] | [prev] | [next] | [standalone]


#1542658 — [PATCH 4/5] irda: irnet: Remove unused IRNET_MAJOR define

FromCorentin Labbe <clabbe.montjoie@gmail.com>
Date2016-12-15 12:50 +0100
Subject[PATCH 4/5] irda: irnet: Remove unused IRNET_MAJOR define
Message-ID<sOCHT-5f3-3@gated-at.bofh.it>
In reply to#1542641
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

[toc] | [prev] | [next] | [standalone]


#1543998 — Re: [PATCH 4/5] irda: irnet: Remove unused IRNET_MAJOR define

FromDavid Miller <davem@davemloft.net>
Date2016-12-17 17:20 +0100
SubjectRe: [PATCH 4/5] irda: irnet: Remove unused IRNET_MAJOR define
Message-ID<sPpSh-3tm-1@gated-at.bofh.it>
In reply to#1542658
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.

[toc] | [prev] | [next] | [standalone]


#1542664 — [PATCH 2/5] irda: irnet: Move linux/miscdevice.h include

FromCorentin Labbe <clabbe.montjoie@gmail.com>
Date2016-12-15 13:00 +0100
Subject[PATCH 2/5] irda: irnet: Move linux/miscdevice.h include
Message-ID<sOCRF-5ig-19@gated-at.bofh.it>
In reply to#1542641
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

[toc] | [prev] | [next] | [standalone]


#1543999 — Re: [PATCH 2/5] irda: irnet: Move linux/miscdevice.h include

FromDavid Miller <davem@davemloft.net>
Date2016-12-17 17:20 +0100
SubjectRe: [PATCH 2/5] irda: irnet: Move linux/miscdevice.h include
Message-ID<sPpSh-3tm-3@gated-at.bofh.it>
In reply to#1542664
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.

[toc] | [prev] | [next] | [standalone]


#1544004 — Re: [PATCH 1/5] irda: irproc.c: Remove unneeded linux/miscdevice.h include

FromDavid Miller <davem@davemloft.net>
Date2016-12-17 17:20 +0100
SubjectRe: [PATCH 1/5] irda: irproc.c: Remove unneeded linux/miscdevice.h include
Message-ID<sPpSi-3tm-29@gated-at.bofh.it>
In reply to#1542641
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.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web