From patchwork Thu Mar 21 17:24:12 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: 10864141 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 D707314DE for ; Thu, 21 Mar 2019 17:24:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B52A92A1E3 for ; Thu, 21 Mar 2019 17:24:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A959D2A220; Thu, 21 Mar 2019 17:24:29 +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 4EC2B2A247 for ; Thu, 21 Mar 2019 17:24:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728355AbfCURY2 (ORCPT ); Thu, 21 Mar 2019 13:24:28 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:44627 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728404AbfCURY2 (ORCPT ); Thu, 21 Mar 2019 13:24:28 -0400 Received: by mail-pg1-f193.google.com with SMTP id i2so4635540pgj.11 for ; Thu, 21 Mar 2019 10:24:27 -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=sKscjuXba306J0oFC2cgnW9i1xTE5P6Wn7Ji6L35KLw=; b=Fxc7uAMTw2PIwlTyov7vctbxS8ZVihYvGHwqE59ulo3c/Mu7Ukbfqnn5EGIP+9DPYU uOLW01OGAHPRRpJiYkCL6+5GOylgKL8dGsFb+FoWh6cBYP5hz7c5LV5O2iPDArPoa/AO tGSKFCeUg0wzY+UV5rcgI8RnrOdmlzY/CSUGxOnMmRmMi1mGzQHPVI+5NTkk7RQIxhxM H2PpTDM2DQtIze6DCIuYiIkWLcn4rQa/0qgHBY7GO/vnwy7OAM7dwOLmrMgTXe/tH5Sk SKWfNlBx+yxMIOMgUc86KuhXFh5Kq2KNrhzKN16mj+z/M6b9mn/bPR1mlWB/45+1EE8r Oh4Q== X-Gm-Message-State: APjAAAXeEZMIOKPk5U2LEJnK1I+bVEVgpaQEvLhMs1CVh1Uin3IWi9J7 XqraSiRkI8kYZoUxoVGrfWM= X-Google-Smtp-Source: APXvYqzBIu+nwIzU8PJ9ZrgjlxttOVUyHqAHb8CW6NEWIxjp4iWcHL1sw9VvH1NsLATphop/tbmYOQ== X-Received: by 2002:a17:902:8303:: with SMTP id bd3mr4778195plb.10.1553189067326; Thu, 21 Mar 2019 10:24:27 -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 s184sm7528549pfb.1.2019.03.21.10.24.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Mar 2019 10:24:26 -0700 (PDT) From: Bart Van Assche To: Jason Gunthorpe Cc: Leon Romanovsky , Doug Ledford , linux-rdma@vger.kernel.org, Bart Van Assche Subject: [PATCH 3/8] RDMA/uverbs: Allow the compiler to verify declaration and definition consistency Date: Thu, 21 Mar 2019 10:24:12 -0700 Message-Id: <20190321172417.77869-4-bvanassche@acm.org> X-Mailer: git-send-email 2.20.GIT In-Reply-To: <20190321172417.77869-1-bvanassche@acm.org> References: <20190321172417.77869-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? Fixes: 0bd01f3d0907 ("RDMA/uverbs: Require all objects to have a driver destroy function") # v5.0. Signed-off-by: Bart Van Assche Reviewed-by: Leon Romanovsky --- 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