From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752603AbdA3KYS (ORCPT ); Mon, 30 Jan 2017 05:24:18 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:60941 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751599AbdA3KXP (ORCPT ); Mon, 30 Jan 2017 05:23:15 -0500 X-ME-Sender: X-Sasl-enc: wsL9+bz6pA6qmj+KwJ07diG3JJNcLNtIRdDEUkC8JqCE 1485771668 Subject: [PATCH 6/7] autofs: remove duplicated AUTOFS_DEV_IOCTL_SIZE definition From: Ian Kent To: Andrew Morton Cc: linux-fsdevel , Tomohiro Kusumi , autofs mailing list , Kernel Mailing List Date: Mon, 30 Jan 2017 18:21:06 +0800 Message-ID: <148577166656.9801.10322423666945951186.stgit@pluto.themaw.net> In-Reply-To: <148577164094.9801.4775075118014742496.stgit@pluto.themaw.net> References: <148577164094.9801.4775075118014742496.stgit@pluto.themaw.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tomohiro Kusumi This macro is already defined in uapi header. Also use this macro where possible. Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent --- 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; }