Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp995630imu; Fri, 11 Jan 2019 12:57:34 -0800 (PST) X-Google-Smtp-Source: ALg8bN6CI9ZvqRXed4wIgF63A4kDQQ56QX6NJOE7BVQqh4DCgPWe/ugVt3PPARBTVUkwysWegjvp X-Received: by 2002:a17:902:a710:: with SMTP id w16mr15785749plq.95.1547240254097; Fri, 11 Jan 2019 12:57:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547240254; cv=none; d=google.com; s=arc-20160816; b=Rqf7VGFqB4RMeayMB+UFWJQWvB9yXOYv58FW3F43PlqeLsTz6svXurPIvkaQMVC4hJ BtKOH+3KtoBjNEui7pCe9lWnU3VpC1RaPfrFIxM9emppqfWeUXQztfsw3eAyethifTZ2 eWdY1uYw8KPge3igxG0o3ZZFEjkZI1COh1LOvScUkWJxHwrRFP4wWdxWQURTx2hIXWYO br89C/8jmBuMwkVVEz0tQadmNC3XxM01uWtw82CfzGKk1+xHaedWieItGvIw4qGH4KXD Po6RfBz8pjAJkVZ9Kr32loevEAoJWGMoF4xQ5QJRiAoyIJzXGLjcHB8zvcehEXU/Y6jz oYZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=iMs/08grKUKeyJNc16SBl6/0zIJKaQp+E/CCklxB6es=; b=hC+seTM6YGt4Ah3N+LAL+cR8PPDC8ZDVFWIV8R0Jj8OapXYKleNrqbOoZ2c6Hr7akk O0fQip+5pmrfxeU18XEOm4yaBPsd9JS8mmfJOhsu20AZhOhewSPo6hlwSzuNar4xc/68 Gs842kvIuSqm05JzQurUGGX6u6vJ3I/b/zYdL0vfG9/R0OPYqaq1jR9kFy/wYX/ES/l8 jvj4Bx5nvScKVOlqTpIA087qAIx7HHUJwK0R+HZdqm3gLdHoxGkeGVG2K/mQnrVo8oeU 6a+pDJhIBTzrgRAgJ0RtMstDzS3Zn3DmbL29SGCFywZQKzuEYVRCFHBsDqWQMocbpfM0 KuGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=TXDJKDjx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k18si11103122pfd.241.2019.01.11.12.57.18; Fri, 11 Jan 2019 12:57:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=TXDJKDjx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732960AbfAKSFe (ORCPT + 99 others); Fri, 11 Jan 2019 13:05:34 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:41814 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730629AbfAKSFe (ORCPT ); Fri, 11 Jan 2019 13:05:34 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x0BI5QJ5058843; Fri, 11 Jan 2019 12:05:26 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1547229926; bh=iMs/08grKUKeyJNc16SBl6/0zIJKaQp+E/CCklxB6es=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=TXDJKDjx5XtporYqu/JuqogHkUnYSvAHYhqhkevL2a7EimKDhcmExd9DcNGGt05NC R3BwoJzIdiBfDM8FNLZT5g2EQPjJbw/70jDf1wrC65x2DJRtDcFoeX4pgc8lg4KL9T yfV4kev16T9Uw051Jg3Apzxg6P4hTHac6Pn/IuPo= Received: from DFLE111.ent.ti.com (dfle111.ent.ti.com [10.64.6.32]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x0BI5QMn022391 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 11 Jan 2019 12:05:26 -0600 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Fri, 11 Jan 2019 12:05:26 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Fri, 11 Jan 2019 12:05:26 -0600 Received: from legion.dal.desgin.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id x0BI5Qmo022544; Fri, 11 Jan 2019 12:05:26 -0600 Received: from localhost (uda0226330.dhcp.ti.com [172.22.109.196]) by legion.dal.desgin.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id x0BI5PU07710; Fri, 11 Jan 2019 12:05:25 -0600 (CST) From: "Andrew F. Davis" To: Laura Abbott , Sumit Semwal , Greg Kroah-Hartman , =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= CC: , , , "Andrew F . Davis" Subject: [PATCH 02/14] staging: android: ion: Remove empty ion_ioctl_dir() function Date: Fri, 11 Jan 2019 12:05:11 -0600 Message-ID: <20190111180523.27862-3-afd@ti.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190111180523.27862-1-afd@ti.com> References: <20190111180523.27862-1-afd@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This function is empty of real function and can be replaced with _IOC_DIR(). Signed-off-by: Andrew F. Davis --- drivers/staging/android/ion/ion-ioctl.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/staging/android/ion/ion-ioctl.c b/drivers/staging/android/ion/ion-ioctl.c index a8d3cc412fb9..b366f97a5728 100644 --- a/drivers/staging/android/ion/ion-ioctl.c +++ b/drivers/staging/android/ion/ion-ioctl.c @@ -31,23 +31,11 @@ static int validate_ioctl_arg(unsigned int cmd, union ion_ioctl_arg *arg) return 0; } -/* fix up the cases where the ioctl direction bits are incorrect */ -static unsigned int ion_ioctl_dir(unsigned int cmd) -{ - switch (cmd) { - default: - return _IOC_DIR(cmd); - } -} - long ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) { int ret = 0; - unsigned int dir; union ion_ioctl_arg data; - dir = ion_ioctl_dir(cmd); - if (_IOC_SIZE(cmd) > sizeof(data)) return -EINVAL; @@ -65,7 +53,7 @@ long ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) return ret; } - if (!(dir & _IOC_WRITE)) + if (!(_IOC_DIR(cmd) & _IOC_WRITE)) memset(&data, 0, sizeof(data)); switch (cmd) { @@ -90,7 +78,7 @@ long ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) return -ENOTTY; } - if (dir & _IOC_READ) { + if (_IOC_DIR(cmd) & _IOC_READ) { if (copy_to_user((void __user *)arg, &data, _IOC_SIZE(cmd))) return -EFAULT; } -- 2.19.1