From: kusumi.tomohiro@gmail.com
To: raven@themaw.net, autofs@vger.kernel.org
Cc: Tomohiro Kusumi <tkusumi@tuxera.com>
Subject: [PATCH 6/6] autofs: remove duplicated AUTOFS_DEV_IOCTL_SIZE definition
Date: Tue, 17 Jan 2017 23:42:33 +0900 [thread overview]
Message-ID: <1484664153-20478-6-git-send-email-tkusumi@tuxera.com> (raw)
In-Reply-To: <1484664153-20478-1-git-send-email-tkusumi@tuxera.com>
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>
---
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 6f48d67..806df74 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;
}
--
2.5.5
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
prev parent reply other threads:[~2017-01-17 14:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-17 14:42 [PATCH 1/6] autofs: remove wrong comment kusumi.tomohiro
2017-01-17 14:42 ` [PATCH 2/6] autofs: fix typo in Documentation kusumi.tomohiro
2017-01-17 14:42 ` [PATCH 3/6] autofs: fix wrong ioctl documentation regarding devid kusumi.tomohiro
2017-01-17 14:42 ` [PATCH 4/6] autofs: update ioctl documentation regarding struct autofs_dev_ioctl kusumi.tomohiro
2017-01-17 14:42 ` [PATCH 5/6] autofs: add command enum/macros for root-dir ioctls kusumi.tomohiro
2017-01-17 14:42 ` kusumi.tomohiro [this message]
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=1484664153-20478-6-git-send-email-tkusumi@tuxera.com \
--to=kusumi.tomohiro@gmail.com \
--cc=autofs@vger.kernel.org \
--cc=raven@themaw.net \
--cc=tkusumi@tuxera.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).