[qca-nss-drv] Fix invalid pointer typecast for callback_t in msg_init APIs
msg_init() APIs don't need a typecast for callbacks. Fix the invalid typecast
for all the callbacks in msg_init.
Change-Id: I58fcdba29acf0848ec4cdc103bfcd14612f10b40
Signed-off-by: Sundarajan Srinivasan <sundaraj@codeaurora.org>
diff --git a/exports/nss_capwap.h b/exports/nss_capwap.h
index 2d805f4..7207818 100644
--- a/exports/nss_capwap.h
+++ b/exports/nss_capwap.h
@@ -1,6 +1,6 @@
/*
**************************************************************************
- * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014,2015, The Linux Foundation. All rights reserved.
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all copies.
@@ -239,5 +239,5 @@
* @return None
*/
extern void nss_capwap_msg_init(struct nss_capwap_msg *ncm, uint16_t if_num, uint32_t type, uint32_t len,
- nss_capwap_msg_callback_t *cb, void *app_data);
+ nss_capwap_msg_callback_t cb, void *app_data);
#endif /* __NSS_CAPWAP_H */
diff --git a/exports/nss_crypto.h b/exports/nss_crypto.h
index 665e21e..b40ae7f 100644
--- a/exports/nss_crypto.h
+++ b/exports/nss_crypto.h
@@ -1,6 +1,6 @@
/*
**************************************************************************
- * Copyright (c) 2014, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014,2015, The Linux Foundation. All rights reserved.
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all copies.
@@ -246,6 +246,6 @@
* @return
*/
extern void nss_crypto_msg_init(struct nss_crypto_msg *ncm, uint16_t if_num, uint32_t type, uint32_t len,
- nss_crypto_msg_callback_t *cb, void *app_data);
+ nss_crypto_msg_callback_t cb, void *app_data);
#endif /* __NSS_CRYPTO_H */
diff --git a/exports/nss_ipsec.h b/exports/nss_ipsec.h
index 286f724..1d18b56 100644
--- a/exports/nss_ipsec.h
+++ b/exports/nss_ipsec.h
@@ -1,6 +1,6 @@
/*
**************************************************************************
- * Copyright (c) 2014 - 2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014,2015, The Linux Foundation. All rights reserved.
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all copies.
@@ -256,7 +256,7 @@
* @return void
*/
extern void nss_ipsec_msg_init(struct nss_ipsec_msg *nim, uint16_t if_num, uint32_t type, uint32_t len,
- nss_ipsec_msg_callback_t *cb, void *app_data);
+ nss_ipsec_msg_callback_t cb, void *app_data);
/*
* @brief get the NSS interface number to be used for IPsec requests
diff --git a/exports/nss_ipv4.h b/exports/nss_ipv4.h
index 4c4deff..370f617 100644
--- a/exports/nss_ipv4.h
+++ b/exports/nss_ipv4.h
@@ -485,6 +485,6 @@
* @return None
*/
extern void nss_ipv4_msg_init(struct nss_ipv4_msg *nim, uint16_t if_num, uint32_t type, uint32_t len,
- nss_ipv4_msg_callback_t *cb, void *app_data);
+ nss_ipv4_msg_callback_t cb, void *app_data);
#endif /* __NSS_IPV4_H */
diff --git a/exports/nss_ipv6.h b/exports/nss_ipv6.h
index 66f54e9..9d3f6e4 100644
--- a/exports/nss_ipv6.h
+++ b/exports/nss_ipv6.h
@@ -446,6 +446,6 @@
* Initialize NSS IPv6 specific message
*/
extern void nss_ipv6_msg_init(struct nss_ipv6_msg *nim, uint16_t if_num, uint32_t type, uint32_t len,
- nss_ipv6_msg_callback_t *cb, void *app_data);
+ nss_ipv6_msg_callback_t cb, void *app_data);
#endif /* __NSS_IPV6_H */
diff --git a/exports/nss_lag.h b/exports/nss_lag.h
index 68c3273..7541bbb 100644
--- a/exports/nss_lag.h
+++ b/exports/nss_lag.h
@@ -1,6 +1,6 @@
/*
**************************************************************************
- * Copyright (c) 2014, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014,2015, The Linux Foundation. All rights reserved.
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all copies.
@@ -122,4 +122,4 @@
* return void
*/
extern void nss_lag_msg_init(struct nss_lag_msg *nlm, uint16_t lag_num, uint32_t type, uint32_t len,
- nss_lag_callback_t *cb, void *app_data);
+ nss_lag_callback_t cb, void *app_data);
diff --git a/exports/nss_profiler.h b/exports/nss_profiler.h
index 3da9d54..5dd0878 100644
--- a/exports/nss_profiler.h
+++ b/exports/nss_profiler.h
@@ -1,6 +1,6 @@
/*
**************************************************************************
- * Copyright (c) 2014, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014,2015, The Linux Foundation. All rights reserved.
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all copies.
@@ -174,6 +174,6 @@
* @return void
*/
extern void nss_profiler_msg_init(struct nss_profiler_msg *npm, uint16_t if_num, uint32_t type, uint32_t len,
- nss_profiler_callback_t *cb, void *app_data);
+ nss_profiler_callback_t cb, void *app_data);
#endif
diff --git a/nss_capwap.c b/nss_capwap.c
index 8dc9f70..6252988 100644
--- a/nss_capwap.c
+++ b/nss_capwap.c
@@ -1,6 +1,6 @@
/*
**************************************************************************
- * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014,2015, The Linux Foundation. All rights reserved.
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all copies.
@@ -571,7 +571,7 @@
* Initialize capwap message.
*/
void nss_capwap_msg_init(struct nss_capwap_msg *ncm, uint16_t if_num, uint32_t type, uint32_t len,
- nss_capwap_msg_callback_t *cb, void *app_data)
+ nss_capwap_msg_callback_t cb, void *app_data)
{
nss_cmn_msg_init(&ncm->cm, if_num, type, len, (void*)cb, app_data);
}
diff --git a/nss_crypto.c b/nss_crypto.c
index 1dbc943..9abb88b 100644
--- a/nss_crypto.c
+++ b/nss_crypto.c
@@ -1,6 +1,6 @@
/*
**************************************************************************
- * Copyright (c) 2013, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013,2015, The Linux Foundation. All rights reserved.
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all copies.
@@ -311,7 +311,7 @@
* Initialize crypto message
*/
void nss_crypto_msg_init(struct nss_crypto_msg *ncm, uint16_t if_num, uint32_t type, uint32_t len,
- nss_crypto_msg_callback_t *cb, void *app_data)
+ nss_crypto_msg_callback_t cb, void *app_data)
{
nss_cmn_msg_init(&ncm->cm, if_num, type, len, (void *)cb, app_data);
}
diff --git a/nss_ipsec.c b/nss_ipsec.c
index 2dc20aa..29591a9 100644
--- a/nss_ipsec.c
+++ b/nss_ipsec.c
@@ -405,7 +405,7 @@
* Initialize ipsec message.
*/
void nss_ipsec_msg_init(struct nss_ipsec_msg *nim, uint16_t if_num, uint32_t type, uint32_t len,
- nss_ipsec_msg_callback_t *cb, void *app_data)
+ nss_ipsec_msg_callback_t cb, void *app_data)
{
nss_cmn_msg_init(&nim->cm, if_num, type, len, (void *)cb, app_data);
}
diff --git a/nss_ipv4.c b/nss_ipv4.c
index 413c689..5c7b98b 100644
--- a/nss_ipv4.c
+++ b/nss_ipv4.c
@@ -359,8 +359,7 @@
nss_info("%p: IPv4 supported connections: %d\n", nss_ctx, nss_ipv4_conn_cfg);
nss_ipv4_msg_init(&nim, NSS_IPV4_RX_INTERFACE, NSS_IPV4_TX_CONN_CFG_RULE_MSG,
- sizeof(struct nss_ipv4_rule_conn_cfg_msg),
- (nss_ipv4_msg_callback_t *)nss_ipv4_conn_cfg_callback, NULL);
+ sizeof(struct nss_ipv4_rule_conn_cfg_msg), nss_ipv4_conn_cfg_callback, NULL);
nirccm = &nim.msg.rule_conn_cfg;
nirccm->num_conn = htonl(nss_ipv4_conn_cfg);
@@ -478,7 +477,7 @@
* Initialize IPv4 message.
*/
void nss_ipv4_msg_init(struct nss_ipv4_msg *nim, uint16_t if_num, uint32_t type, uint32_t len,
- nss_ipv4_msg_callback_t *cb, void *app_data)
+ nss_ipv4_msg_callback_t cb, void *app_data)
{
nss_cmn_msg_init(&nim->cm, if_num, type, len, (void *)cb, app_data);
}
diff --git a/nss_ipv6.c b/nss_ipv6.c
index 7ab858d..4f5bf5c 100644
--- a/nss_ipv6.c
+++ b/nss_ipv6.c
@@ -358,7 +358,7 @@
nss_info("%p: IPv6 supported connections: %d\n", nss_ctx, nss_ipv6_conn_cfg);
nss_ipv6_msg_init(&nim, NSS_IPV6_RX_INTERFACE, NSS_IPV6_TX_CONN_CFG_RULE_MSG,
- sizeof(struct nss_ipv6_rule_conn_cfg_msg), (nss_ipv6_msg_callback_t *)nss_ipv6_conn_cfg_callback, NULL);
+ sizeof(struct nss_ipv6_rule_conn_cfg_msg), nss_ipv6_conn_cfg_callback, NULL);
nirccm = &nim.msg.rule_conn_cfg;
nirccm->num_conn = htonl(nss_ipv6_conn_cfg);
@@ -475,7 +475,7 @@
* Initialize IPv6 message.
*/
void nss_ipv6_msg_init(struct nss_ipv6_msg *nim, uint16_t if_num, uint32_t type, uint32_t len,
- nss_ipv6_msg_callback_t *cb, void *app_data)
+ nss_ipv6_msg_callback_t cb, void *app_data)
{
nss_cmn_msg_init(&nim->cm, if_num, type, len, (void *)cb, app_data);
}
diff --git a/nss_lag.c b/nss_lag.c
index 7ef9808..22ad05a 100644
--- a/nss_lag.c
+++ b/nss_lag.c
@@ -1,6 +1,6 @@
/*
**************************************************************************
- * Copyright (c) 2014, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014,2015, The Linux Foundation. All rights reserved.
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all copies.
@@ -179,7 +179,7 @@
* Initialize lag message
*/
void nss_lag_msg_init(struct nss_lag_msg *nlm, uint16_t lag_num, uint32_t type, uint32_t len,
- nss_lag_callback_t *cb, void *app_data)
+ nss_lag_callback_t cb, void *app_data)
{
nss_cmn_msg_init(&nlm->cm, lag_num, type, len, (void *)cb, app_data);
}
diff --git a/nss_profiler.c b/nss_profiler.c
index 841a1ea..287b45e 100644
--- a/nss_profiler.c
+++ b/nss_profiler.c
@@ -1,6 +1,6 @@
/*
**************************************************************************
- * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all copies.
@@ -107,7 +107,7 @@
npm = (struct nss_profiler_msg *)skb_put(nbuf, sizeof(npm->cm) + len);
nss_profiler_msg_init(npm, NSS_PROFILER_INTERFACE, pdm->hd_magic & 0xFF, len,
- (nss_profiler_callback_t *)cb, ctx);
+ cb, ctx);
memcpy(&npm->payload, pdm, len);
status = nss_core_send_buffer(nss_ctx, 0, nbuf, NSS_IF_CMD_QUEUE, H2N_BUFFER_CTRL, 0);
@@ -160,7 +160,7 @@
* Initialize profiler message.
*/
void nss_profiler_msg_init(struct nss_profiler_msg *npm, uint16_t if_num, uint32_t type, uint32_t len,
- nss_profiler_callback_t *cb, void *app_data)
+ nss_profiler_callback_t cb, void *app_data)
{
nss_cmn_msg_init(&npm->cm, if_num, type, len, (void *)cb, app_data);
}