linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Make QMI message rules const
@ 2022-09-12 23:25 Jeff Johnson
  2022-09-12 23:25 ` [PATCH 1/4] net: ipa: " Jeff Johnson
                   ` (2 more replies)
  0 siblings, 3 replies; 28+ messages in thread
From: Jeff Johnson @ 2022-09-12 23:25 UTC (permalink / raw)
  To: Alex Elder, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Mathieu Poirier, Srinivas Kandagatla, Kalle Valo,
	Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, netdev, linux-remoteproc, alsa-devel,
	linux-kernel, Jeff Johnson

Change ff6d365898d ("soc: qcom: qmi: use const for struct
qmi_elem_info") allows QMI message encoding/decoding rules to be
const. So now update the definitions in the various client to take
advantage of this. Patches for ath10k and ath11k were perviously sent
separately.

This series depends upon:
https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/commit/?h=for-next&id=ff6d365898d4d31bd557954c7fc53f38977b491c

This is in the for-next banch of:
git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git

Hence this series is also based upon that tree/branch.

Jeff Johnson (4):
  net: ipa: Make QMI message rules const
  remoteproc: sysmon: Make QMI message rules const
  slimbus: qcom-ngd-ctrl: Make QMI message rules const
  soc: qcom: pdr: Make QMI message rules const

 drivers/net/ipa/ipa_qmi_msg.c    | 20 ++++++++++----------
 drivers/net/ipa/ipa_qmi_msg.h    | 20 ++++++++++----------
 drivers/remoteproc/qcom_sysmon.c |  8 ++++----
 drivers/slimbus/qcom-ngd-ctrl.c  |  8 ++++----
 drivers/soc/qcom/pdr_internal.h  | 20 ++++++++++----------
 5 files changed, 38 insertions(+), 38 deletions(-)

-- 
2.37.0


^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 1/4] net: ipa: Make QMI message rules const
  2022-09-12 23:25 [PATCH 0/4] Make QMI message rules const Jeff Johnson
@ 2022-09-12 23:25 ` Jeff Johnson
  2022-09-12 23:25   ` [PATCH 2/4] remoteproc: sysmon: " Jeff Johnson
  2022-09-14 10:22   ` [PATCH 1/4] net: ipa: " Sibi Sankar
  2022-09-13 13:58 ` [PATCH 0/4] " Alex Elder
  2022-09-14 23:47 ` [PATCH v2 " Jeff Johnson
  2 siblings, 2 replies; 28+ messages in thread
From: Jeff Johnson @ 2022-09-12 23:25 UTC (permalink / raw)
  To: Alex Elder, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Mathieu Poirier, Srinivas Kandagatla, Kalle Valo,
	Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, netdev, linux-remoteproc, alsa-devel,
	linux-kernel, Jeff Johnson

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(-)

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_ */
-- 
2.37.0


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 2/4] remoteproc: sysmon: Make QMI message rules const
  2022-09-12 23:25 ` [PATCH 1/4] net: ipa: " Jeff Johnson
@ 2022-09-12 23:25   ` Jeff Johnson
  2022-09-12 23:25     ` [PATCH 3/4] slimbus: qcom-ngd-ctrl: " Jeff Johnson
  2022-09-14 10:24     ` [PATCH 2/4] remoteproc: sysmon: " Sibi Sankar
  2022-09-14 10:22   ` [PATCH 1/4] net: ipa: " Sibi Sankar
  1 sibling, 2 replies; 28+ messages in thread
From: Jeff Johnson @ 2022-09-12 23:25 UTC (permalink / raw)
  To: Alex Elder, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Mathieu Poirier, Srinivas Kandagatla, Kalle Valo,
	Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, netdev, linux-remoteproc, alsa-devel,
	linux-kernel, Jeff Johnson

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(-)

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[] = {
 	{}
 };
 
-- 
2.37.0


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 3/4] slimbus: qcom-ngd-ctrl: Make QMI message rules const
  2022-09-12 23:25   ` [PATCH 2/4] remoteproc: sysmon: " Jeff Johnson
@ 2022-09-12 23:25     ` Jeff Johnson
  2022-09-12 23:25       ` [PATCH 4/4] soc: qcom: pdr: " Jeff Johnson
                         ` (2 more replies)
  2022-09-14 10:24     ` [PATCH 2/4] remoteproc: sysmon: " Sibi Sankar
  1 sibling, 3 replies; 28+ messages in thread
From: Jeff Johnson @ 2022-09-12 23:25 UTC (permalink / raw)
  To: Alex Elder, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Mathieu Poirier, Srinivas Kandagatla, Kalle Valo,
	Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, netdev, linux-remoteproc, alsa-devel,
	linux-kernel, Jeff Johnson

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>
---
 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,
-- 
2.37.0


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 4/4] soc: qcom: pdr: Make QMI message rules const
  2022-09-12 23:25     ` [PATCH 3/4] slimbus: qcom-ngd-ctrl: " Jeff Johnson
@ 2022-09-12 23:25       ` Jeff Johnson
  2022-09-14 10:18         ` Sibi Sankar
  2022-09-14 10:26       ` [PATCH 3/4] slimbus: qcom-ngd-ctrl: " Sibi Sankar
  2022-09-16 13:06       ` Srinivas Kandagatla
  2 siblings, 1 reply; 28+ messages in thread
From: Jeff Johnson @ 2022-09-12 23:25 UTC (permalink / raw)
  To: Alex Elder, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Mathieu Poirier, Srinivas Kandagatla, Kalle Valo,
	Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, netdev, linux-remoteproc, alsa-devel,
	linux-kernel, Jeff Johnson

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>
---
 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,
-- 
2.37.0


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [PATCH 0/4] Make QMI message rules const
  2022-09-12 23:25 [PATCH 0/4] Make QMI message rules const Jeff Johnson
  2022-09-12 23:25 ` [PATCH 1/4] net: ipa: " Jeff Johnson
@ 2022-09-13 13:58 ` Alex Elder
  2022-09-13 18:51   ` Jeff Johnson
  2022-09-15 18:47   ` Jeff Johnson
  2022-09-14 23:47 ` [PATCH v2 " Jeff Johnson
  2 siblings, 2 replies; 28+ messages in thread
From: Alex Elder @ 2022-09-13 13:58 UTC (permalink / raw)
  To: Jeff Johnson, Alex Elder, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Mathieu Poirier,
	Srinivas Kandagatla, Kalle Valo, Andy Gross, Bjorn Andersson,
	Konrad Dybcio
  Cc: linux-arm-msm, netdev, linux-remoteproc, alsa-devel, linux-kernel

On 9/12/22 6:25 PM, Jeff Johnson wrote:
> Change ff6d365898d ("soc: qcom: qmi: use const for struct
> qmi_elem_info") allows QMI message encoding/decoding rules to be
> const. So now update the definitions in the various client to take
> advantage of this. Patches for ath10k and ath11k were perviously sent
> separately.

I have had this on my "to-do list" for ages.
The commit you mention updates the code to be
explicit about not modifying this data, which
is great.

I scanned over the changes, and I assume that
all you did was make every object having the
qmi_elem_info structure type be defined as
constant.

Why aren't you changing the "ei_array" field in
the qmi_elem_info structure to be const?  Or the
"ei" field of the qmi_msg_handler structure?  And
the qmi_response_type_v01_ei array (and so on)?

I like what you're doing, but can you comment
on what your plans are beyond this series?
Do you intend to make the rest of these fields
const?

Thanks.

					-Alex

> This series depends upon:
> https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/commit/?h=for-next&id=ff6d365898d4d31bd557954c7fc53f38977b491c
> 
> This is in the for-next banch of:
> git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git
> 
> Hence this series is also based upon that tree/branch.
> 
> Jeff Johnson (4):
>    net: ipa: Make QMI message rules const
>    remoteproc: sysmon: Make QMI message rules const
>    slimbus: qcom-ngd-ctrl: Make QMI message rules const
>    soc: qcom: pdr: Make QMI message rules const
> 
>   drivers/net/ipa/ipa_qmi_msg.c    | 20 ++++++++++----------
>   drivers/net/ipa/ipa_qmi_msg.h    | 20 ++++++++++----------
>   drivers/remoteproc/qcom_sysmon.c |  8 ++++----
>   drivers/slimbus/qcom-ngd-ctrl.c  |  8 ++++----
>   drivers/soc/qcom/pdr_internal.h  | 20 ++++++++++----------
>   5 files changed, 38 insertions(+), 38 deletions(-)
> 


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 0/4] Make QMI message rules const
  2022-09-13 13:58 ` [PATCH 0/4] " Alex Elder
@ 2022-09-13 18:51   ` Jeff Johnson
  2022-09-13 20:21     ` Alex Elder
  2022-09-15 18:47   ` Jeff Johnson
  1 sibling, 1 reply; 28+ messages in thread
From: Jeff Johnson @ 2022-09-13 18:51 UTC (permalink / raw)
  To: Alex Elder, Alex Elder, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Mathieu Poirier,
	Srinivas Kandagatla, Kalle Valo, Andy Gross, Bjorn Andersson,
	Konrad Dybcio
  Cc: linux-arm-msm, netdev, linux-remoteproc, alsa-devel, linux-kernel

On 9/13/2022 6:58 AM, Alex Elder wrote:
> On 9/12/22 6:25 PM, Jeff Johnson wrote:
>> Change ff6d365898d ("soc: qcom: qmi: use const for struct
>> qmi_elem_info") allows QMI message encoding/decoding rules to be
>> const. So now update the definitions in the various client to take
>> advantage of this. Patches for ath10k and ath11k were perviously sent
>> separately.
> 
> I have had this on my "to-do list" for ages.
> The commit you mention updates the code to be
> explicit about not modifying this data, which
> is great.
> 
> I scanned over the changes, and I assume that
> all you did was make every object having the
> qmi_elem_info structure type be defined as
> constant.
> 
> Why aren't you changing the "ei_array" field in
> the qmi_elem_info structure to be const?  Or the
> "ei" field of the qmi_msg_handler structure?  And
> the qmi_response_type_v01_ei array (and so on)?
> 
> I like what you're doing, but can you comment
> on what your plans are beyond this series?
> Do you intend to make the rest of these fields
> const?

Hi Alex,
My primary focus is the ath* wireless drivers, and my primary goal was 
to make the tables there const. So this series, along with the two 
out-of-series patches for ath10k and ath11k complete that scope of work.

The lack of the other changes to the QMI data structures is simply due 
to me not looking in depth at the QMI code beyond the registration 
interface.

I'll be happy to revisit this as a separate cleanup.

/jeff


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 0/4] Make QMI message rules const
  2022-09-13 18:51   ` Jeff Johnson
@ 2022-09-13 20:21     ` Alex Elder
  2022-09-13 22:19       ` Jeff Johnson
  0 siblings, 1 reply; 28+ messages in thread
From: Alex Elder @ 2022-09-13 20:21 UTC (permalink / raw)
  To: Jeff Johnson, Alex Elder, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Mathieu Poirier,
	Srinivas Kandagatla, Kalle Valo, Andy Gross, Bjorn Andersson,
	Konrad Dybcio
  Cc: linux-arm-msm, netdev, linux-remoteproc, alsa-devel, linux-kernel

On 9/13/22 1:51 PM, Jeff Johnson wrote:
> On 9/13/2022 6:58 AM, Alex Elder wrote:
>> On 9/12/22 6:25 PM, Jeff Johnson wrote:
>>> Change ff6d365898d ("soc: qcom: qmi: use const for struct
>>> qmi_elem_info") allows QMI message encoding/decoding rules to be
>>> const. So now update the definitions in the various client to take
>>> advantage of this. Patches for ath10k and ath11k were perviously sent
>>> separately.
>>
>> I have had this on my "to-do list" for ages.
>> The commit you mention updates the code to be
>> explicit about not modifying this data, which
>> is great.
>>
>> I scanned over the changes, and I assume that
>> all you did was make every object having the
>> qmi_elem_info structure type be defined as
>> constant.
>>
>> Why aren't you changing the "ei_array" field in
>> the qmi_elem_info structure to be const?  Or the
>> "ei" field of the qmi_msg_handler structure?  And
>> the qmi_response_type_v01_ei array (and so on)?
>>
>> I like what you're doing, but can you comment
>> on what your plans are beyond this series?
>> Do you intend to make the rest of these fields
>> const?
> 
> Hi Alex,
> My primary focus is the ath* wireless drivers, and my primary goal was 
> to make the tables there const. So this series, along with the two 
> out-of-series patches for ath10k and ath11k complete that scope of work.
> 
> The lack of the other changes to the QMI data structures is simply due 
> to me not looking in depth at the QMI code beyond the registration 
> interface.
> 
> I'll be happy to revisit this as a separate cleanup.

Sounds good to me.  Like I said I've wanted to do this
myself, and as long as you've gotten this far I'd like
to see it taken to completion.  Compile-testing is most
likely sufficient to make sure you got it right.

I cherry-picked the one commit, and downloaded the series
and found no new build warnings.  Checkpatch would prefer
you used "ff6d365898d4" rather than "ff6d365898d" for the
commit ID, but that's OK.

Anyway, for the whole series:

Reviewed-by: Alex Elder <elder@linaro.org>


> /jeff
> 


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 0/4] Make QMI message rules const
  2022-09-13 20:21     ` Alex Elder
@ 2022-09-13 22:19       ` Jeff Johnson
  0 siblings, 0 replies; 28+ messages in thread
From: Jeff Johnson @ 2022-09-13 22:19 UTC (permalink / raw)
  To: Alex Elder, Alex Elder, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Mathieu Poirier,
	Srinivas Kandagatla, Kalle Valo, Andy Gross, Bjorn Andersson,
	Konrad Dybcio
  Cc: linux-arm-msm, netdev, linux-remoteproc, alsa-devel, linux-kernel

On 9/13/2022 1:21 PM, Alex Elder wrote:
> I cherry-picked the one commit, and downloaded the series
> and found no new build warnings.  Checkpatch would prefer
> you used "ff6d365898d4" rather than "ff6d365898d" for the
> commit ID, but that's OK.

I'll clean that up in a v2

> 
> Anyway, for the whole series:
> 
> Reviewed-by: Alex Elder <elder@linaro.org>

Thanks!



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 4/4] soc: qcom: pdr: Make QMI message rules const
  2022-09-12 23:25       ` [PATCH 4/4] soc: qcom: pdr: " Jeff Johnson
@ 2022-09-14 10:18         ` Sibi Sankar
  0 siblings, 0 replies; 28+ messages in thread
From: Sibi Sankar @ 2022-09-14 10:18 UTC (permalink / raw)
  To: Jeff Johnson, Alex Elder, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Mathieu Poirier,
	Srinivas Kandagatla, Kalle Valo, Andy Gross, Bjorn Andersson,
	Konrad Dybcio
  Cc: linux-arm-msm, netdev, linux-remoteproc, alsa-devel, linux-kernel



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,
> 

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 1/4] net: ipa: Make QMI message rules const
  2022-09-12 23:25 ` [PATCH 1/4] net: ipa: " Jeff Johnson
  2022-09-12 23:25   ` [PATCH 2/4] remoteproc: sysmon: " Jeff Johnson
@ 2022-09-14 10:22   ` Sibi Sankar
  1 sibling, 0 replies; 28+ messages in thread
From: Sibi Sankar @ 2022-09-14 10:22 UTC (permalink / raw)
  To: Jeff Johnson, Alex Elder, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Mathieu Poirier,
	Srinivas Kandagatla, Kalle Valo, Andy Gross, Bjorn Andersson,
	Konrad Dybcio
  Cc: linux-arm-msm, netdev, linux-remoteproc, alsa-devel, linux-kernel



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_ */
> 

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 2/4] remoteproc: sysmon: Make QMI message rules const
  2022-09-12 23:25   ` [PATCH 2/4] remoteproc: sysmon: " Jeff Johnson
  2022-09-12 23:25     ` [PATCH 3/4] slimbus: qcom-ngd-ctrl: " Jeff Johnson
@ 2022-09-14 10:24     ` Sibi Sankar
  1 sibling, 0 replies; 28+ messages in thread
From: Sibi Sankar @ 2022-09-14 10:24 UTC (permalink / raw)
  To: Jeff Johnson, Alex Elder, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Mathieu Poirier,
	Srinivas Kandagatla, Kalle Valo, Andy Gross, Bjorn Andersson,
	Konrad Dybcio
  Cc: linux-arm-msm, netdev, linux-remoteproc, alsa-devel, linux-kernel



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[] = {
>   	{}
>   };
>   
> 

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 3/4] slimbus: qcom-ngd-ctrl: Make QMI message rules const
  2022-09-12 23:25     ` [PATCH 3/4] slimbus: qcom-ngd-ctrl: " Jeff Johnson
  2022-09-12 23:25       ` [PATCH 4/4] soc: qcom: pdr: " Jeff Johnson
@ 2022-09-14 10:26       ` Sibi Sankar
  2022-09-16 13:06       ` Srinivas Kandagatla
  2 siblings, 0 replies; 28+ messages in thread
From: Sibi Sankar @ 2022-09-14 10:26 UTC (permalink / raw)
  To: Jeff Johnson, Alex Elder, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Mathieu Poirier,
	Srinivas Kandagatla, Kalle Valo, Andy Gross, Bjorn Andersson,
	Konrad Dybcio
  Cc: linux-arm-msm, netdev, linux-remoteproc, alsa-devel, linux-kernel



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,
> 

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH v2 0/4] Make QMI message rules const
  2022-09-12 23:25 [PATCH 0/4] Make QMI message rules const Jeff Johnson
  2022-09-12 23:25 ` [PATCH 1/4] net: ipa: " Jeff Johnson
  2022-09-13 13:58 ` [PATCH 0/4] " Alex Elder
@ 2022-09-14 23:47 ` Jeff Johnson
  2022-09-14 23:47   ` [PATCH v2 1/4] net: ipa: " Jeff Johnson
                     ` (5 more replies)
  2 siblings, 6 replies; 28+ messages in thread
From: Jeff Johnson @ 2022-09-14 23:47 UTC (permalink / raw)
  To: Alex Elder, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Mathieu Poirier, Srinivas Kandagatla, Kalle Valo,
	Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, netdev, linux-remoteproc, alsa-devel,
	linux-kernel, Jeff Johnson

Commit ff6d365898d4 ("soc: qcom: qmi: use const for struct
qmi_elem_info") allows QMI message encoding/decoding rules to be
const. So now update the definitions in the various clients to take
advantage of this. Patches for ath10k and ath11k were previously sent
separately.

This series depends upon:
https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/commit/?h=for-next&id=ff6d365898d4d31bd557954c7fc53f38977b491c

This is in the for-next branch of:
git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git

Hence this series is also based upon that tree/branch.

Changes in v2 (applied to all 4 patches in the series):
- Fixed the truncated hash ff6d365898d ==> ff6d365898d4
- Added RB tags

Jeff Johnson (4):
  net: ipa: Make QMI message rules const
  remoteproc: sysmon: Make QMI message rules const
  slimbus: qcom-ngd-ctrl: Make QMI message rules const
  soc: qcom: pdr: Make QMI message rules const

 drivers/net/ipa/ipa_qmi_msg.c    | 20 ++++++++++----------
 drivers/net/ipa/ipa_qmi_msg.h    | 20 ++++++++++----------
 drivers/remoteproc/qcom_sysmon.c |  8 ++++----
 drivers/slimbus/qcom-ngd-ctrl.c  |  8 ++++----
 drivers/soc/qcom/pdr_internal.h  | 20 ++++++++++----------
 5 files changed, 38 insertions(+), 38 deletions(-)

-- 
2.37.0


^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH v2 1/4] net: ipa: Make QMI message rules const
  2022-09-14 23:47 ` [PATCH v2 " Jeff Johnson
@ 2022-09-14 23:47   ` Jeff Johnson
  2022-10-18 21:17     ` [RESEND PATCH net-next] " Jeff Johnson
  2022-09-14 23:47   ` [PATCH v2 2/4] remoteproc: sysmon: " Jeff Johnson
                     ` (4 subsequent siblings)
  5 siblings, 1 reply; 28+ messages in thread
From: Jeff Johnson @ 2022-09-14 23:47 UTC (permalink / raw)
  To: Alex Elder, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Mathieu Poirier, Srinivas Kandagatla, Kalle Valo,
	Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, netdev, linux-remoteproc, alsa-devel,
	linux-kernel, Jeff Johnson, Alex Elder, Sibi Sankar

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 IPA.

Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Reviewed-by: Alex Elder <elder@linaro.org>
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_ */
-- 
2.37.0


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v2 2/4] remoteproc: sysmon: Make QMI message rules const
  2022-09-14 23:47 ` [PATCH v2 " Jeff Johnson
  2022-09-14 23:47   ` [PATCH v2 1/4] net: ipa: " Jeff Johnson
@ 2022-09-14 23:47   ` Jeff Johnson
  2022-10-18 20:44     ` [RESEND PATCH] " Jeff Johnson
  2022-09-14 23:47   ` [PATCH v2 3/4] slimbus: qcom-ngd-ctrl: " Jeff Johnson
                     ` (3 subsequent siblings)
  5 siblings, 1 reply; 28+ messages in thread
From: Jeff Johnson @ 2022-09-14 23:47 UTC (permalink / raw)
  To: Alex Elder, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Mathieu Poirier, Srinivas Kandagatla, Kalle Valo,
	Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, netdev, linux-remoteproc, alsa-devel,
	linux-kernel, Jeff Johnson, Alex Elder, Sibi Sankar

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 sysmon.

Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Reviewed-by: Alex Elder <elder@linaro.org>
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[] = {
 	{}
 };
 
-- 
2.37.0


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v2 3/4] slimbus: qcom-ngd-ctrl: Make QMI message rules const
  2022-09-14 23:47 ` [PATCH v2 " Jeff Johnson
  2022-09-14 23:47   ` [PATCH v2 1/4] net: ipa: " Jeff Johnson
  2022-09-14 23:47   ` [PATCH v2 2/4] remoteproc: sysmon: " Jeff Johnson
@ 2022-09-14 23:47   ` Jeff Johnson
  2022-10-18 22:25     ` [RESEND PATCH] " Jeff Johnson
  2022-09-14 23:47   ` [PATCH v2 4/4] soc: qcom: pdr: " Jeff Johnson
                     ` (2 subsequent siblings)
  5 siblings, 1 reply; 28+ messages in thread
From: Jeff Johnson @ 2022-09-14 23:47 UTC (permalink / raw)
  To: Alex Elder, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Mathieu Poirier, Srinivas Kandagatla, Kalle Valo,
	Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, netdev, linux-remoteproc, alsa-devel,
	linux-kernel, Jeff Johnson, Alex Elder, Sibi Sankar

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-ngd-ctrl.

Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Reviewed-by: Alex Elder <elder@linaro.org>
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,
-- 
2.37.0


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH v2 4/4] soc: qcom: pdr: Make QMI message rules const
  2022-09-14 23:47 ` [PATCH v2 " Jeff Johnson
                     ` (2 preceding siblings ...)
  2022-09-14 23:47   ` [PATCH v2 3/4] slimbus: qcom-ngd-ctrl: " Jeff Johnson
@ 2022-09-14 23:47   ` Jeff Johnson
  2022-10-05 20:54     ` [RESEND] " Jeff Johnson
  2022-10-18  3:14   ` [PATCH v2 0/4] " Bjorn Andersson
  2022-12-07 15:53   ` Bjorn Andersson
  5 siblings, 1 reply; 28+ messages in thread
From: Jeff Johnson @ 2022-09-14 23:47 UTC (permalink / raw)
  To: Alex Elder, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Mathieu Poirier, Srinivas Kandagatla, Kalle Valo,
	Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, netdev, linux-remoteproc, alsa-devel,
	linux-kernel, Jeff Johnson, Alex Elder, Sibi Sankar

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>
---
 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,
-- 
2.37.0


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [PATCH 0/4] Make QMI message rules const
  2022-09-13 13:58 ` [PATCH 0/4] " Alex Elder
  2022-09-13 18:51   ` Jeff Johnson
@ 2022-09-15 18:47   ` Jeff Johnson
  1 sibling, 0 replies; 28+ messages in thread
From: Jeff Johnson @ 2022-09-15 18:47 UTC (permalink / raw)
  To: Alex Elder, Alex Elder, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Mathieu Poirier,
	Srinivas Kandagatla, Kalle Valo, Andy Gross, Bjorn Andersson,
	Konrad Dybcio
  Cc: linux-arm-msm, netdev, linux-remoteproc, alsa-devel, linux-kernel

Following up on:
On 9/13/2022 6:58 AM, Alex Elder wrote:
> Why aren't you changing the "ei_array" field in
> the qmi_elem_info structure to be const?  Or the
> "ei" field of the qmi_msg_handler structure?  And
> the qmi_response_type_v01_ei array (and so on)?

All of these suggestions were actually part of the prerequisite patch:
<https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/commit/?h=for-next&id=ff6d365898d4d31bd557954c7fc53f38977b491c>

So I think all of the comments have been addressed.

Thanks!
/jeff


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 3/4] slimbus: qcom-ngd-ctrl: Make QMI message rules const
  2022-09-12 23:25     ` [PATCH 3/4] slimbus: qcom-ngd-ctrl: " Jeff Johnson
  2022-09-12 23:25       ` [PATCH 4/4] soc: qcom: pdr: " Jeff Johnson
  2022-09-14 10:26       ` [PATCH 3/4] slimbus: qcom-ngd-ctrl: " Sibi Sankar
@ 2022-09-16 13:06       ` Srinivas Kandagatla
  2022-09-16 15:20         ` Jeff Johnson
  2 siblings, 1 reply; 28+ messages in thread
From: Srinivas Kandagatla @ 2022-09-16 13:06 UTC (permalink / raw)
  To: Jeff Johnson, Alex Elder, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Mathieu Poirier, Kalle Valo,
	Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, netdev, linux-remoteproc, alsa-devel, linux-kernel



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,

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 3/4] slimbus: qcom-ngd-ctrl: Make QMI message rules const
  2022-09-16 13:06       ` Srinivas Kandagatla
@ 2022-09-16 15:20         ` Jeff Johnson
  0 siblings, 0 replies; 28+ messages in thread
From: Jeff Johnson @ 2022-09-16 15:20 UTC (permalink / raw)
  To: Srinivas Kandagatla, Alex Elder, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Mathieu Poirier, Kalle Valo,
	Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, netdev, linux-remoteproc, alsa-devel, linux-kernel

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [RESEND] soc: qcom: pdr: Make QMI message rules const
  2022-09-14 23:47   ` [PATCH v2 4/4] soc: qcom: pdr: " Jeff Johnson
@ 2022-10-05 20:54     ` Jeff Johnson
  0 siblings, 0 replies; 28+ messages in thread
From: Jeff Johnson @ 2022-10-05 20:54 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, linux-kernel, Jeff Johnson, Alex Elder, Sibi Sankar

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>
---
This patch was last sent as part of the series:
[PATCH v2 0/4] Make QMI message rules const
https://lore.kernel.org/linux-arm-msm/20220914234705.28405-1-quic_jjohnson@quicinc.com/

As

[PATCH v2 4/4] soc: qcom: pdr: Make QMI message rules const
https://lore.kernel.org/linux-arm-msm/20220914234705.28405-5-quic_jjohnson@quicinc.com/

Since the individual patches in the series will land in separate
trees, and since there are no dependencies between them, they are
being resent separately when the following dependent change has landed
in the destination tree:

ff6d365898d4 ("soc: qcom: qmi: use const for struct qmi_elem_info")

 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,
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [PATCH v2 0/4] Make QMI message rules const
  2022-09-14 23:47 ` [PATCH v2 " Jeff Johnson
                     ` (3 preceding siblings ...)
  2022-09-14 23:47   ` [PATCH v2 4/4] soc: qcom: pdr: " Jeff Johnson
@ 2022-10-18  3:14   ` Bjorn Andersson
  2022-12-07 15:53   ` Bjorn Andersson
  5 siblings, 0 replies; 28+ messages in thread
From: Bjorn Andersson @ 2022-10-18  3:14 UTC (permalink / raw)
  To: pabeni, kuba, kvalo, mathieu.poirier, elder, quic_jjohnson,
	edumazet, srinivas.kandagatla, davem, agross, Konrad Dybcio
  Cc: alsa-devel, linux-remoteproc, linux-kernel, linux-arm-msm, netdev

On Wed, 14 Sep 2022 16:47:01 -0700, Jeff Johnson wrote:
> Commit ff6d365898d4 ("soc: qcom: qmi: use const for struct
> qmi_elem_info") allows QMI message encoding/decoding rules to be
> const. So now update the definitions in the various clients to take
> advantage of this. Patches for ath10k and ath11k were previously sent
> separately.
> 
> This series depends upon:
> https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/commit/?h=for-next&id=ff6d365898d4d31bd557954c7fc53f38977b491c
> 
> [...]

Applied, thanks!

[1/4] net: ipa: Make QMI message rules const
      (no commit info)
[2/4] remoteproc: sysmon: Make QMI message rules const
      (no commit info)
[3/4] slimbus: qcom-ngd-ctrl: Make QMI message rules const
      (no commit info)
[4/4] soc: qcom: pdr: Make QMI message rules const
      commit: afc7b849ebcf063ca84a79c749d4996a8781fc55

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [RESEND PATCH] remoteproc: sysmon: Make QMI message rules const
  2022-09-14 23:47   ` [PATCH v2 2/4] remoteproc: sysmon: " Jeff Johnson
@ 2022-10-18 20:44     ` Jeff Johnson
  0 siblings, 0 replies; 28+ messages in thread
From: Jeff Johnson @ 2022-10-18 20:44 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Mathieu Poirier
  Cc: linux-arm-msm, linux-remoteproc, linux-kernel, Jeff Johnson,
	Alex Elder, Sibi Sankar

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 sysmon.

Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Reviewed-by: Sibi Sankar <quic_sibis@quicinc.com>
---
This patch was last sent as part of the series:
[PATCH v2 0/4] Make QMI message rules const
https://lore.kernel.org/linux-arm-msm/20220914234705.28405-1-quic_jjohnson@quicinc.com/

As

[PATCH v2 2/4] remoteproc: sysmon: Make QMI message rules const
https://lore.kernel.org/linux-arm-msm/20220914234705.28405-3-quic_jjohnson@quicinc.com/

Since the individual patches in the series will land in separate
trees, and since there are no dependencies between them, they are
being resent separately when the following dependent change has landed
in the destination tree
ff6d365898d4 ("soc: qcom: qmi: use const for struct qmi_elem_info")

That dependent change has landed in the rproc-next branch of
remoteproc/linux.git so this patch is now ready to be consumed.

 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[] = {
 	{}
 };
 
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [RESEND PATCH net-next] net: ipa: Make QMI message rules const
  2022-09-14 23:47   ` [PATCH v2 1/4] net: ipa: " Jeff Johnson
@ 2022-10-18 21:17     ` Jeff Johnson
  2022-10-21 12:20       ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 28+ messages in thread
From: Jeff Johnson @ 2022-10-18 21:17 UTC (permalink / raw)
  To: Alex Elder, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: netdev, linux-kernel, Jeff Johnson, Alex Elder, Sibi Sankar

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 IPA.

Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Reviewed-by: Sibi Sankar <quic_sibis@quicinc.com>
---
This patch was last sent as part of the series:
[PATCH v2 0/4] Make QMI message rules const
https://lore.kernel.org/linux-arm-msm/20220914234705.28405-1-quic_jjohnson@quicinc.com/

As

[PATCH v2 1/4] net: ipa: Make QMI message rules const
https://lore.kernel.org/linux-arm-msm/20220914234705.28405-2-quic_jjohnson@quicinc.com/

Since the individual patches in the series will land in separate
trees, and since there are no dependencies between them, they are
being resent separately when the following dependent change has landed
in the destination tree
ff6d365898d4 ("soc: qcom: qmi: use const for struct qmi_elem_info")

That dependent change has landed in netdev/net-next.git so this patch
is now ready to be consumed.

 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 97c0befe8d86..894f99517233 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 e29663965f43..b73503552c4d 100644
--- a/drivers/net/ipa/ipa_qmi_msg.h
+++ b/drivers/net/ipa/ipa_qmi_msg.h
@@ -247,15 +247,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_ */
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [RESEND PATCH] slimbus: qcom-ngd-ctrl: Make QMI message rules const
  2022-09-14 23:47   ` [PATCH v2 3/4] slimbus: qcom-ngd-ctrl: " Jeff Johnson
@ 2022-10-18 22:25     ` Jeff Johnson
  0 siblings, 0 replies; 28+ messages in thread
From: Jeff Johnson @ 2022-10-18 22:25 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Srinivas Kandagatla
  Cc: linux-arm-msm, alsa-devel, linux-kernel, Jeff Johnson,
	Alex Elder, Sibi Sankar

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-ngd-ctrl.

Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Reviewed-by: Sibi Sankar <quic_sibis@quicinc.com>
---
This patch was last sent as part of the series:
[PATCH v2 0/4] Make QMI message rules const
https://lore.kernel.org/linux-arm-msm/20220914234705.28405-1-quic_jjohnson@quicinc.com/

As

[PATCH v2 3/4] slimbus: qcom-ngd-ctrl: Make QMI message rules const
https://lore.kernel.org/linux-arm-msm/20220914234705.28405-4-quic_jjohnson@quicinc.com/

Since the individual patches in the series will land in separate
trees, and since there are no dependencies between them, they are
being resent separately when the following dependent change has landed
in the destination tree
ff6d365898d4 ("soc: qcom: qmi: use const for struct qmi_elem_info")

That dependent change has landed in the for-next branch of
tiwai/sound.git (which I hope is the right tree for this patch) so I
believe this patch is now ready to be consumed.

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 76c5e446d243..f5da340bee94 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,
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [RESEND PATCH net-next] net: ipa: Make QMI message rules const
  2022-10-18 21:17     ` [RESEND PATCH net-next] " Jeff Johnson
@ 2022-10-21 12:20       ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 28+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-10-21 12:20 UTC (permalink / raw)
  To: Jeff Johnson
  Cc: elder, davem, edumazet, kuba, pabeni, netdev, linux-kernel,
	elder, quic_sibis

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Tue, 18 Oct 2022 14:17:18 -0700 you wrote:
> 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 IPA.
> 
> Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
> Reviewed-by: Alex Elder <elder@linaro.org>
> Reviewed-by: Sibi Sankar <quic_sibis@quicinc.com>
> 
> [...]

Here is the summary with links:
  - [RESEND,net-next] net: ipa: Make QMI message rules const
    https://git.kernel.org/netdev/net-next/c/c0facc045a14

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH v2 0/4] Make QMI message rules const
  2022-09-14 23:47 ` [PATCH v2 " Jeff Johnson
                     ` (4 preceding siblings ...)
  2022-10-18  3:14   ` [PATCH v2 0/4] " Bjorn Andersson
@ 2022-12-07 15:53   ` Bjorn Andersson
  5 siblings, 0 replies; 28+ messages in thread
From: Bjorn Andersson @ 2022-12-07 15:53 UTC (permalink / raw)
  To: srinivas.kandagatla, kuba, konrad.dybcio, elder, kvalo, edumazet,
	quic_jjohnson, mathieu.poirier, davem, agross, pabeni
  Cc: linux-kernel, linux-remoteproc, netdev, alsa-devel, linux-arm-msm

On Wed, 14 Sep 2022 16:47:01 -0700, Jeff Johnson wrote:
> Commit ff6d365898d4 ("soc: qcom: qmi: use const for struct
> qmi_elem_info") allows QMI message encoding/decoding rules to be
> const. So now update the definitions in the various clients to take
> advantage of this. Patches for ath10k and ath11k were previously sent
> separately.
> 
> This series depends upon:
> https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/commit/?h=for-next&id=ff6d365898d4d31bd557954c7fc53f38977b491c
> 
> [...]

Applied, thanks!

[1/4] net: ipa: Make QMI message rules const
      (no commit info)
[2/4] remoteproc: sysmon: Make QMI message rules const
      commit: 7bd156cbbd0add4b869a7d997d057b76c329f4e5
[3/4] slimbus: qcom-ngd-ctrl: Make QMI message rules const
      (no commit info)
[4/4] soc: qcom: pdr: Make QMI message rules const
      (no commit info)

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2022-12-07 15:54 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-12 23:25 [PATCH 0/4] Make QMI message rules const Jeff Johnson
2022-09-12 23:25 ` [PATCH 1/4] net: ipa: " Jeff Johnson
2022-09-12 23:25   ` [PATCH 2/4] remoteproc: sysmon: " Jeff Johnson
2022-09-12 23:25     ` [PATCH 3/4] slimbus: qcom-ngd-ctrl: " Jeff Johnson
2022-09-12 23:25       ` [PATCH 4/4] soc: qcom: pdr: " Jeff Johnson
2022-09-14 10:18         ` Sibi Sankar
2022-09-14 10:26       ` [PATCH 3/4] slimbus: qcom-ngd-ctrl: " Sibi Sankar
2022-09-16 13:06       ` Srinivas Kandagatla
2022-09-16 15:20         ` Jeff Johnson
2022-09-14 10:24     ` [PATCH 2/4] remoteproc: sysmon: " Sibi Sankar
2022-09-14 10:22   ` [PATCH 1/4] net: ipa: " Sibi Sankar
2022-09-13 13:58 ` [PATCH 0/4] " Alex Elder
2022-09-13 18:51   ` Jeff Johnson
2022-09-13 20:21     ` Alex Elder
2022-09-13 22:19       ` Jeff Johnson
2022-09-15 18:47   ` Jeff Johnson
2022-09-14 23:47 ` [PATCH v2 " Jeff Johnson
2022-09-14 23:47   ` [PATCH v2 1/4] net: ipa: " Jeff Johnson
2022-10-18 21:17     ` [RESEND PATCH net-next] " Jeff Johnson
2022-10-21 12:20       ` patchwork-bot+netdevbpf
2022-09-14 23:47   ` [PATCH v2 2/4] remoteproc: sysmon: " Jeff Johnson
2022-10-18 20:44     ` [RESEND PATCH] " Jeff Johnson
2022-09-14 23:47   ` [PATCH v2 3/4] slimbus: qcom-ngd-ctrl: " Jeff Johnson
2022-10-18 22:25     ` [RESEND PATCH] " Jeff Johnson
2022-09-14 23:47   ` [PATCH v2 4/4] soc: qcom: pdr: " Jeff Johnson
2022-10-05 20:54     ` [RESEND] " Jeff Johnson
2022-10-18  3:14   ` [PATCH v2 0/4] " Bjorn Andersson
2022-12-07 15:53   ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).