Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5334172yba; Wed, 8 May 2019 11:30:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqyV9buOdIiEWE/UUxARGQXAPBb/RyTbxl8keXv/4H93LEyQMYVLVAOJw7JhH4/ixH8gZkpe X-Received: by 2002:a17:902:8b86:: with SMTP id ay6mr49894864plb.4.1557340253475; Wed, 08 May 2019 11:30:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557340253; cv=none; d=google.com; s=arc-20160816; b=swNmwvUCBHmU6r+VUS2Xsu35Zj+RNWvm6DoMRlK94lGdGABZ9igscBcN9/3KCte3ju ecMdyT6f4yzJ4jbg8b7nrweXqZTI1DgI49DLa1be4t1fGYyNcCdwMfURRPIij4oScG1C qx4ymUm70BSepUw+ybh10sE+XqipwE2r9Tm31OVlq3hP+LkR4gQ3VFiZN+7S1VGxMhjD 4vOxMyr7909dzwKd6zDk5xz9NN0avVHqsdctutPjGlaFoqOLKk0+0MGjaHwFYfeVfqR5 dTlhl4OqHfTxGQPn/qhk9FtJzrO9fu+WKsQQfVeDOHaq9UPqoh/m2Q4/KY5p0MvOBPih PSiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=pM+RJeZ7W5wRPsW1J8q2HtsyaFzUD8O7hMO5MKxLh7w=; b=0VKF2KLV9yweOz3KFPuMJVhOh2SiE4wgG276nonzi1eB1NOYnUGpiJk78QXxsDwujK tZaHA7dmec8EikIMxuF59l6ukhgFON2XJtDdcDNBCSN4cs9aR9KgK0hwCT5OuE0+5ysP 05/PZrmEKOqiX/twuvdY71pr8fr2HOjtP/g0Kz25o+qNBltwpYCCPLDaX1S/BDQq/uMZ n1oZHFOIE2YNSxzXkyyTdYRk6oJ1V1yJA82mhjsdYQDweADYOniEziNmuR9fItYYABNL Hcj/BC8nxjR15VS3VfSKgJsWGMo3WVAhFala1or42QqA9Wwdba+xnNey//ckbJr7H27p C0mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rWmn8Mr+; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w13si10898807pge.212.2019.05.08.11.30.37; Wed, 08 May 2019 11:30:53 -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; dkim=pass header.i=@kernel.org header.s=default header.b=rWmn8Mr+; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727503AbfEHR7h (ORCPT + 99 others); Wed, 8 May 2019 13:59:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:49940 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727020AbfEHR7h (ORCPT ); Wed, 8 May 2019 13:59:37 -0400 Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 625E4216C4; Wed, 8 May 2019 17:59:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557338376; bh=b5K64YXT7/sSRzaEq78fChRqJJ4XU1m70tof6WpAG0w=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=rWmn8Mr+YPTa3635iOLHVkNMUruBEji6pJ6mseb6pKa9/D199fcFhEezGXV3fJiM2 HzlrDLrDTX0EQvnnv1OVfu+I21ukIHtvNcNr4jSrOXpA7J5kyNd+tdHpE4If5xl3Q7 hyR4jVEoI7159KcfDjLkPxxz0aqAOuM0cFpU+HLQ= Received: by mail-ed1-f47.google.com with SMTP id n17so22922230edb.0; Wed, 08 May 2019 10:59:36 -0700 (PDT) X-Gm-Message-State: APjAAAUMz/RtV/QVLrcsI+BsBJse/sDFVGzF0ZvKTHBfvfEbjqD+MRBc 6D7JQsUX7PJyZHo0b5A8JScCessWSN1IixjHnRc= X-Received: by 2002:a50:8803:: with SMTP id b3mr41531239edb.153.1557338375023; Wed, 08 May 2019 10:59:35 -0700 (PDT) MIME-Version: 1.0 References: <1556528151-17221-1-git-send-email-hao.wu@intel.com> <1556528151-17221-3-git-send-email-hao.wu@intel.com> <20190507172545.GA26690@archbox> In-Reply-To: <20190507172545.GA26690@archbox> From: Alan Tull Date: Wed, 8 May 2019 12:58:59 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 02/18] fpga: dfl: fme: remove copy_to_user() in ioctl for PR To: Moritz Fischer Cc: Wu Hao , linux-fpga@vger.kernel.org, linux-kernel , linux-api@vger.kernel.org, Xu Yilun Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 7, 2019 at 12:26 PM Moritz Fischer wrote: > > On Mon, Apr 29, 2019 at 04:55:35PM +0800, Wu Hao wrote: > > 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 Alan > > --- > > 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 > >