Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3403736ybi; Sun, 26 May 2019 22:40:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqyq1UMVD5eEGQoqs0Y48uqofqyGKQOL5VNw9kD3yRrAmsN9jpeIMs4ZC1ZQnPHpgQjbPA1k X-Received: by 2002:aa7:96ec:: with SMTP id i12mr120890383pfq.82.1558935651248; Sun, 26 May 2019 22:40:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558935651; cv=none; d=google.com; s=arc-20160816; b=yeDLbqi74JQ0417ASu1iGmeHkfqYRc5utfH5kfJcEModyQrh4QZ151IlN/+LdaVeu9 YU5wTJ94lCpNukbKX2+W/ih8oStsWQ+Ai69s3lL2KvOCwqgN2zevuyLEU33qDUJdHmDQ zs1a1rCIgDH2dmU9Y/amRUHyUvKO6bt6inQx9rCwuHEZvmwGheg4li32PSJ5L3/drsBf TuVS8NsDMtHZHY43sS7abTWNDzHzDuauN6ZK5g0fRuiNjeYOkAARXuieIHY9r9eu/F24 cSnD38HznFZNFHBf8xiNswNPGpLwDQkplOTMOVOqfWREfhXoG2JDdJ1yglxOYbg92hHw irvQ== 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=9f8EBkp33GeosmpX2oSV0NMHC55Eno2P1qWGY2ZUiPM=; b=AoPu+l1B8OeQtLeHM4lkSqcMbv4YfUp2Gfb3LwPMb6P+Y47CNXsS4JToj1rMAF8ZG0 aIj7kNcWqeCnqpQbzT/kdgPkgF8LcYm2S3t7OmyGOGd/CpgM4KP8qgdzlOsr17RYdI13 qndVskRfN1m7+4rhd1kr6h5SMekbgI3TSXXicx0IXhOLdGD2VzAWd5f2nSLM4/67XQDa 8YFFg46+yqjLajouajw9V1AJJUWDDuP7E3/jsEnnKWJRNOiql621Q6QqlBG77yfKvHzc vV7TjxndUVWxwis8awmZf1Y8VtrBvPGJHtdTLJEPuTgDbe3U5rpinIwlHpYNANqVwoh3 mVsg== 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 z127si9494296pgb.71.2019.05.26.22.40.36; Sun, 26 May 2019 22:40:51 -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 S1726425AbfE0FjG (ORCPT + 99 others); Mon, 27 May 2019 01:39:06 -0400 Received: from mga04.intel.com ([192.55.52.120]:7420 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726359AbfE0Fi7 (ORCPT ); Mon, 27 May 2019 01:38:59 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 May 2019 22:38:59 -0700 X-ExtLoop1: 1 Received: from hao-dev.bj.intel.com ([10.238.157.65]) by orsmga001.jf.intel.com with ESMTP; 26 May 2019 22:38:57 -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 v3 02/16] fpga: dfl: fme: remove copy_to_user() in ioctl for PR Date: Mon, 27 May 2019 13:22:12 +0800 Message-Id: <1558934546-12171-3-git-send-email-hao.wu@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1558934546-12171-1-git-send-email-hao.wu@intel.com> References: <1558934546-12171-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. --- 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