From patchwork Wed Mar 27 23:50:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10874355 X-Patchwork-Delegate: jgg@ziepe.ca 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 209E213B5 for ; Wed, 27 Mar 2019 23:51:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D24728C42 for ; Wed, 27 Mar 2019 23:51:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 00A5A28DA0; Wed, 27 Mar 2019 23:51:21 +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 0D4AF28CF7 for ; Wed, 27 Mar 2019 23:51:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727645AbfC0XvF (ORCPT ); Wed, 27 Mar 2019 19:51:05 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:33141 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbfC0XvF (ORCPT ); Wed, 27 Mar 2019 19:51:05 -0400 Received: by mail-pf1-f195.google.com with SMTP id i19so1811497pfd.0 for ; Wed, 27 Mar 2019 16:51:05 -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=N0XtolJdMJCfjRSoL3pH1EVJh1tQJOZ3lk7QmVOH0rE=; b=GYG85l2DgP3kplqc5VmeWDSDqEOq3yfMMsHVA5jflLWKUlDmn20MfAkz10E6qQASP3 o0N7zQIQIKbj/Gmm2jDOGRFM6iYlZSEonEtUKC2aPOJXX6aBRV1Mu1WAizXNAS2umdJV 3pLGXpWDXz3Qq5jMR5SlfxzrHfIHdUC15l7xpwijsS4pF0ao/JIDvVqQ6hV6qk5KID5w KSLYhMaj9BOdQ/7L4PxAfUBBhfx8Ms6Ladu0SrvODyq5AaxhpbSE4r7YVEYNyhpW1jQS JHAPzxLfxvyzPjCdXXnyys9IO56GAD53uQbethNh37G17eTlPd866Avh6EMT3Zi0cXKf 0zmg== X-Gm-Message-State: APjAAAX3d/gvzD1pHXDf3sl9VLeFcOn4Af0uxa4+rmNyusqQa145WXvD Agj+N1GOIpJhUjLwh5li67E= X-Google-Smtp-Source: APXvYqxYhIITVbxQEw5QCFerVox+bSCm4Epv9dJmr1kTjBMajSlnKppeu1+maNclFdTf34G//55U0g== X-Received: by 2002:a62:e315:: with SMTP id g21mr36894167pfh.2.1553730664617; Wed, 27 Mar 2019 16:51:04 -0700 (PDT) Received: from desktop-bart.svl.corp.google.com ([2620:15c:2cd:203:5cdc:422c:7b28:ebb5]) by smtp.gmail.com with ESMTPSA id a3sm16493115pfn.182.2019.03.27.16.51.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Mar 2019 16:51:03 -0700 (PDT) From: Bart Van Assche To: Jason Gunthorpe Cc: Leon Romanovsky , Doug Ledford , linux-rdma@vger.kernel.org, Bart Van Assche Subject: [PATCH v2 1/7] RDMA/uverbs: Add a __user annotation to a pointer Date: Wed, 27 Mar 2019 16:50:45 -0700 Message-Id: <20190327235051.67361-2-bvanassche@acm.org> X-Mailer: git-send-email 2.20.GIT In-Reply-To: <20190327235051.67361-1-bvanassche@acm.org> References: <20190327235051.67361-1-bvanassche@acm.org> MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch avoids that sparse and smatch report the following: warning: cast removes address space of expression Reviewed-by: Leon Romanovsky Fixes: 3a6532c9af1a ("RDMA/uverbs: Use uverbs_attr_bundle to pass udata for write") # v5.0. Signed-off-by: Bart Van Assche --- drivers/infiniband/core/uverbs_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index 70b7d80431a9..b8fc5a329e21 100644 --- a/drivers/infiniband/core/uverbs_main.c +++ b/drivers/infiniband/core/uverbs_main.c @@ -720,7 +720,7 @@ static ssize_t ib_uverbs_write(struct file *filp, const char __user *buf, * then the command request structure starts * with a '__aligned u64 response' member. */ - ret = get_user(response, (const u64 *)buf); + ret = get_user(response, (const u64 __user *)buf); if (ret) goto out_unlock;