From: Corentin Labbe <clabbe.montjoie@gmail.com>
To: arnd@arndb.de, gregkh@linuxfoundation.org, samuel@sortiz.org,
davem@davemloft.net
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
Corentin Labbe <clabbe.montjoie@gmail.com>
Subject: [PATCH 5/5] irda: irnet: add member name to the miscdevice declaration
Date: Thu, 15 Dec 2016 11:42:50 +0100 [thread overview]
Message-ID: <20161215104250.16813-5-clabbe.montjoie@gmail.com> (raw)
In-Reply-To: <20161215104250.16813-1-clabbe.montjoie@gmail.com>
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
next prev parent reply other threads:[~2016-12-15 11:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Corentin Labbe [this message]
2016-12-17 16:18 ` [PATCH 5/5] irda: irnet: add member name to the miscdevice declaration David Miller
2016-12-17 16:18 ` [PATCH 1/5] irda: irproc.c: Remove unneeded linux/miscdevice.h include David Miller
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=20161215104250.16813-5-clabbe.montjoie@gmail.com \
--to=clabbe.montjoie@gmail.com \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=samuel@sortiz.org \
/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