Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3437266yba; Mon, 29 Apr 2019 02:15:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqw442+JDHTdfLlJf7MBBGgHHuYk8Z68/bvEk6hQoK8XDidAeo1Arhh1pq+vJbiNlphOAnMQ X-Received: by 2002:a63:30c5:: with SMTP id w188mr57883765pgw.76.1556529334940; Mon, 29 Apr 2019 02:15:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556529334; cv=none; d=google.com; s=arc-20160816; b=GfwhcRCfQWVkTz6dh66kef7/nh0VL5bBXtJ1t1aJCvRFwmLrkeiDlAcd3x5rV4WGVT 6DeAa70nvFr07VabI2DQnlVST58j/JJ4aJRzIODU0O/cRzDYLdN1GRHSeeW5yJhq0x6s O+UDPhjQLK0cjnaIBj5OOn+NKSX5GSJaSgrTZg0KiC0RzFo7qMcOxH6t8HXUJTHeueZ5 dHExBVbS+tcrx38vJnF96f//oCQx8EvI30msjPqcYx5o1cCER/Ls1uexseY2Jqae3dAz 7GtTB17YAZSI1abJuwK66g68CvzRPh9hWcbtD4pImQVWQ1BHGqAtMsS3kV1wEEjw/PzJ TTWQ== 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=8IR9KB1iKCFjJgJhboj07h5TrccsNMNqCJUEymsSy80=; b=L1pyumDFc5EGdwLd4w4pCqX0DcGFliHkPT3sUuCFhoG5abEWJanE5kHnzTulTFjV9e Dy5EBq1lvSG5YTvqHt7gNvsodKRXPyaARGxnKoRFxnfV4caWB7q0EHd5oIN3t0VvLbIg eKQk8heV+xDXXpm3PG7Ts+RKMaTZE5/AsPabl//+RFKKLJoqkQ9OBcihX748Uj84ecbH vIiyTg5r+TXYh1qU280sBSO8g/4P+/+QEEo1n7l+rnsM5aKtXvYEB2R8RlTV+1bhidJR 2jUdseStEdAVBY2oA8acDwcibujSCZ3bhXJ74m+KLkvfSfoI0GECpDwOKSd/MsbbCwBI XefA== 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 z6si32225539pln.54.2019.04.29.02.15.19; Mon, 29 Apr 2019 02:15:34 -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 S1727842AbfD2JMm (ORCPT + 99 others); Mon, 29 Apr 2019 05:12:42 -0400 Received: from mga02.intel.com ([134.134.136.20]:32625 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727750AbfD2JMk (ORCPT ); Mon, 29 Apr 2019 05:12:40 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Apr 2019 02:12:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,409,1549958400"; d="scan'208";a="165988190" Received: from hao-dev.bj.intel.com ([10.238.157.65]) by fmsmga004.fm.intel.com with ESMTP; 29 Apr 2019 02:12:37 -0700 From: Wu Hao To: atull@kernel.org, mdf@kernel.org, linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org Cc: linux-api@vger.kernel.org, Wu Hao , Xu Yilun Subject: [PATCH v2 02/18] fpga: dfl: fme: remove copy_to_user() in ioctl for PR Date: Mon, 29 Apr 2019 16:55:35 +0800 Message-Id: <1556528151-17221-3-git-send-email-hao.wu@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556528151-17221-1-git-send-email-hao.wu@intel.com> References: <1556528151-17221-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 --- v2: clean up code split from patch 2 in v1 patchset. --- 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