Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1625481ybd; Wed, 26 Jun 2019 22:02:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqw+bYcfjiz1IF86WSPIt4RsbZ+ojWbAZ2hwXG//pASihKVesTyQRRYUY42YUW4s5uJuVhvb X-Received: by 2002:a63:4f07:: with SMTP id d7mr1769808pgb.77.1561611747736; Wed, 26 Jun 2019 22:02:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561611747; cv=none; d=google.com; s=arc-20160816; b=KQ4rhZVb0gUeFYKIGFf3OuBWXEFzCP4rzGMJHmX2YBRyfbfqwTgpSFhh/eRx+NzQ/U KCrHUrHOmLVXoA5UjHd593F+I3iHmV4bT4xO1uKIl1tWWnCHfrJuJGwGx1mZbJw+4L+7 cBkCannqvlWwZ3z6PcQYDhZ5sTsTVqRrk3GRZKFA2r8lncFUCbMUnup2/oKjmYjyVOIn bIwvGP7yGKHlc8Pl86Q0gO10XmrUXMZDzP3LzptH1xPu8ngOVHRDdulEDTxHbljJsIvy Eb/iUL+DZ//i4vAfas7bZuSX/WyO1ibmOw2RQ2Gv5KO2ha/jUYzau+UkbmgTYb8CjEDx Ot+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=+tlSwkydr1PiPjUrVJr2qEMvQW+7vsXYLWtdCWcYOaE=; b=kE5rVjo9BxeltAFxWj/UuqqZOvs0k2bgykuhkQJd6xNVenB8xPtvX833KGOpTLMFo7 WnGBwfAn+sIzgWJc/k8QqPa7fQQphaGWmUGwe2ixrKN8y6E9loPwoTgP23gBQ3JtFVan hIpRW7tS8GYrHTn78oBDQtOVkEbLro4JAPiHeMwhOyhr1JqmxgK2u1BGxezZctdK+yGb WNm1OXL8aKZ5N64bdZSnreHAsdVEcHGCRfaDEpMHHWic+4KJ5W3feNGyWWWxUfQWiE4V LvHcWebv/mFYIx9qJFK9KiYqfH9D/Qx7j1SSbCiWNH/m6nLms8tiUDYXgmo2TFdxhRYP lOCA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t18si1430116pfh.29.2019.06.26.22.02.03; Wed, 26 Jun 2019 22:02:27 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727243AbfF0FBy (ORCPT + 99 others); Thu, 27 Jun 2019 01:01:54 -0400 Received: from mga11.intel.com ([192.55.52.93]:22916 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726563AbfF0FBx (ORCPT ); Thu, 27 Jun 2019 01:01:53 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jun 2019 22:01:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,422,1557212400"; d="scan'208";a="173005022" Received: from hao-dev.bj.intel.com ([10.238.157.65]) by orsmga002.jf.intel.com with ESMTP; 26 Jun 2019 22:01:51 -0700 From: Wu Hao To: mdf@kernel.org, linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org Cc: linux-api@vger.kernel.org, yilun.xu@intel.com, hao.wu@intel.com, gregkh@linuxfoundation.org, atull@kernel.org Subject: [PATCH v4 02/15] fpga: dfl: fme: remove copy_to_user() in ioctl for PR Date: Thu, 27 Jun 2019 12:44:42 +0800 Message-Id: <1561610695-5414-3-git-send-email-hao.wu@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1561610695-5414-1-git-send-email-hao.wu@intel.com> References: <1561610695-5414-1-git-send-email-hao.wu@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch removes copy_to_user() code in partial reconfiguration ioctl, as it's useless as user never needs to read the data structure after ioctl. Signed-off-by: Xu Yilun Signed-off-by: Wu Hao Acked-by: Moritz Fischer Acked-by: Alan Tull --- v2: clean up code split from patch 2 in v1 patchset. v3: no change. v4: no change. --- drivers/fpga/dfl-fme-pr.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/fpga/dfl-fme-pr.c b/drivers/fpga/dfl-fme-pr.c index d9ca955..6ec0f09 100644 --- a/drivers/fpga/dfl-fme-pr.c +++ b/drivers/fpga/dfl-fme-pr.c @@ -159,9 +159,6 @@ static int fme_pr(struct platform_device *pdev, unsigned long arg) mutex_unlock(&pdata->lock); free_exit: vfree(buf); - if (copy_to_user((void __user *)arg, &port_pr, minsz)) - return -EFAULT; - return ret; } -- 1.8.3.1