Skip to content

Commit

Permalink
autofs: remove duplicated AUTOFS_DEV_IOCTL_SIZE definition
Browse files Browse the repository at this point in the history
This macro is already defined in uapi header.  Also use this macro where
possible.

Link: http://lkml.kernel.org/r/148577166656.9801.10322423666945951186.stgit@pluto.themaw.net
Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Tomohiro Kusumi authored and Linus Torvalds committed Feb 28, 2017
1 parent 0fae77f commit 3bb2fbd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions fs/autofs4/dev-ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);

Expand Down
4 changes: 2 additions & 2 deletions include/uapi/linux/auto_dev-ioctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 3bb2fbd

Please sign in to comment.