Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7371470imu; Wed, 14 Nov 2018 16:29:40 -0800 (PST) X-Google-Smtp-Source: AJdET5eQA27DmIJGghGQegcs2GIW5phuqcvqJCB/EudoPbTy+hUXO/fDBFWVHFz2lcrWA/CMix9q X-Received: by 2002:a63:d747:: with SMTP id w7mr3710456pgi.360.1542241780467; Wed, 14 Nov 2018 16:29:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542241780; cv=none; d=google.com; s=arc-20160816; b=HTSJs2LEFeWo5bguUsPUSPIxKiweKxW4YDH4TKekp1z+25rth21JGC86PGGJ2CHNf3 0PbmcHUZMrSGssyg0qQ5dXXhwjpKFQtvOwOHBxXA1vN4LN+mC3hS9hDgHLpc8/630kSC Lq4lc2JUoO6hc3pSF0DVLqwUb2ysHBc/o9JRFaiBlEUJGx67KmA0vwooG4yg6ajT/nb9 dMSnRje2keT/1KyLyMhj7X9yYFG6vHjg45klz0GGtK33lCvDoVVbsK7RFNVzYHC5MEOl FxYH2TmnPd2azN2Lq9P1tnAkHxvAKHWzChiJAwF02FgJKXUhCfBDBc4Y4eBcO7lfH3wh +bow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=+YBnNurkqDo7ErqUbtfeyI5S4n0SWhVxEZNF1H10U08=; b=KggJPz4C0cL/CkaL56Wi5vTCdo+uY7VNJGQgsejF46KJLB90/LBbnhl3MedzYbxHGz kmYYOughSEOeqJ5E+SzoV5ewo2VZ7Dv4VcnW95ba6Kq5GPH/+QkoYg2R9A2p2p3ADRke evqOMeE38WkgoYfTeVPJ75Hi8Yl51vNrTVmAT6BnwUIbUYfYaB1jqAnNVF5VolxCIV3I ZhBwKhP/dEL5Oo9s3vgeXJo/59qhf3Xpi8ERK6PFbeXqUlX5T+URylCthliAYB0C0BGh xFlBsn0XBb87CUXpx7ZlWcreKTirA+LQ4aFfsMIpOaK2co08vkol/iU9c7IoGhkOH0fi Cu2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lixom-net.20150623.gappssmtp.com header.s=20150623 header.b=ZGqqP+Gv; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b10si8155716plz.233.2018.11.14.16.29.26; Wed, 14 Nov 2018 16:29:40 -0800 (PST) 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=@lixom-net.20150623.gappssmtp.com header.s=20150623 header.b=ZGqqP+Gv; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727381AbeKOKdl (ORCPT + 99 others); Thu, 15 Nov 2018 05:33:41 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:40935 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726169AbeKOKdl (ORCPT ); Thu, 15 Nov 2018 05:33:41 -0500 Received: by mail-pl1-f193.google.com with SMTP id b22-v6so3132446pls.7 for ; Wed, 14 Nov 2018 16:28:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lixom-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=+YBnNurkqDo7ErqUbtfeyI5S4n0SWhVxEZNF1H10U08=; b=ZGqqP+Gvxz89We5VkbQ98KgKuA8EiRmJF5fF7P2tmTEExGi1Nixn2oUtDSHqacP3RL NTApvPwGWQC5u87ShFaZXdKXJYQswrMp4IM0nqPq1jjRiH96XXkhGfPMu7em6ni6X+9z tsPn4I1sMPT2rohyuxsCc5rZgtx9EnZXSGk4SnCDMiU8njE/LNER+GWM8CjxCqLtmGAx 7raXT5d4a5vtCMvd7v/87zwvVm7V4YOqItL2d6UeLLEldS93epH6Y4Afwmy1Aw/XjUhY +B8YHBJUqaetNzdo5y5+Aocyusw8tjgm/bif5T9km2t4y0RDwgmqh4pD9PVFsE4NJbb5 kYGA== 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; bh=+YBnNurkqDo7ErqUbtfeyI5S4n0SWhVxEZNF1H10U08=; b=AxM/afUZ93xlDdQx8J3Kdb12JQYFPJ1zqO16CmFXyeQsGkpharAeLfyDJ6PjmRY/Lh tokeb5UPhV/CEcXa8MMqTALmtVlvS7OeH7CGQYIzq/hY7/8BFo0qj+n+mwuyv1rXN991 TpjDUYFJD0UdK0lF5yEwWsYpoEcxNXFIhKoeURvjHhUxJydkumUA6XNEGIMeYr8y3gpI EqqIV3NVpNbWg48bZPmNT8bRCuJ9CUyMmn42ggeEf8AV0+Oa1TQrNyuLzw2ptTbjc/6R xnEbZl02/PNBoHwOLGrUGF+1banijAqWSA+aTNs9tqE8HMYgLJMT8J67XTp9B3nxA56S YqDw== X-Gm-Message-State: AGRZ1gJXiWgPjx+b6LCAe1rRfeQ4oxHrQOQNqa9qEbTsplChNdYRzY4c ybyjmXts8NLEoQlRsAPhM/ZDKQ== X-Received: by 2002:a17:902:bb83:: with SMTP id m3-v6mr3957902pls.144.1542241688346; Wed, 14 Nov 2018 16:28:08 -0800 (PST) Received: from localhost.localdomain (99-152-116-91.lightspeed.sntcca.sbcglobal.net. [99.152.116.91]) by smtp.gmail.com with ESMTPSA id d8-v6sm29159472pfj.106.2018.11.14.16.28.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 16:28:07 -0800 (PST) From: Olof Johansson To: Palmer Dabbelt Cc: Albert Ou , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Olof Johansson Subject: [PATCH] RISC-V: Fix raw_copy_{to,from}_user() Date: Wed, 14 Nov 2018 16:27:55 -0800 Message-Id: <20181115002755.24195-1-olof@lixom.net> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sparse highlighted it, and appears to be a pure bug (from vs to). ./arch/riscv/include/asm/uaccess.h:403:35: warning: incorrect type in argument 1 (different address spaces) ./arch/riscv/include/asm/uaccess.h:403:39: warning: incorrect type in argument 2 (different address spaces) ./arch/riscv/include/asm/uaccess.h:409:37: warning: incorrect type in argument 1 (different address spaces) ./arch/riscv/include/asm/uaccess.h:409:41: warning: incorrect type in argument 2 (different address spaces) Signed-off-by: Olof Johansson --- arch/riscv/include/asm/uaccess.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/riscv/include/asm/uaccess.h b/arch/riscv/include/asm/uaccess.h index 473cfc84e412f..8c3e3e3c8be12 100644 --- a/arch/riscv/include/asm/uaccess.h +++ b/arch/riscv/include/asm/uaccess.h @@ -400,13 +400,13 @@ extern unsigned long __must_check __asm_copy_from_user(void *to, static inline unsigned long raw_copy_from_user(void *to, const void __user *from, unsigned long n) { - return __asm_copy_to_user(to, from, n); + return __asm_copy_from_user(to, from, n); } static inline unsigned long raw_copy_to_user(void __user *to, const void *from, unsigned long n) { - return __asm_copy_from_user(to, from, n); + return __asm_copy_to_user(to, from, n); } extern long strncpy_from_user(char *dest, const char __user *src, long count); -- 2.11.0