Message ID | 20220912232526.27427-2-quic_jjohnson@quicinc.com |
---|---|
State | Superseded |
Headers | show |
Series | Make QMI message rules const | expand |
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 --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_ */
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(-)