linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] slimbus: qcom-ngd-ctrl: Constify static structs
@ 2020-11-22 23:42 Rikard Falkeborn
  2020-11-24 10:46 ` Srinivas Kandagatla
  2020-12-29 20:15 ` patchwork-bot+linux-arm-msm
  0 siblings, 2 replies; 3+ messages in thread
From: Rikard Falkeborn @ 2020-11-22 23:42 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Srinivas Kandagatla
  Cc: linux-arm-msm, alsa-devel, linux-kernel, Rikard Falkeborn

qcom_slim_qmi_msg_handlers[] and qcom_slim_ngd_qmi_svc_event_ops are
only used as input arguments to qmi_handle_init() which accepts const
pointers to both qmi_ops and qmi_msg_handler. Make them const to allow
the compiler to put them in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
---
 drivers/slimbus/qcom-ngd-ctrl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
index d8decb345e9d..ea8f605b5c99 100644
--- a/drivers/slimbus/qcom-ngd-ctrl.c
+++ b/drivers/slimbus/qcom-ngd-ctrl.c
@@ -434,7 +434,7 @@ static int qcom_slim_qmi_send_power_request(struct qcom_slim_ngd_ctrl *ctrl,
 	return 0;
 }
 
-static struct qmi_msg_handler qcom_slim_qmi_msg_handlers[] = {
+static const struct qmi_msg_handler qcom_slim_qmi_msg_handlers[] = {
 	{
 		.type = QMI_RESPONSE,
 		.msg_id = SLIMBUS_QMI_POWER_RESP_V01,
@@ -1309,7 +1309,7 @@ static void qcom_slim_ngd_qmi_del_server(struct qmi_handle *hdl,
 	qmi->svc_info.sq_port = 0;
 }
 
-static struct qmi_ops qcom_slim_ngd_qmi_svc_event_ops = {
+static const struct qmi_ops qcom_slim_ngd_qmi_svc_event_ops = {
 	.new_server = qcom_slim_ngd_qmi_new_server,
 	.del_server = qcom_slim_ngd_qmi_del_server,
 };
-- 
2.29.2


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

* Re: [PATCH] slimbus: qcom-ngd-ctrl: Constify static structs
  2020-11-22 23:42 [PATCH] slimbus: qcom-ngd-ctrl: Constify static structs Rikard Falkeborn
@ 2020-11-24 10:46 ` Srinivas Kandagatla
  2020-12-29 20:15 ` patchwork-bot+linux-arm-msm
  1 sibling, 0 replies; 3+ messages in thread
From: Srinivas Kandagatla @ 2020-11-24 10:46 UTC (permalink / raw)
  To: Rikard Falkeborn, Andy Gross, Bjorn Andersson
  Cc: linux-arm-msm, alsa-devel, linux-kernel



On 22/11/2020 23:42, Rikard Falkeborn wrote:
> qcom_slim_qmi_msg_handlers[] and qcom_slim_ngd_qmi_svc_event_ops are
> only used as input arguments to qmi_handle_init() which accepts const
> pointers to both qmi_ops and qmi_msg_handler. Make them const to allow
> the compiler to put them in read-only memory.
> 
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
> ---

Applied thanks,

--srini

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

* Re: [PATCH] slimbus: qcom-ngd-ctrl: Constify static structs
  2020-11-22 23:42 [PATCH] slimbus: qcom-ngd-ctrl: Constify static structs Rikard Falkeborn
  2020-11-24 10:46 ` Srinivas Kandagatla
@ 2020-12-29 20:15 ` patchwork-bot+linux-arm-msm
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2020-12-29 20:15 UTC (permalink / raw)
  To: Rikard Falkeborn; +Cc: linux-arm-msm

Hello:

This patch was applied to qcom/linux.git (refs/heads/for-next):

On Mon, 23 Nov 2020 00:42:53 +0100 you wrote:
> qcom_slim_qmi_msg_handlers[] and qcom_slim_ngd_qmi_svc_event_ops are
> only used as input arguments to qmi_handle_init() which accepts const
> pointers to both qmi_ops and qmi_msg_handler. Make them const to allow
> the compiler to put them in read-only memory.
> 
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
> 
> [...]

Here is the summary with links:
  - slimbus: qcom-ngd-ctrl: Constify static structs
    https://git.kernel.org/qcom/c/a35c6e18abae

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] 3+ messages in thread

end of thread, other threads:[~2020-12-29 20:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-22 23:42 [PATCH] slimbus: qcom-ngd-ctrl: Constify static structs Rikard Falkeborn
2020-11-24 10:46 ` Srinivas Kandagatla
2020-12-29 20:15 ` patchwork-bot+linux-arm-msm

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