soc: qcom: pdr: Make QMI message rules const
authorJeff Johnson <quic_jjohnson@quicinc.com>
Wed, 14 Sep 2022 23:47:05 +0000 (16:47 -0700)
committerBjorn Andersson <andersson@kernel.org>
Mon, 17 Oct 2022 18:19:40 +0000 (13:19 -0500)
Commit ff6d365898d4 ("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: Alex Elder <elder@linaro.org>
Reviewed-by: Sibi Sankar <quic_sibis@quicinc.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220914234705.28405-5-quic_jjohnson@quicinc.com
drivers/soc/qcom/pdr_internal.h

index a304222..03c282b 100644 (file)
@@ -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,