Message ID | 20220912232526.27427-3-quic_jjohnson@quicinc.com |
---|---|
State | Superseded |
Headers | show |
Series | [1/4] net: ipa: 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 QCOM PDR. > > Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Reviewed-by: Sibi Sankar <quic_sibis@quicinc.com> > --- > drivers/soc/qcom/pdr_internal.h | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/drivers/soc/qcom/pdr_internal.h b/drivers/soc/qcom/pdr_internal.h > index a30422214943..03c282b7f17e 100644 > --- a/drivers/soc/qcom/pdr_internal.h > +++ b/drivers/soc/qcom/pdr_internal.h > @@ -28,7 +28,7 @@ struct servreg_location_entry { > u32 instance; > }; > > -static struct qmi_elem_info servreg_location_entry_ei[] = { > +static const struct qmi_elem_info servreg_location_entry_ei[] = { > { > .data_type = QMI_STRING, > .elem_len = SERVREG_NAME_LENGTH + 1, > @@ -74,7 +74,7 @@ struct servreg_get_domain_list_req { > u32 domain_offset; > }; > > -static struct qmi_elem_info servreg_get_domain_list_req_ei[] = { > +static const struct qmi_elem_info servreg_get_domain_list_req_ei[] = { > { > .data_type = QMI_STRING, > .elem_len = SERVREG_NAME_LENGTH + 1, > @@ -116,7 +116,7 @@ struct servreg_get_domain_list_resp { > struct servreg_location_entry domain_list[SERVREG_DOMAIN_LIST_LENGTH]; > }; > > -static struct qmi_elem_info servreg_get_domain_list_resp_ei[] = { > +static const struct qmi_elem_info servreg_get_domain_list_resp_ei[] = { > { > .data_type = QMI_STRUCT, > .elem_len = 1, > @@ -199,7 +199,7 @@ struct servreg_register_listener_req { > char service_path[SERVREG_NAME_LENGTH + 1]; > }; > > -static struct qmi_elem_info servreg_register_listener_req_ei[] = { > +static const struct qmi_elem_info servreg_register_listener_req_ei[] = { > { > .data_type = QMI_UNSIGNED_1_BYTE, > .elem_len = 1, > @@ -227,7 +227,7 @@ struct servreg_register_listener_resp { > enum servreg_service_state curr_state; > }; > > -static struct qmi_elem_info servreg_register_listener_resp_ei[] = { > +static const struct qmi_elem_info servreg_register_listener_resp_ei[] = { > { > .data_type = QMI_STRUCT, > .elem_len = 1, > @@ -263,7 +263,7 @@ struct servreg_restart_pd_req { > char service_path[SERVREG_NAME_LENGTH + 1]; > }; > > -static struct qmi_elem_info servreg_restart_pd_req_ei[] = { > +static const struct qmi_elem_info servreg_restart_pd_req_ei[] = { > { > .data_type = QMI_STRING, > .elem_len = SERVREG_NAME_LENGTH + 1, > @@ -280,7 +280,7 @@ struct servreg_restart_pd_resp { > struct qmi_response_type_v01 resp; > }; > > -static struct qmi_elem_info servreg_restart_pd_resp_ei[] = { > +static const struct qmi_elem_info servreg_restart_pd_resp_ei[] = { > { > .data_type = QMI_STRUCT, > .elem_len = 1, > @@ -300,7 +300,7 @@ struct servreg_state_updated_ind { > u16 transaction_id; > }; > > -static struct qmi_elem_info servreg_state_updated_ind_ei[] = { > +static const struct qmi_elem_info servreg_state_updated_ind_ei[] = { > { > .data_type = QMI_SIGNED_4_BYTE_ENUM, > .elem_len = 1, > @@ -336,7 +336,7 @@ struct servreg_set_ack_req { > u16 transaction_id; > }; > > -static struct qmi_elem_info servreg_set_ack_req_ei[] = { > +static const struct qmi_elem_info servreg_set_ack_req_ei[] = { > { > .data_type = QMI_STRING, > .elem_len = SERVREG_NAME_LENGTH + 1, > @@ -362,7 +362,7 @@ struct servreg_set_ack_resp { > struct qmi_response_type_v01 resp; > }; > > -static struct qmi_elem_info servreg_set_ack_resp_ei[] = { > +static const struct qmi_elem_info servreg_set_ack_resp_ei[] = { > { > .data_type = QMI_STRUCT, > .elem_len = 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 sysmon. > > Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Reviewed-by: Sibi Sankar <quic_sibis@quicinc.com> > --- > drivers/remoteproc/qcom_sysmon.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/remoteproc/qcom_sysmon.c b/drivers/remoteproc/qcom_sysmon.c > index 57dde2a69b9d..3992bb61d2ec 100644 > --- a/drivers/remoteproc/qcom_sysmon.c > +++ b/drivers/remoteproc/qcom_sysmon.c > @@ -190,7 +190,7 @@ struct ssctl_shutdown_resp { > struct qmi_response_type_v01 resp; > }; > > -static struct qmi_elem_info ssctl_shutdown_resp_ei[] = { > +static const struct qmi_elem_info ssctl_shutdown_resp_ei[] = { > { > .data_type = QMI_STRUCT, > .elem_len = 1, > @@ -211,7 +211,7 @@ struct ssctl_subsys_event_req { > u32 evt_driven; > }; > > -static struct qmi_elem_info ssctl_subsys_event_req_ei[] = { > +static const struct qmi_elem_info ssctl_subsys_event_req_ei[] = { > { > .data_type = QMI_DATA_LEN, > .elem_len = 1, > @@ -269,7 +269,7 @@ struct ssctl_subsys_event_resp { > struct qmi_response_type_v01 resp; > }; > > -static struct qmi_elem_info ssctl_subsys_event_resp_ei[] = { > +static const struct qmi_elem_info ssctl_subsys_event_resp_ei[] = { > { > .data_type = QMI_STRUCT, > .elem_len = 1, > @@ -283,7 +283,7 @@ static struct qmi_elem_info ssctl_subsys_event_resp_ei[] = { > {} > }; > > -static struct qmi_elem_info ssctl_shutdown_ind_ei[] = { > +static const struct qmi_elem_info ssctl_shutdown_ind_ei[] = { > {} > }; > >
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 qcom-ngd-ctrl. > > Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Reviewed-by: Sibi Sankar <quic_sibis@quicinc.com> > --- > drivers/slimbus/qcom-ngd-ctrl.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c > index 0aa8408464ad..931ab6317467 100644 > --- a/drivers/slimbus/qcom-ngd-ctrl.c > +++ b/drivers/slimbus/qcom-ngd-ctrl.c > @@ -220,7 +220,7 @@ struct slimbus_power_resp_msg_v01 { > struct qmi_response_type_v01 resp; > }; > > -static struct qmi_elem_info slimbus_select_inst_req_msg_v01_ei[] = { > +static const struct qmi_elem_info slimbus_select_inst_req_msg_v01_ei[] = { > { > .data_type = QMI_UNSIGNED_4_BYTE, > .elem_len = 1, > @@ -262,7 +262,7 @@ static struct qmi_elem_info slimbus_select_inst_req_msg_v01_ei[] = { > }, > }; > > -static struct qmi_elem_info slimbus_select_inst_resp_msg_v01_ei[] = { > +static const struct qmi_elem_info slimbus_select_inst_resp_msg_v01_ei[] = { > { > .data_type = QMI_STRUCT, > .elem_len = 1, > @@ -284,7 +284,7 @@ static struct qmi_elem_info slimbus_select_inst_resp_msg_v01_ei[] = { > }, > }; > > -static struct qmi_elem_info slimbus_power_req_msg_v01_ei[] = { > +static const struct qmi_elem_info slimbus_power_req_msg_v01_ei[] = { > { > .data_type = QMI_UNSIGNED_4_BYTE, > .elem_len = 1, > @@ -324,7 +324,7 @@ static struct qmi_elem_info slimbus_power_req_msg_v01_ei[] = { > }, > }; > > -static struct qmi_elem_info slimbus_power_resp_msg_v01_ei[] = { > +static const struct qmi_elem_info slimbus_power_resp_msg_v01_ei[] = { > { > .data_type = QMI_STRUCT, > .elem_len = 1, >
On 13/09/2022 00:25, Jeff Johnson wrote: > Commit ff6d365898d ("soc: qcom: qmi: use con SHA ID should be at least 12 chars long. Same comment for all the patches in the series. st for struct > qmi_elem_info") allows QMI message encoding/decoding rules to be > const, so do that for qcom-ngd-ctrl. > > Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Other than that it LGTM, Once fixed: Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> --srini > --- > drivers/slimbus/qcom-ngd-ctrl.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c > index 0aa8408464ad..931ab6317467 100644 > --- a/drivers/slimbus/qcom-ngd-ctrl.c > +++ b/drivers/slimbus/qcom-ngd-ctrl.c > @@ -220,7 +220,7 @@ struct slimbus_power_resp_msg_v01 { > struct qmi_response_type_v01 resp; > }; > > -static struct qmi_elem_info slimbus_select_inst_req_msg_v01_ei[] = { > +static const struct qmi_elem_info slimbus_select_inst_req_msg_v01_ei[] = { > { > .data_type = QMI_UNSIGNED_4_BYTE, > .elem_len = 1, > @@ -262,7 +262,7 @@ static struct qmi_elem_info slimbus_select_inst_req_msg_v01_ei[] = { > }, > }; > > -static struct qmi_elem_info slimbus_select_inst_resp_msg_v01_ei[] = { > +static const struct qmi_elem_info slimbus_select_inst_resp_msg_v01_ei[] = { > { > .data_type = QMI_STRUCT, > .elem_len = 1, > @@ -284,7 +284,7 @@ static struct qmi_elem_info slimbus_select_inst_resp_msg_v01_ei[] = { > }, > }; > > -static struct qmi_elem_info slimbus_power_req_msg_v01_ei[] = { > +static const struct qmi_elem_info slimbus_power_req_msg_v01_ei[] = { > { > .data_type = QMI_UNSIGNED_4_BYTE, > .elem_len = 1, > @@ -324,7 +324,7 @@ static struct qmi_elem_info slimbus_power_req_msg_v01_ei[] = { > }, > }; > > -static struct qmi_elem_info slimbus_power_resp_msg_v01_ei[] = { > +static const struct qmi_elem_info slimbus_power_resp_msg_v01_ei[] = { > { > .data_type = QMI_STRUCT, > .elem_len = 1,
On 9/16/2022 6:06 AM, Srinivas Kandagatla wrote: > > > On 13/09/2022 00:25, Jeff Johnson wrote: >> Commit ff6d365898d ("soc: qcom: qmi: use con > > SHA ID should be at least 12 chars long. > > Same comment for all the patches in the series. > > > st for struct >> qmi_elem_info") allows QMI message encoding/decoding rules to be >> const, so do that for qcom-ngd-ctrl. >> >> Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> > > Other than that it LGTM, > Once fixed: > > Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> > > > --srini that was corrected in v2. thx for the ack
diff --git a/drivers/remoteproc/qcom_sysmon.c b/drivers/remoteproc/qcom_sysmon.c index 57dde2a69b9d..3992bb61d2ec 100644 --- a/drivers/remoteproc/qcom_sysmon.c +++ b/drivers/remoteproc/qcom_sysmon.c @@ -190,7 +190,7 @@ struct ssctl_shutdown_resp { struct qmi_response_type_v01 resp; }; -static struct qmi_elem_info ssctl_shutdown_resp_ei[] = { +static const struct qmi_elem_info ssctl_shutdown_resp_ei[] = { { .data_type = QMI_STRUCT, .elem_len = 1, @@ -211,7 +211,7 @@ struct ssctl_subsys_event_req { u32 evt_driven; }; -static struct qmi_elem_info ssctl_subsys_event_req_ei[] = { +static const struct qmi_elem_info ssctl_subsys_event_req_ei[] = { { .data_type = QMI_DATA_LEN, .elem_len = 1, @@ -269,7 +269,7 @@ struct ssctl_subsys_event_resp { struct qmi_response_type_v01 resp; }; -static struct qmi_elem_info ssctl_subsys_event_resp_ei[] = { +static const struct qmi_elem_info ssctl_subsys_event_resp_ei[] = { { .data_type = QMI_STRUCT, .elem_len = 1, @@ -283,7 +283,7 @@ static struct qmi_elem_info ssctl_subsys_event_resp_ei[] = { {} }; -static struct qmi_elem_info ssctl_shutdown_ind_ei[] = { +static const struct qmi_elem_info ssctl_shutdown_ind_ei[] = { {} };
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 sysmon. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> --- drivers/remoteproc/qcom_sysmon.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)