diff mbox series

[1/4] net: ipa: Make QMI message rules const

Message ID 20220912232526.27427-2-quic_jjohnson@quicinc.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series Make QMI message rules const | expand

Checks

Context Check Description
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit fail Errors and warnings before: 0 this patch: 30
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang fail Errors and warnings before: 5 this patch: 23
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn fail Errors and warnings before: 0 this patch: 30
netdev/checkpatch warning WARNING: Unknown commit id 'ff6d365898d', maybe rebased or not pulled?
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Jeff Johnson Sept. 12, 2022, 11:25 p.m. UTC
Commit ff6d365898d ("soc: qcom: qmi: use const for struct
qmi_elem_info") allows QMI message encoding/decoding rules to be
const, so do that for IPA.

Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
---
 drivers/net/ipa/ipa_qmi_msg.c | 20 ++++++++++----------
 drivers/net/ipa/ipa_qmi_msg.h | 20 ++++++++++----------
 2 files changed, 20 insertions(+), 20 deletions(-)

Comments

Sibi Sankar Sept. 14, 2022, 10:22 a.m. UTC | #1
On 9/13/22 4:55 AM, Jeff Johnson wrote:
> Commit ff6d365898d ("soc: qcom: qmi: use const for struct
> qmi_elem_info") allows QMI message encoding/decoding rules to be
> const, so do that for IPA.
> 
> Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>

Reviewed-by: Sibi Sankar <quic_sibis@quicinc.com>

> ---
>   drivers/net/ipa/ipa_qmi_msg.c | 20 ++++++++++----------
>   drivers/net/ipa/ipa_qmi_msg.h | 20 ++++++++++----------
>   2 files changed, 20 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/net/ipa/ipa_qmi_msg.c b/drivers/net/ipa/ipa_qmi_msg.c
> index 6838e8065072..c5a5dac284a9 100644
> --- a/drivers/net/ipa/ipa_qmi_msg.c
> +++ b/drivers/net/ipa/ipa_qmi_msg.c
> @@ -9,7 +9,7 @@
>   #include "ipa_qmi_msg.h"
>   
>   /* QMI message structure definition for struct ipa_indication_register_req */
> -struct qmi_elem_info ipa_indication_register_req_ei[] = {
> +const struct qmi_elem_info ipa_indication_register_req_ei[] = {
>   	{
>   		.data_type	= QMI_OPT_FLAG,
>   		.elem_len	= 1,
> @@ -116,7 +116,7 @@ struct qmi_elem_info ipa_indication_register_req_ei[] = {
>   };
>   
>   /* QMI message structure definition for struct ipa_indication_register_rsp */
> -struct qmi_elem_info ipa_indication_register_rsp_ei[] = {
> +const struct qmi_elem_info ipa_indication_register_rsp_ei[] = {
>   	{
>   		.data_type	= QMI_STRUCT,
>   		.elem_len	= 1,
> @@ -134,7 +134,7 @@ struct qmi_elem_info ipa_indication_register_rsp_ei[] = {
>   };
>   
>   /* QMI message structure definition for struct ipa_driver_init_complete_req */
> -struct qmi_elem_info ipa_driver_init_complete_req_ei[] = {
> +const struct qmi_elem_info ipa_driver_init_complete_req_ei[] = {
>   	{
>   		.data_type	= QMI_UNSIGNED_1_BYTE,
>   		.elem_len	= 1,
> @@ -151,7 +151,7 @@ struct qmi_elem_info ipa_driver_init_complete_req_ei[] = {
>   };
>   
>   /* QMI message structure definition for struct ipa_driver_init_complete_rsp */
> -struct qmi_elem_info ipa_driver_init_complete_rsp_ei[] = {
> +const struct qmi_elem_info ipa_driver_init_complete_rsp_ei[] = {
>   	{
>   		.data_type	= QMI_STRUCT,
>   		.elem_len	= 1,
> @@ -169,7 +169,7 @@ struct qmi_elem_info ipa_driver_init_complete_rsp_ei[] = {
>   };
>   
>   /* QMI message structure definition for struct ipa_init_complete_ind */
> -struct qmi_elem_info ipa_init_complete_ind_ei[] = {
> +const struct qmi_elem_info ipa_init_complete_ind_ei[] = {
>   	{
>   		.data_type	= QMI_STRUCT,
>   		.elem_len	= 1,
> @@ -187,7 +187,7 @@ struct qmi_elem_info ipa_init_complete_ind_ei[] = {
>   };
>   
>   /* QMI message structure definition for struct ipa_mem_bounds */
> -struct qmi_elem_info ipa_mem_bounds_ei[] = {
> +const struct qmi_elem_info ipa_mem_bounds_ei[] = {
>   	{
>   		.data_type	= QMI_UNSIGNED_4_BYTE,
>   		.elem_len	= 1,
> @@ -208,7 +208,7 @@ struct qmi_elem_info ipa_mem_bounds_ei[] = {
>   };
>   
>   /* QMI message structure definition for struct ipa_mem_array */
> -struct qmi_elem_info ipa_mem_array_ei[] = {
> +const struct qmi_elem_info ipa_mem_array_ei[] = {
>   	{
>   		.data_type	= QMI_UNSIGNED_4_BYTE,
>   		.elem_len	= 1,
> @@ -229,7 +229,7 @@ struct qmi_elem_info ipa_mem_array_ei[] = {
>   };
>   
>   /* QMI message structure definition for struct ipa_mem_range */
> -struct qmi_elem_info ipa_mem_range_ei[] = {
> +const struct qmi_elem_info ipa_mem_range_ei[] = {
>   	{
>   		.data_type	= QMI_UNSIGNED_4_BYTE,
>   		.elem_len	= 1,
> @@ -250,7 +250,7 @@ struct qmi_elem_info ipa_mem_range_ei[] = {
>   };
>   
>   /* QMI message structure definition for struct ipa_init_modem_driver_req */
> -struct qmi_elem_info ipa_init_modem_driver_req_ei[] = {
> +const struct qmi_elem_info ipa_init_modem_driver_req_ei[] = {
>   	{
>   		.data_type	= QMI_OPT_FLAG,
>   		.elem_len	= 1,
> @@ -645,7 +645,7 @@ struct qmi_elem_info ipa_init_modem_driver_req_ei[] = {
>   };
>   
>   /* QMI message structure definition for struct ipa_init_modem_driver_rsp */
> -struct qmi_elem_info ipa_init_modem_driver_rsp_ei[] = {
> +const struct qmi_elem_info ipa_init_modem_driver_rsp_ei[] = {
>   	{
>   		.data_type	= QMI_STRUCT,
>   		.elem_len	= 1,
> diff --git a/drivers/net/ipa/ipa_qmi_msg.h b/drivers/net/ipa/ipa_qmi_msg.h
> index 495e85abe50b..8dfac59ea0ed 100644
> --- a/drivers/net/ipa/ipa_qmi_msg.h
> +++ b/drivers/net/ipa/ipa_qmi_msg.h
> @@ -242,15 +242,15 @@ struct ipa_init_modem_driver_rsp {
>   };
>   
>   /* Message structure definitions defined in "ipa_qmi_msg.c" */
> -extern struct qmi_elem_info ipa_indication_register_req_ei[];
> -extern struct qmi_elem_info ipa_indication_register_rsp_ei[];
> -extern struct qmi_elem_info ipa_driver_init_complete_req_ei[];
> -extern struct qmi_elem_info ipa_driver_init_complete_rsp_ei[];
> -extern struct qmi_elem_info ipa_init_complete_ind_ei[];
> -extern struct qmi_elem_info ipa_mem_bounds_ei[];
> -extern struct qmi_elem_info ipa_mem_array_ei[];
> -extern struct qmi_elem_info ipa_mem_range_ei[];
> -extern struct qmi_elem_info ipa_init_modem_driver_req_ei[];
> -extern struct qmi_elem_info ipa_init_modem_driver_rsp_ei[];
> +extern const struct qmi_elem_info ipa_indication_register_req_ei[];
> +extern const struct qmi_elem_info ipa_indication_register_rsp_ei[];
> +extern const struct qmi_elem_info ipa_driver_init_complete_req_ei[];
> +extern const struct qmi_elem_info ipa_driver_init_complete_rsp_ei[];
> +extern const struct qmi_elem_info ipa_init_complete_ind_ei[];
> +extern const struct qmi_elem_info ipa_mem_bounds_ei[];
> +extern const struct qmi_elem_info ipa_mem_array_ei[];
> +extern const struct qmi_elem_info ipa_mem_range_ei[];
> +extern const struct qmi_elem_info ipa_init_modem_driver_req_ei[];
> +extern const struct qmi_elem_info ipa_init_modem_driver_rsp_ei[];
>   
>   #endif /* !_IPA_QMI_MSG_H_ */
>
diff mbox series

Patch

diff --git a/drivers/net/ipa/ipa_qmi_msg.c b/drivers/net/ipa/ipa_qmi_msg.c
index 6838e8065072..c5a5dac284a9 100644
--- a/drivers/net/ipa/ipa_qmi_msg.c
+++ b/drivers/net/ipa/ipa_qmi_msg.c
@@ -9,7 +9,7 @@ 
 #include "ipa_qmi_msg.h"
 
 /* QMI message structure definition for struct ipa_indication_register_req */
-struct qmi_elem_info ipa_indication_register_req_ei[] = {
+const struct qmi_elem_info ipa_indication_register_req_ei[] = {
 	{
 		.data_type	= QMI_OPT_FLAG,
 		.elem_len	= 1,
@@ -116,7 +116,7 @@  struct qmi_elem_info ipa_indication_register_req_ei[] = {
 };
 
 /* QMI message structure definition for struct ipa_indication_register_rsp */
-struct qmi_elem_info ipa_indication_register_rsp_ei[] = {
+const struct qmi_elem_info ipa_indication_register_rsp_ei[] = {
 	{
 		.data_type	= QMI_STRUCT,
 		.elem_len	= 1,
@@ -134,7 +134,7 @@  struct qmi_elem_info ipa_indication_register_rsp_ei[] = {
 };
 
 /* QMI message structure definition for struct ipa_driver_init_complete_req */
-struct qmi_elem_info ipa_driver_init_complete_req_ei[] = {
+const struct qmi_elem_info ipa_driver_init_complete_req_ei[] = {
 	{
 		.data_type	= QMI_UNSIGNED_1_BYTE,
 		.elem_len	= 1,
@@ -151,7 +151,7 @@  struct qmi_elem_info ipa_driver_init_complete_req_ei[] = {
 };
 
 /* QMI message structure definition for struct ipa_driver_init_complete_rsp */
-struct qmi_elem_info ipa_driver_init_complete_rsp_ei[] = {
+const struct qmi_elem_info ipa_driver_init_complete_rsp_ei[] = {
 	{
 		.data_type	= QMI_STRUCT,
 		.elem_len	= 1,
@@ -169,7 +169,7 @@  struct qmi_elem_info ipa_driver_init_complete_rsp_ei[] = {
 };
 
 /* QMI message structure definition for struct ipa_init_complete_ind */
-struct qmi_elem_info ipa_init_complete_ind_ei[] = {
+const struct qmi_elem_info ipa_init_complete_ind_ei[] = {
 	{
 		.data_type	= QMI_STRUCT,
 		.elem_len	= 1,
@@ -187,7 +187,7 @@  struct qmi_elem_info ipa_init_complete_ind_ei[] = {
 };
 
 /* QMI message structure definition for struct ipa_mem_bounds */
-struct qmi_elem_info ipa_mem_bounds_ei[] = {
+const struct qmi_elem_info ipa_mem_bounds_ei[] = {
 	{
 		.data_type	= QMI_UNSIGNED_4_BYTE,
 		.elem_len	= 1,
@@ -208,7 +208,7 @@  struct qmi_elem_info ipa_mem_bounds_ei[] = {
 };
 
 /* QMI message structure definition for struct ipa_mem_array */
-struct qmi_elem_info ipa_mem_array_ei[] = {
+const struct qmi_elem_info ipa_mem_array_ei[] = {
 	{
 		.data_type	= QMI_UNSIGNED_4_BYTE,
 		.elem_len	= 1,
@@ -229,7 +229,7 @@  struct qmi_elem_info ipa_mem_array_ei[] = {
 };
 
 /* QMI message structure definition for struct ipa_mem_range */
-struct qmi_elem_info ipa_mem_range_ei[] = {
+const struct qmi_elem_info ipa_mem_range_ei[] = {
 	{
 		.data_type	= QMI_UNSIGNED_4_BYTE,
 		.elem_len	= 1,
@@ -250,7 +250,7 @@  struct qmi_elem_info ipa_mem_range_ei[] = {
 };
 
 /* QMI message structure definition for struct ipa_init_modem_driver_req */
-struct qmi_elem_info ipa_init_modem_driver_req_ei[] = {
+const struct qmi_elem_info ipa_init_modem_driver_req_ei[] = {
 	{
 		.data_type	= QMI_OPT_FLAG,
 		.elem_len	= 1,
@@ -645,7 +645,7 @@  struct qmi_elem_info ipa_init_modem_driver_req_ei[] = {
 };
 
 /* QMI message structure definition for struct ipa_init_modem_driver_rsp */
-struct qmi_elem_info ipa_init_modem_driver_rsp_ei[] = {
+const struct qmi_elem_info ipa_init_modem_driver_rsp_ei[] = {
 	{
 		.data_type	= QMI_STRUCT,
 		.elem_len	= 1,
diff --git a/drivers/net/ipa/ipa_qmi_msg.h b/drivers/net/ipa/ipa_qmi_msg.h
index 495e85abe50b..8dfac59ea0ed 100644
--- a/drivers/net/ipa/ipa_qmi_msg.h
+++ b/drivers/net/ipa/ipa_qmi_msg.h
@@ -242,15 +242,15 @@  struct ipa_init_modem_driver_rsp {
 };
 
 /* Message structure definitions defined in "ipa_qmi_msg.c" */
-extern struct qmi_elem_info ipa_indication_register_req_ei[];
-extern struct qmi_elem_info ipa_indication_register_rsp_ei[];
-extern struct qmi_elem_info ipa_driver_init_complete_req_ei[];
-extern struct qmi_elem_info ipa_driver_init_complete_rsp_ei[];
-extern struct qmi_elem_info ipa_init_complete_ind_ei[];
-extern struct qmi_elem_info ipa_mem_bounds_ei[];
-extern struct qmi_elem_info ipa_mem_array_ei[];
-extern struct qmi_elem_info ipa_mem_range_ei[];
-extern struct qmi_elem_info ipa_init_modem_driver_req_ei[];
-extern struct qmi_elem_info ipa_init_modem_driver_rsp_ei[];
+extern const struct qmi_elem_info ipa_indication_register_req_ei[];
+extern const struct qmi_elem_info ipa_indication_register_rsp_ei[];
+extern const struct qmi_elem_info ipa_driver_init_complete_req_ei[];
+extern const struct qmi_elem_info ipa_driver_init_complete_rsp_ei[];
+extern const struct qmi_elem_info ipa_init_complete_ind_ei[];
+extern const struct qmi_elem_info ipa_mem_bounds_ei[];
+extern const struct qmi_elem_info ipa_mem_array_ei[];
+extern const struct qmi_elem_info ipa_mem_range_ei[];
+extern const struct qmi_elem_info ipa_init_modem_driver_req_ei[];
+extern const struct qmi_elem_info ipa_init_modem_driver_rsp_ei[];
 
 #endif /* !_IPA_QMI_MSG_H_ */