From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: [PATCH rdma-next 1/4] Ib/core: Mark local uverbs_std_types functions to be static
Date: Sat, 22 Apr 2017 17:28:49 +0300 [thread overview]
Message-ID: <20170422142852.18882-2-leon@kernel.org> (raw)
In-Reply-To: <20170422142852.18882-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Functions declared in uverbs_std_types.c are local to that file, but
they lack static declarations. This produces a lot of sparse warnings,
like the one below:
drivers/infiniband/core/uverbs_std_types.c:41:5: warning: symbol
'uverbs_free_ah' was not declared.
Should it be static?
So mark them as static.
CC: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
drivers/infiniband/core/uverbs_std_types.c | 48 +++++++++++++++---------------
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/drivers/infiniband/core/uverbs_std_types.c b/drivers/infiniband/core/uverbs_std_types.c
index e3338b19d6a2..ad3caad40945 100644
--- a/drivers/infiniband/core/uverbs_std_types.c
+++ b/drivers/infiniband/core/uverbs_std_types.c
@@ -38,26 +38,26 @@
#include "rdma_core.h"
#include "uverbs.h"
-int uverbs_free_ah(struct ib_uobject *uobject,
- enum rdma_remove_reason why)
+static int uverbs_free_ah(struct ib_uobject *uobject,
+ enum rdma_remove_reason why)
{
return ib_destroy_ah((struct ib_ah *)uobject->object);
}
-int uverbs_free_flow(struct ib_uobject *uobject,
- enum rdma_remove_reason why)
+static int uverbs_free_flow(struct ib_uobject *uobject,
+ enum rdma_remove_reason why)
{
return ib_destroy_flow((struct ib_flow *)uobject->object);
}
-int uverbs_free_mw(struct ib_uobject *uobject,
- enum rdma_remove_reason why)
+static int uverbs_free_mw(struct ib_uobject *uobject,
+ enum rdma_remove_reason why)
{
return uverbs_dealloc_mw((struct ib_mw *)uobject->object);
}
-int uverbs_free_qp(struct ib_uobject *uobject,
- enum rdma_remove_reason why)
+static int uverbs_free_qp(struct ib_uobject *uobject,
+ enum rdma_remove_reason why)
{
struct ib_qp *qp = uobject->object;
struct ib_uqp_object *uqp =
@@ -82,8 +82,8 @@ int uverbs_free_qp(struct ib_uobject *uobject,
return ret;
}
-int uverbs_free_rwq_ind_tbl(struct ib_uobject *uobject,
- enum rdma_remove_reason why)
+static int uverbs_free_rwq_ind_tbl(struct ib_uobject *uobject,
+ enum rdma_remove_reason why)
{
struct ib_rwq_ind_table *rwq_ind_tbl = uobject->object;
struct ib_wq **ind_tbl = rwq_ind_tbl->ind_tbl;
@@ -95,8 +95,8 @@ int uverbs_free_rwq_ind_tbl(struct ib_uobject *uobject,
return ret;
}
-int uverbs_free_wq(struct ib_uobject *uobject,
- enum rdma_remove_reason why)
+static int uverbs_free_wq(struct ib_uobject *uobject,
+ enum rdma_remove_reason why)
{
struct ib_wq *wq = uobject->object;
struct ib_uwq_object *uwq =
@@ -109,8 +109,8 @@ int uverbs_free_wq(struct ib_uobject *uobject,
return ret;
}
-int uverbs_free_srq(struct ib_uobject *uobject,
- enum rdma_remove_reason why)
+static int uverbs_free_srq(struct ib_uobject *uobject,
+ enum rdma_remove_reason why)
{
struct ib_srq *srq = uobject->object;
struct ib_uevent_object *uevent =
@@ -134,8 +134,8 @@ int uverbs_free_srq(struct ib_uobject *uobject,
return ret;
}
-int uverbs_free_cq(struct ib_uobject *uobject,
- enum rdma_remove_reason why)
+static int uverbs_free_cq(struct ib_uobject *uobject,
+ enum rdma_remove_reason why)
{
struct ib_cq *cq = uobject->object;
struct ib_uverbs_event_queue *ev_queue = cq->cq_context;
@@ -153,14 +153,14 @@ int uverbs_free_cq(struct ib_uobject *uobject,
return ret;
}
-int uverbs_free_mr(struct ib_uobject *uobject,
- enum rdma_remove_reason why)
+static int uverbs_free_mr(struct ib_uobject *uobject,
+ enum rdma_remove_reason why)
{
return ib_dereg_mr((struct ib_mr *)uobject->object);
}
-int uverbs_free_xrcd(struct ib_uobject *uobject,
- enum rdma_remove_reason why)
+static int uverbs_free_xrcd(struct ib_uobject *uobject,
+ enum rdma_remove_reason why)
{
struct ib_xrcd *xrcd = uobject->object;
struct ib_uxrcd_object *uxrcd =
@@ -178,8 +178,8 @@ int uverbs_free_xrcd(struct ib_uobject *uobject,
return ret;
}
-int uverbs_free_pd(struct ib_uobject *uobject,
- enum rdma_remove_reason why)
+static int uverbs_free_pd(struct ib_uobject *uobject,
+ enum rdma_remove_reason why)
{
struct ib_pd *pd = uobject->object;
@@ -190,8 +190,8 @@ int uverbs_free_pd(struct ib_uobject *uobject,
return 0;
}
-int uverbs_hot_unplug_completion_event_file(struct ib_uobject_file *uobj_file,
- enum rdma_remove_reason why)
+static int uverbs_hot_unplug_completion_event_file(struct ib_uobject_file *uobj_file,
+ enum rdma_remove_reason why)
{
struct ib_uverbs_completion_event_file *comp_event_file =
container_of(uobj_file, struct ib_uverbs_completion_event_file,
--
2.12.2
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-04-22 14:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-22 14:28 [PATCH rdma-next 0/4] Sparse fixes for 4.12 Leon Romanovsky
[not found] ` <20170422142852.18882-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-04-22 14:28 ` Leon Romanovsky [this message]
[not found] ` <20170422142852.18882-2-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-04-23 6:47 ` [PATCH rdma-next 1/4] Ib/core: Mark local uverbs_std_types functions to be static Matan Barak
2017-04-22 14:28 ` [PATCH rdma-next 2/4] Ib/usnic: Explicitly include usnic headers Leon Romanovsky
2017-04-22 14:28 ` [PATCH rdma-next 3/4] IB/usnic: Simplify the code to balance loc/unlock calls Leon Romanovsky
2017-04-22 14:28 ` [PATCH rdma-next 4/4] IB/nes: Fix incorrect type in assignment Leon Romanovsky
2017-04-28 17:13 ` [PATCH rdma-next 0/4] Sparse fixes for 4.12 Doug Ledford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170422142852.18882-2-leon@kernel.org \
--to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.