From patchwork Fri Jun 28 00:49:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moritz Fischer X-Patchwork-Id: 11020907 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D5A911580 for ; Fri, 28 Jun 2019 00:51:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C84812870F for ; Fri, 28 Jun 2019 00:51:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BAAEE28727; Fri, 28 Jun 2019 00:51:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 63C0A2870F for ; Fri, 28 Jun 2019 00:51:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726667AbfF1Av1 (ORCPT ); Thu, 27 Jun 2019 20:51:27 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:36388 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726805AbfF1AuU (ORCPT ); Thu, 27 Jun 2019 20:50:20 -0400 Received: by mail-pf1-f194.google.com with SMTP id r7so2068150pfl.3 for ; Thu, 27 Jun 2019 17:50:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=w5YuFi6wQz815HLumeYih2vZ7yJGUUzK81KZ4UHpdkE=; b=I3Fp7MLG09CYCsQKaRkB6Q4j6L/x9CwSs7puyz1Da+K9TD6ewojw39B54XbTURyUq1 x4jHg9/Ohp/Vr9q4iNwD6XLSLZ2QwFmerf42DygxuXE0XZSWdhLAffO6V9EiTiPpI5Zp xNY+H++2Nm+6GTBA46tRFFTmi8Qwb2xGltKyM1m5BWzTD83QW0mM0uXFvA0S8QOXdMok GxPReWhDK6UZncthmPU12DXk88QwYLI6+ZvhS7w1feOa0dJGKZZBkyOSjFL2VslrdiG5 0lyP5HGeO5LsmGwcDn2Ys6KpgFGHyRsnaAJypdthrG9NZxWg6cgpZLivWFSHome89fsp zzdw== X-Gm-Message-State: APjAAAVsCHmgMpOq3J/mUFb4oagtV8jiEu9p283RSEmXku2VA4uIhpxx Q91ijnO30g/HMP3F1+dv6fVTCUsUHBk= X-Google-Smtp-Source: APXvYqxsYnA1syozsfK0rSE+AAruFi3hspGXjnsXOpnbU/0EQNXN73FE9GR0RH5JOn0z34Ftgtlvsg== X-Received: by 2002:a17:90a:dd42:: with SMTP id u2mr9628988pjv.118.1561683018485; Thu, 27 Jun 2019 17:50:18 -0700 (PDT) Received: from localhost (c-76-21-109-208.hsd1.ca.comcast.net. [76.21.109.208]) by smtp.gmail.com with ESMTPSA id v27sm280406pgn.76.2019.06.27.17.50.16 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 27 Jun 2019 17:50:17 -0700 (PDT) From: Moritz Fischer To: linux-fpga@vger.kernel.org, gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Wu Hao , Xu Yilun , Moritz Fischer , Alan Tull Subject: [PATCH 02/15] fpga: dfl: fme: remove copy_to_user() in ioctl for PR Date: Thu, 27 Jun 2019 17:49:38 -0700 Message-Id: <20190628004951.6202-3-mdf@kernel.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190628004951.6202-1-mdf@kernel.org> References: <20190628004951.6202-1-mdf@kernel.org> MIME-Version: 1.0 Sender: linux-fpga-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fpga@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wu Hao 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 Signed-off-by: Moritz Fischer --- 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 d9ca9554844a..6ec0f09e5994 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; }