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