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


Groups > linux.kernel > #1569560

[PATCH 6/7] autofs: remove duplicated AUTOFS_DEV_IOCTL_SIZE definition

From Ian Kent <raven@themaw.net>
Newsgroups linux.kernel
Subject [PATCH 6/7] autofs: remove duplicated AUTOFS_DEV_IOCTL_SIZE definition
Date 2017-01-30 11:30 +0100
Message-ID <t5hnJ-2NG-43@gated-at.bofh.it> (permalink)
References <t5hnI-2NG-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Tomohiro Kusumi <tkusumi@tuxera.com>

This macro is already defined in uapi header.
Also use this macro where possible.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Ian Kent <raven@themaw.net>
---
 fs/autofs4/dev-ioctl.c              |    2 --
 include/uapi/linux/auto_dev-ioctl.h |    4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c
index fc09eb7..35099ac 100644
--- a/fs/autofs4/dev-ioctl.c
+++ b/fs/autofs4/dev-ioctl.c
@@ -38,8 +38,6 @@
  * which have been left busy at at service shutdown.
  */
 
-#define AUTOFS_DEV_IOCTL_SIZE	sizeof(struct autofs_dev_ioctl)
-
 typedef int (*ioctl_fn)(struct file *, struct autofs_sb_info *,
 			struct autofs_dev_ioctl *);
 
diff --git a/include/uapi/linux/auto_dev-ioctl.h b/include/uapi/linux/auto_dev-ioctl.h
index af107aa..744b3d0 100644
--- a/include/uapi/linux/auto_dev-ioctl.h
+++ b/include/uapi/linux/auto_dev-ioctl.h
@@ -113,10 +113,10 @@ struct autofs_dev_ioctl {
 
 static inline void init_autofs_dev_ioctl(struct autofs_dev_ioctl *in)
 {
-	memset(in, 0, sizeof(struct autofs_dev_ioctl));
+	memset(in, 0, AUTOFS_DEV_IOCTL_SIZE);
 	in->ver_major = AUTOFS_DEV_IOCTL_VERSION_MAJOR;
 	in->ver_minor = AUTOFS_DEV_IOCTL_VERSION_MINOR;
-	in->size = sizeof(struct autofs_dev_ioctl);
+	in->size = AUTOFS_DEV_IOCTL_SIZE;
 	in->ioctlfd = -1;
 }
 

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/7] autofs: remove wrong comment Ian Kent <raven@themaw.net> - 2017-01-30 11:30 +0100
  [PATCH 2/7] autofs: fix typo in Documentation Ian Kent <raven@themaw.net> - 2017-01-30 11:30 +0100
  [PATCH 4/7] autofs: update ioctl documentation regarding struct  autofs_dev_ioctl Ian Kent <raven@themaw.net> - 2017-01-30 11:30 +0100
  [PATCH 7/7] autofs - take more care to not update last_used on path  walk Ian Kent <raven@themaw.net> - 2017-01-30 11:30 +0100
  [PATCH 6/7] autofs: remove duplicated AUTOFS_DEV_IOCTL_SIZE  definition Ian Kent <raven@themaw.net> - 2017-01-30 11:30 +0100
  [PATCH 5/7] autofs: add command enum/macros for root-dir ioctls Ian Kent <raven@themaw.net> - 2017-01-30 11:30 +0100
  [PATCH 3/7] autofs: fix wrong ioctl documentation regarding devid Ian Kent <raven@themaw.net> - 2017-01-30 11:30 +0100

csiph-web