* [PATCH] soc: qcom: pdr: Constify static qmi structs
@ 2020-11-22 23:28 Rikard Falkeborn
2020-11-24 4:10 ` patchwork-bot+linux-arm-msm
0 siblings, 1 reply; 2+ messages in thread
From: Rikard Falkeborn @ 2020-11-22 23:28 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson; +Cc: linux-arm-msm, linux-kernel, Rikard Falkeborn
Their only usage is to pass their address 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/soc/qcom/pdr_interface.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/soc/qcom/pdr_interface.c b/drivers/soc/qcom/pdr_interface.c
index 088dc99f77f3..d6e2d061b20f 100644
--- a/drivers/soc/qcom/pdr_interface.c
+++ b/drivers/soc/qcom/pdr_interface.c
@@ -110,7 +110,7 @@ static void pdr_locator_del_server(struct qmi_handle *qmi,
pdr->locator_addr.sq_port = 0;
}
-static struct qmi_ops pdr_locator_ops = {
+static const struct qmi_ops pdr_locator_ops = {
.new_server = pdr_locator_new_server,
.del_server = pdr_locator_del_server,
};
@@ -238,7 +238,7 @@ static void pdr_notifier_del_server(struct qmi_handle *qmi,
mutex_unlock(&pdr->list_lock);
}
-static struct qmi_ops pdr_notifier_ops = {
+static const struct qmi_ops pdr_notifier_ops = {
.new_server = pdr_notifier_new_server,
.del_server = pdr_notifier_del_server,
};
@@ -343,7 +343,7 @@ static void pdr_indication_cb(struct qmi_handle *qmi,
queue_work(pdr->indack_wq, &pdr->indack_work);
}
-static struct qmi_msg_handler qmi_indication_handler[] = {
+static const struct qmi_msg_handler qmi_indication_handler[] = {
{
.type = QMI_INDICATION,
.msg_id = SERVREG_STATE_UPDATED_IND_ID,
--
2.29.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] soc: qcom: pdr: Constify static qmi structs
2020-11-22 23:28 [PATCH] soc: qcom: pdr: Constify static qmi structs Rikard Falkeborn
@ 2020-11-24 4:10 ` patchwork-bot+linux-arm-msm
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2020-11-24 4:10 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:28:18 +0100 you wrote:
> Their only usage is to pass their address 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/soc/qcom/pdr_interface.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Here is the summary with links:
- soc: qcom: pdr: Constify static qmi structs
https://git.kernel.org/qcom/c/0af104d72961
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] 2+ messages in thread
end of thread, other threads:[~2020-11-24 4:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-22 23:28 [PATCH] soc: qcom: pdr: Constify static qmi structs Rikard Falkeborn
2020-11-24 4:10 ` 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).