From patchwork Wed Aug 16 02:31:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Kent X-Patchwork-Id: 9902831 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C957F602C9 for ; Wed, 16 Aug 2017 02:32:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BAE652876E for ; Wed, 16 Aug 2017 02:32:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AFB01287A1; Wed, 16 Aug 2017 02:32:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7045C2876E for ; Wed, 16 Aug 2017 02:32:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753552AbdHPCbm (ORCPT ); Tue, 15 Aug 2017 22:31:42 -0400 Received: from icp-osb-irony-out4.external.iinet.net.au ([203.59.1.220]:7064 "EHLO icp-osb-irony-out4.external.iinet.net.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753499AbdHPCbj (ORCPT ); Tue, 15 Aug 2017 22:31:39 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2CVAQBDrZNZ/0Tj/dxeGwEBAQMBAQEJAQEBg1qBeY4SkBE4AQEBAQEBBoEIIhGWB4ISHIUrAoQ2PxgBAgEBAQEBAQFrKIUZBiNWEBgBBwUCGA4CAkcQBhOKIgyscoImIgKLRQEBAQcogQuCHYICgQWCKjaKd4JhBZIejh+UQItdhnyWGB84gQpTLwqHcDM2igIBAQE X-IPAS-Result: A2CVAQBDrZNZ/0Tj/dxeGwEBAQMBAQEJAQEBg1qBeY4SkBE4AQEBAQEBBoEIIhGWB4ISHIUrAoQ2PxgBAgEBAQEBAQFrKIUZBiNWEBgBBwUCGA4CAkcQBhOKIgyscoImIgKLRQEBAQcogQuCHYICgQWCKjaKd4JhBZIejh+UQItdhnyWGB84gQpTLwqHcDM2igIBAQE X-IronPort-AV: E=Sophos;i="5.41,380,1498492800"; d="scan'208";a="285016308" Received: from unknown (HELO pluto.themaw.net) ([220.253.227.68]) by icp-osb-irony-out4.iinet.net.au with ESMTP; 16 Aug 2017 10:31:37 +0800 Subject: [PATCH 5/5] autofs: use unsigned int/long instead of uint/ulong for ioctl args From: Ian Kent To: Andrew Morton Cc: linux-fsdevel , Tomohiro Kusumi , autofs mailing list , Kernel Mailing List Date: Wed, 16 Aug 2017 10:31:37 +0800 Message-ID: <150285069709.4670.3884827966280147529.stgit@pluto.themaw.net> In-Reply-To: <150285067347.4670.11494624644273072003.stgit@pluto.themaw.net> References: <150285067347.4670.11494624644273072003.stgit@pluto.themaw.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Tomohiro Kusumi The standard types unsigned int and unsigned long should be used for .compat_ioctl. autofs is the only fs using uing/ulong for this, and these are even the only uint/ulong in the entire autofs code. Drop unneeded long cast in return value of autofs_dev_ioctl_compat(). It's already long. Signed-off-by: Tomohiro Kusumi Signed-off-by: Ian Kent --- fs/autofs4/dev-ioctl.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c index a990c9d0f893..b7c816f39404 100644 --- a/fs/autofs4/dev-ioctl.c +++ b/fs/autofs4/dev-ioctl.c @@ -93,7 +93,7 @@ static int check_dev_ioctl_version(int cmd, struct autofs_dev_ioctl *param) * at the end of the struct. */ static struct autofs_dev_ioctl * - copy_dev_ioctl(struct autofs_dev_ioctl __user *in) +copy_dev_ioctl(struct autofs_dev_ioctl __user *in) { struct autofs_dev_ioctl tmp, *res; @@ -705,7 +705,8 @@ static int _autofs_dev_ioctl(unsigned int command, return err; } -static long autofs_dev_ioctl(struct file *file, uint command, ulong u) +static long autofs_dev_ioctl(struct file *file, unsigned int command, + unsigned long u) { int err; @@ -714,9 +715,10 @@ static long autofs_dev_ioctl(struct file *file, uint command, ulong u) } #ifdef CONFIG_COMPAT -static long autofs_dev_ioctl_compat(struct file *file, uint command, ulong u) +static long autofs_dev_ioctl_compat(struct file *file, unsigned int command, + unsigned long u) { - return (long) autofs_dev_ioctl(file, command, (ulong) compat_ptr(u)); + return autofs_dev_ioctl(file, command, (unsigned long) compat_ptr(u)); } #else #define autofs_dev_ioctl_compat NULL