[ofw] [OPENSM] update functions to match .h prototypes
Stan C. Smith
stan.smith at intel.com
Mon Sep 28 15:52:41 PDT 2009
Hello,
The following patches address inconsistencies between header file function prototypes and .c function definitions;
missing 'const' attribute.
Attached is a Linux EOL patch file in case a mailer hacks/reformats the text.
Signed-off-by: Stan Smith (stan.smith at intel.com)
diff --git a/opensm/opensm/osm_inform.c b/opensm/opensm/osm_inform.c
index 9b451bd..7d55a06 100644
--- a/opensm/opensm/osm_inform.c
+++ b/opensm/opensm/osm_inform.c
@@ -61,7 +61,7 @@ typedef struct osm_infr_match_ctxt {
/**********************************************************************
**********************************************************************/
-void osm_infr_delete(IN osm_infr_t * p_infr)
+void osm_infr_delete(IN osm_infr_t * const p_infr)
{
free(p_infr);
}
@@ -214,7 +214,7 @@ Exit:
**********************************************************************/
osm_infr_t *osm_infr_get_by_rec(IN osm_subn_t const *p_subn,
IN osm_log_t * p_log,
- IN osm_infr_t * p_infr_rec)
+ IN osm_infr_t * const p_infr_rec)
{
cl_list_item_t *p_list_item;
@@ -572,7 +572,7 @@ static void log_notice(osm_log_t * log, osm_log_level_t level,
sizeof gid_str));
}
-ib_api_status_t osm_report_notice(IN osm_log_t * p_log, IN osm_subn_t * p_subn,
+ib_api_status_t osm_report_notice(IN osm_log_t * const p_log, IN osm_subn_t * p_subn,
IN ib_mad_notice_attr_t * p_ntc)
{
osm_infr_match_ctxt_t context;
diff --git a/opensm/opensm/osm_lid_mgr.c b/opensm/opensm/osm_lid_mgr.c
index 34625ba..8b620c3 100644
--- a/opensm/opensm/osm_lid_mgr.c
+++ b/opensm/opensm/osm_lid_mgr.c
@@ -106,14 +106,14 @@ typedef struct osm_lid_mgr_range {
/**********************************************************************
**********************************************************************/
-void osm_lid_mgr_construct(IN osm_lid_mgr_t * p_mgr)
+void osm_lid_mgr_construct(IN osm_lid_mgr_t * const p_mgr)
{
memset(p_mgr, 0, sizeof(*p_mgr));
}
/**********************************************************************
**********************************************************************/
-void osm_lid_mgr_destroy(IN osm_lid_mgr_t * p_mgr)
+void osm_lid_mgr_destroy(IN osm_lid_mgr_t * const p_mgr)
{
cl_list_item_t *p_item;
@@ -224,7 +224,7 @@ Exit:
/**********************************************************************
**********************************************************************/
-ib_api_status_t osm_lid_mgr_init(IN osm_lid_mgr_t * p_mgr, IN osm_sm_t * sm)
+ib_api_status_t osm_lid_mgr_init(IN osm_lid_mgr_t * const p_mgr, IN osm_sm_t * sm)
{
ib_api_status_t status = IB_SUCCESS;
@@ -1145,7 +1145,7 @@ Exit:
/**********************************************************************
**********************************************************************/
-int osm_lid_mgr_process_sm(IN osm_lid_mgr_t * p_mgr)
+int osm_lid_mgr_process_sm(IN osm_lid_mgr_t * const p_mgr)
{
int ret;
@@ -1173,7 +1173,7 @@ int osm_lid_mgr_process_sm(IN osm_lid_mgr_t * p_mgr)
1.2 if a change is required send the port info
2 if any change send the signal PENDING...
**********************************************************************/
-int osm_lid_mgr_process_subnet(IN osm_lid_mgr_t * p_mgr)
+int osm_lid_mgr_process_subnet(IN osm_lid_mgr_t * const p_mgr)
{
cl_qmap_t *p_port_guid_tbl;
osm_port_t *p_port;
diff --git a/opensm/opensm/osm_sa_mcmember_record.c b/opensm/opensm/osm_sa_mcmember_record.c
index c80dae7..bd4245b 100644
--- a/opensm/opensm/osm_sa_mcmember_record.c
+++ b/opensm/opensm/osm_sa_mcmember_record.c
@@ -888,7 +888,7 @@ osm_mgrp_t *osm_get_mgrp_by_mgid(IN osm_sa_t * sa, IN ib_gid_t * p_mgid)
ib_api_status_t osm_mcmr_rcv_find_or_create_new_mgrp(IN osm_sa_t * sa,
IN ib_net64_t comp_mask,
IN ib_member_rec_t *
- p_recvd_mcmember_rec,
+ const p_recvd_mcmember_rec,
OUT osm_mgrp_t ** pp_mgrp)
{
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opensm.pat
Type: application/octet-stream
Size: 3655 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20090928/2fc794df/attachment.obj>
More information about the ofw
mailing list