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; From patchwork Wed Mar 27 23:50:46 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: 10874357 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 5EA1014DE for ; Wed, 27 Mar 2019 23:51:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A80928BED for ; Wed, 27 Mar 2019 23:51:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E5E728CF7; Wed, 27 Mar 2019 23:51:23 +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 4E19C28BED for ; Wed, 27 Mar 2019 23:51:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727839AbfC0XvG (ORCPT ); Wed, 27 Mar 2019 19:51:06 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:33764 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbfC0XvG (ORCPT ); Wed, 27 Mar 2019 19:51:06 -0400 Received: by mail-pl1-f194.google.com with SMTP id bg8so4049486plb.0 for ; Wed, 27 Mar 2019 16:51:06 -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=C02o4mFU0+HvhOaPe0F7x8yGDr9uMjtqSi9pqCDJpag=; b=YLVwLFRlJqU05JEKRhpu9BtvyI7hKQtcfpkuTP53mwmywi3IBxsNrVm9qdL34KEj6E jwdJtvYd9vNr0LGvipdAA5fSVkR092HOWXaMkLkmpKg/R+gkn0pHm8hKjVKK9Vxl5+js Zl4ROOLqZiAyotLpNSE1R2ftT9QQOm9vO9zxD6WTkr3oU6xuBYicD3z2YEx43tPnLDlu KsSglwiNwCb+jQz2cjXeXQpLeRHa5rUxhFKc7mokl/PBLN9nzCOQkwf6wLC3dtJQVoBA h5ZcWJaWpfBJp3wC8p4ZsojpzeXmq9fbu5tEbh2fb/e9oGaCNipMd5vZmmZ9c/FietI5 EaDw== X-Gm-Message-State: APjAAAWAnU9Z/NzIzFHEkS95oZfjibL52hMyusWNXAlVc0Y7e9PMNSLN ia0fuMf+ZLenYnZn3uLYJIY= X-Google-Smtp-Source: APXvYqxnB9J/AqewvzJKlCfkkD7Xfm0Pbk8abeBAHYhk87vbfLukfHJA3fgAQTZ/dryXdked2Zvecg== X-Received: by 2002:a17:902:765:: with SMTP id 92mr38354475pli.95.1553730665793; Wed, 27 Mar 2019 16:51:05 -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.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Mar 2019 16:51:04 -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 2/7] RDMA/uverbs: Annotate uverbs_request_next_ptr() return value as a __user pointer Date: Wed, 27 Mar 2019 16:50:46 -0700 Message-Id: <20190327235051.67361-3-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 complains about a mismatch between the returned value and the function return type. Reviewed-by: Leon Romanovsky Cc: Doug Ledford Fixes: c3bea3d2dc53 ("RDMA/uverbs: Use the iterator for ib_uverbs_unmarshall_recv()") # v5.0. Signed-off-by: Bart Van Assche --- drivers/infiniband/core/uverbs_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index 062a86c04123..c9acd94b049d 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -162,7 +162,7 @@ static const void __user *uverbs_request_next_ptr(struct uverbs_req_iter *iter, const void __user *res = iter->cur; if (iter->cur + len > iter->end) - return ERR_PTR(-ENOSPC); + return (void __force __user *)ERR_PTR(-ENOSPC); iter->cur += len; return res; } From patchwork Wed Mar 27 23:50:47 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: 10874359 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 8E96414DE for ; Wed, 27 Mar 2019 23:51:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7BFD228DAD for ; Wed, 27 Mar 2019 23:51:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7012928DB6; Wed, 27 Mar 2019 23:51:26 +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 70BFF28B40 for ; Wed, 27 Mar 2019 23:51:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730457AbfC0XvH (ORCPT ); Wed, 27 Mar 2019 19:51:07 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:33766 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbfC0XvH (ORCPT ); Wed, 27 Mar 2019 19:51:07 -0400 Received: by mail-pl1-f196.google.com with SMTP id bg8so4049497plb.0 for ; Wed, 27 Mar 2019 16:51:07 -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=yFFdpbpKdPO2EbKblZuHGoXtX6bIlD/W2OLnLVCg3L0=; b=NC5SBH1c8G7o8bbaHxvfsD1ovx5hBWusyz/Npkrfa02soto5D28zNvDnwHQphBzQZM hA5vivOw1CL8QgFaY945lV5BGtZe/JjDdWxU8dfINrTjDCHfLQBl1N1MNW+Gh1gezLCp +mJzwTcvuB9hDDyCi9u9AHXexEO9xO3pDZWXWk0zJNvhw1O+ZNptQjXlZRnQWU3KgUHh 1EhPLFFP6jU1m5liy48f3tuFTnaj+j2SJEHbHyiMn64FiquXtKrPAwUxjvWnqyjKld7q MWfzM9GyBQF7+cSiAtZmbGwgG1GteRUuLy/MqAFrjZT+cI5KunqngQ3W9+Vt0Ln+VkUg 0s0w== X-Gm-Message-State: APjAAAU21GcJxgFblrNnZ8uftG+gC+COkDdDyFAK65Xl+pECV7tF3grt EUyZ0CdWtlO6j7OxtgC4vd9FTdie X-Google-Smtp-Source: APXvYqy2kverVFxbta5MshlsKN4RRwazwhAmzjarzhP2oWnovxvCijodlMhAXayHbD2Al8KuEE5PWA== X-Received: by 2002:a17:902:681:: with SMTP id 1mr40407160plh.31.1553730666781; Wed, 27 Mar 2019 16:51:06 -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.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Mar 2019 16:51:06 -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 3/7] RDMA/uverbs: Allow the compiler to verify declaration and definition consistency Date: Wed, 27 Mar 2019 16:50:47 -0700 Message-Id: <20190327235051.67361-4-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 reports the following warnings: drivers/infiniband/core/uverbs_std_types_flow_action.c:442:30: warning: symbol 'uverbs_def_obj_flow_action' was not declared. Should it be static? drivers/infiniband/core/uverbs_std_types_dm.c:112:30: warning: symbol 'uverbs_def_obj_dm' was not declared. Should it be static? drivers/infiniband/core/uverbs_std_types_counters.c:153:30: warning: symbol 'uverbs_def_obj_counters' was not declared. Should it be static? drivers/infiniband/core/uverbs_std_types_mr.c:213:30: warning: symbol 'uverbs_def_obj_mr' was not declared. Should it be static? Reviewed-by: Leon Romanovsky Fixes: 0bd01f3d0907 ("RDMA/uverbs: Require all objects to have a driver destroy function") # v5.0. Signed-off-by: Bart Van Assche --- drivers/infiniband/core/uverbs_std_types_counters.c | 1 + drivers/infiniband/core/uverbs_std_types_dm.c | 1 + drivers/infiniband/core/uverbs_std_types_flow_action.c | 1 + drivers/infiniband/core/uverbs_std_types_mr.c | 1 + 4 files changed, 4 insertions(+) diff --git a/drivers/infiniband/core/uverbs_std_types_counters.c b/drivers/infiniband/core/uverbs_std_types_counters.c index 309c5e80988d..7880d50165ed 100644 --- a/drivers/infiniband/core/uverbs_std_types_counters.c +++ b/drivers/infiniband/core/uverbs_std_types_counters.c @@ -31,6 +31,7 @@ * SOFTWARE. */ +#include "rdma_core.h" #include "uverbs.h" #include diff --git a/drivers/infiniband/core/uverbs_std_types_dm.c b/drivers/infiniband/core/uverbs_std_types_dm.c index 2ef70637bee1..de3f04a4398c 100644 --- a/drivers/infiniband/core/uverbs_std_types_dm.c +++ b/drivers/infiniband/core/uverbs_std_types_dm.c @@ -30,6 +30,7 @@ * SOFTWARE. */ +#include "rdma_core.h" #include "uverbs.h" #include diff --git a/drivers/infiniband/core/uverbs_std_types_flow_action.c b/drivers/infiniband/core/uverbs_std_types_flow_action.c index 4962b87fa600..3a87b16a93b3 100644 --- a/drivers/infiniband/core/uverbs_std_types_flow_action.c +++ b/drivers/infiniband/core/uverbs_std_types_flow_action.c @@ -30,6 +30,7 @@ * SOFTWARE. */ +#include "rdma_core.h" #include "uverbs.h" #include diff --git a/drivers/infiniband/core/uverbs_std_types_mr.c b/drivers/infiniband/core/uverbs_std_types_mr.c index 4d4be0c2b752..3b4bf6370333 100644 --- a/drivers/infiniband/core/uverbs_std_types_mr.c +++ b/drivers/infiniband/core/uverbs_std_types_mr.c @@ -30,6 +30,7 @@ * SOFTWARE. */ +#include "rdma_core.h" #include "uverbs.h" #include From patchwork Wed Mar 27 23:50:48 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: 10874361 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 E3CB113B5 for ; Wed, 27 Mar 2019 23:51:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D06C728DC9 for ; Wed, 27 Mar 2019 23:51:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C473028DA5; Wed, 27 Mar 2019 23:51:26 +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 CAF9728C82 for ; Wed, 27 Mar 2019 23:51:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731712AbfC0XvJ (ORCPT ); Wed, 27 Mar 2019 19:51:09 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:39163 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbfC0XvI (ORCPT ); Wed, 27 Mar 2019 19:51:08 -0400 Received: by mail-pg1-f195.google.com with SMTP id k3so6997695pga.6 for ; Wed, 27 Mar 2019 16:51:08 -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=u+4cJHRRN7jknxJ2giGW03aZCvZAhtnRMCf+3phL4Ts=; b=FvOwshm+E6Aoy8+rlqdItWRTBO4/03KdORMgikDnt0pZ7qa7k/VEE/307w2LtUPgM+ WjrnJlNcp3kGemxAE9sRuLgKwnQ1qClXvenjUDftnyN7woH/OSiDTEag3uuKwbfq2Ek7 znWtffzmxnUE37YP5QPyF55mdFv4rcLHaccT0uR2AeifKzbMpdwSR9Z3w0SIf5CHLcPN jP4Zye3lR/RXATfMM1+HgxXNVThUvhiLqrkJmAS9VeYnkvUx9kTrsrwp8VbbIxcXLivq lvuy1m2tHxZED2LAY4Ux4l8bzjYjEUmVGigXws+QzBsR9CE9weUAmc+fjjDyf1mtDjt6 az5w== X-Gm-Message-State: APjAAAU6ar447GkUfh3mLm1q+rFu9IJ/KoQY4WeABFlC38+HWa1DN0Jb WzBJbMt7DWRfhVQZrALSLRc= X-Google-Smtp-Source: APXvYqyKg3N+PPVaL3kHUs62rmrCWOMWXU//fbTmWY5M7so93jEnUaYSzehBG5S/W300psWnSkTbbg== X-Received: by 2002:a62:fb10:: with SMTP id x16mr38159833pfm.5.1553730668252; Wed, 27 Mar 2019 16:51:08 -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.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Mar 2019 16:51:07 -0700 (PDT) From: Bart Van Assche To: Jason Gunthorpe Cc: Leon Romanovsky , Doug Ledford , linux-rdma@vger.kernel.org, Bart Van Assche , Yishai Hadas Subject: [PATCH v2 4/7] IB/mlx5: Declare devx_async_cmd_event_fops static Date: Wed, 27 Mar 2019 16:50:48 -0700 Message-Id: <20190327235051.67361-5-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 Avoid that sparse complains about a missing declaration. Reviewed-by: Leon Romanovsky Cc: Yishai Hadas Fixes: 6bf8f22aea0d ("IB/mlx5: Introduce MLX5_IB_OBJECT_DEVX_ASYNC_CMD_FD") # v5.1-rc1. Signed-off-by: Bart Van Assche --- drivers/infiniband/hw/mlx5/devx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/mlx5/devx.c b/drivers/infiniband/hw/mlx5/devx.c index 9e08df7914aa..fa8d2a9229fa 100644 --- a/drivers/infiniband/hw/mlx5/devx.c +++ b/drivers/infiniband/hw/mlx5/devx.c @@ -1704,7 +1704,7 @@ static __poll_t devx_async_cmd_event_poll(struct file *filp, return pollflags; } -const struct file_operations devx_async_cmd_event_fops = { +static const struct file_operations devx_async_cmd_event_fops = { .owner = THIS_MODULE, .read = devx_async_cmd_event_read, .poll = devx_async_cmd_event_poll, From patchwork Wed Mar 27 23:50:49 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: 10874363 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 09EB213B5 for ; Wed, 27 Mar 2019 23:51:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB55428BFC for ; Wed, 27 Mar 2019 23:51:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF78428DA5; Wed, 27 Mar 2019 23:51:27 +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 E227328BFC for ; Wed, 27 Mar 2019 23:51:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731654AbfC0XvK (ORCPT ); Wed, 27 Mar 2019 19:51:10 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:46262 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbfC0XvJ (ORCPT ); Wed, 27 Mar 2019 19:51:09 -0400 Received: by mail-pf1-f194.google.com with SMTP id 9so10426813pfj.13 for ; Wed, 27 Mar 2019 16:51:09 -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=VPO9/ZYnEQbbHeDlnckQqoT1ctAWSZkdxMfThvkMs3M=; b=BK55HsdUdSl3ibE8nbLv1TYHftdX0cqYmXB812Iae6OLctXXfqJ0h9VNlUD4AvqOGj oKy2moFs91WIhYBMlabcMSDxRXRtiQpntT6hu/4P3ZfWM/makJSlpoDv0XxJ5WPeHxO8 F3BpBdtRv8dRp94rMLJkGxi+5pZXB9K4bIlUNbcUzohUc14cyVLm9uMDMkvGNZu4sMwA hCVGlIMiF6q4jwbausvzDbTDFQpP7asVqxLZGkqP2Q64ixJqRY2DGOpK1+dD9V7IhnrR NG0DwTWN20jfGP9BQw3s5XbN6PRCVRzTipK4AjyO8cll8xh24zcOF1YjCOOx1Im0ftyJ 5KdA== X-Gm-Message-State: APjAAAX1Zs4k9xIym4NFmjz1iaA+K2ZmAyQzR9iG2RIsgg5v7ItWDWWn t/kSQ/5VlzPY2H/lcSszYjE= X-Google-Smtp-Source: APXvYqwkIA2GPvJnJWuan0uKrliWhInMXDsIJ18IeKBSCNkFSiDDzZWfPeAU2K400nfEwXCTUwKdCA== X-Received: by 2002:aa7:8144:: with SMTP id d4mr36327714pfn.88.1553730669194; Wed, 27 Mar 2019 16:51:09 -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.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Mar 2019 16:51:08 -0700 (PDT) From: Bart Van Assche To: Jason Gunthorpe Cc: Leon Romanovsky , Doug Ledford , linux-rdma@vger.kernel.org, Bart Van Assche , Mike Marciniszyn , Dennis Dalessandro Subject: [PATCH v2 5/7] IB/hfi1: Remove set-but-not-used variables Date: Wed, 27 Mar 2019 16:50:49 -0700 Message-Id: <20190327235051.67361-6-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 compiler warnings are reported when building with W=1. Reviewed-by: Leon Romanovsky Cc: Mike Marciniszyn Cc: Dennis Dalessandro Signed-off-by: Bart Van Assche --- drivers/infiniband/hw/hfi1/tid_rdma.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/infiniband/hw/hfi1/tid_rdma.c b/drivers/infiniband/hw/hfi1/tid_rdma.c index fdda33aca77f..93f1762a20cd 100644 --- a/drivers/infiniband/hw/hfi1/tid_rdma.c +++ b/drivers/infiniband/hw/hfi1/tid_rdma.c @@ -2019,7 +2019,6 @@ static int tid_rdma_rcv_error(struct hfi1_packet *packet, trace_hfi1_tid_req_rcv_err(qp, 0, e->opcode, e->psn, e->lpsn, req); if (e->opcode == TID_OP(READ_REQ)) { struct ib_reth *reth; - u32 offset; u32 len; u32 rkey; u64 vaddr; @@ -2031,7 +2030,6 @@ static int tid_rdma_rcv_error(struct hfi1_packet *packet, * The requester always restarts from the start of the original * request. */ - offset = delta_psn(psn, e->psn) * qp->pmtu; len = be32_to_cpu(reth->length); if (psn != e->psn || len != req->total_len) goto unlock; @@ -2465,11 +2463,10 @@ void hfi1_rc_rcv_tid_rdma_read_resp(struct hfi1_packet *packet) u32 opcode, aeth; bool is_fecn; unsigned long flags; - u32 kpsn, ipsn; + u32 ipsn; trace_hfi1_sender_rcv_tid_read_resp(qp); is_fecn = process_ecn(qp, packet); - kpsn = mask_psn(be32_to_cpu(ohdr->bth[2])); aeth = be32_to_cpu(ohdr->u.tid_rdma.r_rsp.aeth); opcode = (be32_to_cpu(ohdr->bth[0]) >> 24) & 0xff; @@ -4486,13 +4483,12 @@ void hfi1_rc_rcv_tid_rdma_ack(struct hfi1_packet *packet) struct rvt_swqe *wqe; struct tid_rdma_request *req; struct tid_rdma_flow *flow; - u32 aeth, psn, req_psn, ack_psn, fspsn, resync_psn, ack_kpsn; - bool is_fecn; + u32 aeth, psn, req_psn, ack_psn, resync_psn, ack_kpsn; unsigned long flags; u16 fidx; trace_hfi1_tid_write_sender_rcv_tid_ack(qp, 0); - is_fecn = process_ecn(qp, packet); + process_ecn(qp, packet); psn = mask_psn(be32_to_cpu(ohdr->bth[2])); aeth = be32_to_cpu(ohdr->u.tid_rdma.ack.aeth); req_psn = mask_psn(be32_to_cpu(ohdr->u.tid_rdma.ack.verbs_psn)); @@ -4691,7 +4687,7 @@ void hfi1_rc_rcv_tid_rdma_ack(struct hfi1_packet *packet) IB_AETH_CREDIT_MASK) { case 0: /* PSN sequence error */ flow = &req->flows[req->acked_tail]; - fspsn = full_flow_psn(flow, flow->flow_state.spsn); + full_flow_psn(flow, flow->flow_state.spsn); trace_hfi1_tid_flow_rcv_tid_ack(qp, req->acked_tail, flow); req->r_ack_psn = mask_psn(be32_to_cpu(ohdr->bth[2])); @@ -4846,10 +4842,9 @@ void hfi1_rc_rcv_tid_rdma_resync(struct hfi1_packet *packet) struct tid_rdma_flow *flow; struct tid_flow_state *fs = &qpriv->flow_state; u32 psn, generation, idx, gen_next; - bool is_fecn; unsigned long flags; - is_fecn = process_ecn(qp, packet); + process_ecn(qp, packet); psn = mask_psn(be32_to_cpu(ohdr->bth[2])); generation = mask_psn(psn + 1) >> HFI1_KDETH_BTH_SEQ_SHIFT; From patchwork Wed Mar 27 23:50:50 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: 10874365 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 78E7F14DE for ; Wed, 27 Mar 2019 23:51:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6503528C9A for ; Wed, 27 Mar 2019 23:51:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5987828CE6; Wed, 27 Mar 2019 23:51:31 +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 4F4E728D2D for ; Wed, 27 Mar 2019 23:51:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732026AbfC0XvL (ORCPT ); Wed, 27 Mar 2019 19:51:11 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:41284 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbfC0XvL (ORCPT ); Wed, 27 Mar 2019 19:51:11 -0400 Received: by mail-pg1-f195.google.com with SMTP id f6so6567248pgs.8 for ; Wed, 27 Mar 2019 16:51:10 -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=JbLUE4ZeBEtatzErzBJZhBCMs3X1iVUG8n999WlHOqM=; b=fC118hWWGLUbeft4XbWqaoK/rao0MTo9Dw/76d3LR+Oy/IgCDONJmjxPY4FWk4gryX t/5mRWycOxYzn5L9aUEvrUI8AUTNQKtdmeJg82/UrWEy4nGJSPEibyduAqwSo6plOwxk UCf6luIMfiLMLS5JlOmB6bQnYM+5LNRHhYW91h9ALbgrbWtXlVbDyZHlWPZgqxH0Bt0R C31l6jvb1Y2Zq8ARuIORVFzQ3Y8jwxnO5nqdajWatNWy1f7uP3GQRh2a+68Ic+2oHbmy uT7dVizuvX9WbiEc6USaCwA1oDw+Z7cO4VWlwy6frnue3fQiRMJQJ3ziU9WN8n1EbwS0 9Gsg== X-Gm-Message-State: APjAAAXpyJAB0LOj/+gLPL/cJ6A8BBn9qHOS1d21C3KXiGQfdiWz7lH/ iMlwIDEiZYHlwf+GSp+HJLQ= X-Google-Smtp-Source: APXvYqw6F/hIHGHUMa9I/s8GDwUjbU5y7eUiMfwYNEmu6yAQKCRNTLn/wMrZ11rCJkdXyYpikCOLKA== X-Received: by 2002:a63:66c1:: with SMTP id a184mr36990352pgc.60.1553730670271; Wed, 27 Mar 2019 16:51:10 -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.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Mar 2019 16:51:09 -0700 (PDT) From: Bart Van Assche To: Jason Gunthorpe Cc: Leon Romanovsky , Doug Ledford , linux-rdma@vger.kernel.org, Bart Van Assche , Mike Marciniszyn , Dennis Dalessandro Subject: [PATCH v2 6/7] IB/hfi1: Fix two format strings Date: Wed, 27 Mar 2019 16:50:50 -0700 Message-Id: <20190327235051.67361-7-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 Enable format string checking for hfi1_cdbg() and fix the resulting compiler warnings. Cc: Mike Marciniszyn Cc: Dennis Dalessandro Signed-off-by: Bart Van Assche --- drivers/infiniband/hw/hfi1/init.c | 4 ++-- drivers/infiniband/hw/hfi1/trace_dbg.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/hw/hfi1/init.c b/drivers/infiniband/hw/hfi1/init.c index faaaac8fbc55..3c339617aa95 100644 --- a/drivers/infiniband/hw/hfi1/init.c +++ b/drivers/infiniband/hw/hfi1/init.c @@ -469,7 +469,7 @@ int hfi1_create_ctxtdata(struct hfi1_pportdata *ppd, int numa, if (rcd->egrbufs.size < hfi1_max_mtu) { rcd->egrbufs.size = __roundup_pow_of_two(hfi1_max_mtu); hfi1_cdbg(PROC, - "ctxt%u: eager bufs size too small. Adjusting to %zu\n", + "ctxt%u: eager bufs size too small. Adjusting to %u\n", rcd->ctxt, rcd->egrbufs.size); } rcd->egrbufs.rcvtid_size = HFI1_MAX_EAGER_BUFFER_SIZE; @@ -2071,7 +2071,7 @@ int hfi1_setup_eagerbufs(struct hfi1_ctxtdata *rcd) rcd->egrbufs.size = alloced_bytes; hfi1_cdbg(PROC, - "ctxt%u: Alloced %u rcv tid entries @ %uKB, total %zuKB\n", + "ctxt%u: Alloced %u rcv tid entries @ %uKB, total %uKB\n", rcd->ctxt, rcd->egrbufs.alloced, rcd->egrbufs.rcvtid_size / 1024, rcd->egrbufs.size / 1024); diff --git a/drivers/infiniband/hw/hfi1/trace_dbg.h b/drivers/infiniband/hw/hfi1/trace_dbg.h index e62171fb7379..de7a87392b8d 100644 --- a/drivers/infiniband/hw/hfi1/trace_dbg.h +++ b/drivers/infiniband/hw/hfi1/trace_dbg.h @@ -86,14 +86,14 @@ DECLARE_EVENT_CLASS(hfi1_trace_template, * actual function to work and can not be in a macro. */ #define __hfi1_trace_def(lvl) \ -void __hfi1_trace_##lvl(const char *funct, char *fmt, ...); \ +void __printf(2, 3) __hfi1_trace_##lvl(const char *funct, char *fmt, ...); \ \ DEFINE_EVENT(hfi1_trace_template, hfi1_ ##lvl, \ TP_PROTO(const char *function, struct va_format *vaf), \ TP_ARGS(function, vaf)) #define __hfi1_trace_fn(lvl) \ -void __hfi1_trace_##lvl(const char *func, char *fmt, ...) \ +void __printf(2, 3) __hfi1_trace_##lvl(const char *func, char *fmt, ...)\ { \ struct va_format vaf = { \ .fmt = fmt, \ From patchwork Wed Mar 27 23:50:51 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: 10874367 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 C059D1575 for ; Wed, 27 Mar 2019 23:51:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A737628DCF for ; Wed, 27 Mar 2019 23:51:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9A4B328DD1; Wed, 27 Mar 2019 23:51:31 +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 1082828A44 for ; Wed, 27 Mar 2019 23:51:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732255AbfC0XvM (ORCPT ); Wed, 27 Mar 2019 19:51:12 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:35137 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbfC0XvM (ORCPT ); Wed, 27 Mar 2019 19:51:12 -0400 Received: by mail-pg1-f196.google.com with SMTP id g8so10714248pgf.2 for ; Wed, 27 Mar 2019 16:51:12 -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=1kKF2KhBi/FR2oMn5OBcELJtOMnpnvXTA9s1B/2yLog=; b=SB7tCbLhgBzvpK1BZHGLY+FMTqetuC0H/m3UgJS4VsYYfOr8OvBJ6+0W/qegsNLZ+F 4wgomqZwvMPgysPXw+qweiwyzX/k2zzb3HTkxMMz/kzft4zfokowvmTEMzuII1BP3jwe zkUXYUGrZEgqVdLNMEM/NCbhK1dLQjrk5NE9aZShVEEKYhvVTU3UPHNjrnlj4etP9gdU QgFPAMgG8ac4TGPRsLe+I0iJS1HDPTnafcNc81osNV8dXCE2y7QrmUfcX6ev0KWWosv/ WfayVbcr1cowzH9NmpsWcK1D1if1z/3WS+ML+/05JlUvIOMNGZMgbuSEtovgUMMZoWkb 7ibQ== X-Gm-Message-State: APjAAAU/DEikMwz/1hlm0wYAbJGnbJlc5BlrJHiiIve8Id7AJPqhKrK3 dffa2M7hmIdlponkuWc2K6r2d5xVXdE= X-Google-Smtp-Source: APXvYqySwPPQPGlV3OpG85H+EXLrOAU6jvUlSGpn3524yp3LuPk/tsFZ5EFer5ZnZU9QLsJlLaEevw== X-Received: by 2002:aa7:8b84:: with SMTP id r4mr16187613pfd.237.1553730671654; Wed, 27 Mar 2019 16:51:11 -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.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Mar 2019 16:51:10 -0700 (PDT) From: Bart Van Assche To: Jason Gunthorpe Cc: Leon Romanovsky , Doug Ledford , linux-rdma@vger.kernel.org, Bart Van Assche , CQ Tang , Mike Marciniszyn , Dean Luick , John A Gregor , Mitko Haralanov Subject: [PATCH v2 7/7] IB/qib: Remove a set-but-not-used variable Date: Wed, 27 Mar 2019 16:50:51 -0700 Message-Id: <20190327235051.67361-8-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 a compiler warning is reported when building with W=1. Reviewed-by: Leon Romanovsky Cc: CQ Tang CC: Mike Marciniszyn Cc: Dean Luick Cc: John A Gregor Cc: Mitko Haralanov Fixes: 49c0e2414b20 ("IB/qib: Change SDMA progression mode depending on single- or multi-rail") # v3.15 Signed-off-by: Bart Van Assche --- drivers/infiniband/hw/qib/qib_user_sdma.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/infiniband/hw/qib/qib_user_sdma.c b/drivers/infiniband/hw/qib/qib_user_sdma.c index 31c523b2a9f5..ef19d39a44b1 100644 --- a/drivers/infiniband/hw/qib/qib_user_sdma.c +++ b/drivers/infiniband/hw/qib/qib_user_sdma.c @@ -225,8 +225,6 @@ qib_user_sdma_queue_create(struct device *dev, int unit, int ctxt, int sctxt) if (sdma_rb_node) { sdma_rb_node->refcount++; } else { - int ret; - sdma_rb_node = kmalloc(sizeof( struct qib_user_sdma_rb_node), GFP_KERNEL); if (!sdma_rb_node) @@ -235,8 +233,7 @@ qib_user_sdma_queue_create(struct device *dev, int unit, int ctxt, int sctxt) sdma_rb_node->refcount = 1; sdma_rb_node->pid = current->pid; - ret = qib_user_sdma_rb_insert(&qib_user_sdma_rb_root, - sdma_rb_node); + qib_user_sdma_rb_insert(&qib_user_sdma_rb_root, sdma_rb_node); } pq->sdma_rb_node = sdma_rb_node;