summaryrefslogtreecommitdiff
path: root/include/rdma/rdma_cm.h
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2015-08-03 10:01:52 -0700
committerDoug Ledford <dledford@redhat.com>2015-10-30 17:57:49 -0400
commitdb7489e07669073970358b6cacf6a9dd8dc9275e (patch)
tree74ff570c9b3e633c4323b1cffa0617e37a090124 /include/rdma/rdma_cm.h
parent39bfc271bd687be2c8e396e976c0fb9a97963400 (diff)
downloadlwn-db7489e07669073970358b6cacf6a9dd8dc9275e.tar.gz
lwn-db7489e07669073970358b6cacf6a9dd8dc9275e.zip
IB/core, cma: Make __attribute_const__ declarations sparse-friendly
Move the __attribute_const__ declarations such that sparse understands that these apply to the function itself and not to the return type. This avoids that sparse reports error messages like the following: drivers/infiniband/core/verbs.c:73:12: error: symbol 'ib_event_msg' redeclared with different type (originally declared at include/rdma/ib_verbs.h:470) - different modifiers Fixes: 2b1b5b601230 ("IB/core, cma: Nice log-friendly string helpers") Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Sagi Grimberg <sagig@mellanox.com> Reviewed-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/rdma/rdma_cm.h')
-rw-r--r--include/rdma/rdma_cm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/rdma/rdma_cm.h b/include/rdma/rdma_cm.h
index 463ec0ccbe51..afe44fde72a5 100644
--- a/include/rdma/rdma_cm.h
+++ b/include/rdma/rdma_cm.h
@@ -62,7 +62,7 @@ enum rdma_cm_event_type {
RDMA_CM_EVENT_TIMEWAIT_EXIT
};
-__attribute_const__ const char *rdma_event_msg(enum rdma_cm_event_type event);
+const char *__attribute_const__ rdma_event_msg(enum rdma_cm_event_type event);
enum rdma_port_space {
RDMA_PS_SDP = 0x0001,