Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2698381ybd; Thu, 27 Jun 2019 17:50:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqw3+flIHZwbJncvIzIj3cn5WSLjSlAyi+Us0wthvRXl41GYRJGw/wGCWhJk3VoadsFavwiK X-Received: by 2002:a17:902:1129:: with SMTP id d38mr8186472pla.220.1561683050335; Thu, 27 Jun 2019 17:50:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561683050; cv=none; d=google.com; s=arc-20160816; b=oDxyrpklH2gqNtl7GhIFTVAPOkafO3Vs7zMn9wn+b4CC0H7PkzSF1gcTNXo4YlKpmc AjwwEjh9LnjnK8ffgdwJ3QwMxgIAv9Sy2SP2ByfYhQfM52cPtoNEhfY78i+xb2uJxLbe hedBsJQmX6cRR4aEjKCklyO0KGH8Zj60SRNyQvFogYrdaHJ+7U9q9OwqABLpHeRBrRnK rmbk43zhTepB57OP8TR1FglXfIAAOK1MhVA/FdV5X7tnSYViMlrvOB3GxTpeexX7YXDq PrNW4poJOTr3GaPNVEvNsea8dzckAFoiMkduBi6F3qR0XyOdq9SZBSoawZt1NENRqxmW 3Vzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=w5YuFi6wQz815HLumeYih2vZ7yJGUUzK81KZ4UHpdkE=; b=LDwG/AtyGbGhQcrfYxfwvpYbCj+7gkhZ7Mota5FDxOVxpo1LDSkbTYAVlpOxw4ppBf 6rMYjZZIHf0xWGUAIyruO6sR0IMciYXKz5xu6fOe3PAiEzmFSC+j1iJ9+K9OJrziDJ2U zismCfW1gQfshZeC6H7+ZZi+FqZ98ZWPOzAxwUhbONkYt8l0KjXcLEOLV3T6xC1Oh2Yf Stjd40GBkLTA75V8jrWUvEtn83sXdkGYQOZr03y5xwZ6lgcZTqPHp4X0AbuJ4iTVnQ1J awCRn4CUuzeML+By/Z6Hy5pYkMDdba+PUVl54uAUvfcteKsOZnQ0cBvpQNa09QUt1JOV W7oA== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 5si648969pgc.385.2019.06.27.17.50.34; Thu, 27 Jun 2019 17:50:50 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726816AbfF1AuU (ORCPT + 99 others); Thu, 27 Jun 2019 20:50:20 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:46231 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726786AbfF1AuT (ORCPT ); Thu, 27 Jun 2019 20:50:19 -0400 Received: by mail-pf1-f195.google.com with SMTP id 81so2043833pfy.13 for ; Thu, 27 Jun 2019 17:50:18 -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=RghZw8n210WBhiaFlhN7k2BtDESAm4YCYVrRd7RYKd4G/iu+Ki3Cpuj9f/MzfdEteY ZOQBQ9zyH66f4EcKU9Us2muctDIJhBNLZRAd937mbwtKVP4bLdQQzvEU+Bjkd5kGpz4n 1uEiPzXt90gpQ75ipPf0h5JYeCW+Qkc+PInMOMRbd3MTibZJ3rOm5BN63tx3fPcS5cZu ZkMwz+pgiGpzawC8zkgksrNh8XwPZnuFCeepvBv/satXCAv05cYDlO2BOs+j02ptzTaf 01uwiWP18nnOY49ASY/aFaaygaUtwq4CdQpPGxHcvfGf39bIY5IwnAlXZBY+ZRRV9S5x IQag== X-Gm-Message-State: APjAAAX9YQQbuJQ+GwGzIOcBj28vCWBBmR4SVjGB1uRrMJCl+Q6tbx00 akqHq6RLffnEMRZSgO2iGHL4eg== 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; } -- 2.22.0