Skip to contentSkip to conversation

remoteproc: qcom_sysmon: Constify qmi_indication_handler

PATCH Applied Rikard Falkeborn 3 participants 3 messages Nov 22, 2020 – Dec 29, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remoteproc: qcom_sysmon: Constify qmi_indication_handler

The only usage of qmi_indication_handler[] is to pass its address to qmi_handle_init() which accepts a const pointer. Make it const to allow the compiler to put it in read-only memory.

---
 drivers/remoteproc/qcom_sysmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/qcom_sysmon.c +1 -1
index 9eb2f6bccea6..6c3275b58c36 100644
@@ -283,7 +283,7 @@ static void sysmon_ind_cb(struct qmi_handle *qmi, struct sockaddr_qrtr *sq,
 	complete(&sysmon->ind_comp);
 }
 
-static struct qmi_msg_handler qmi_indication_handler[] = {
+static const struct qmi_msg_handler qmi_indication_handler[] = {
 	{
 		.type = QMI_INDICATION,
 		.msg_id = SSCTL_SHUTDOWN_READY_IND,
Signature · 1 line
2.29.2
#1 lore raw
This patch was applied to andersson/remoteproc.git (refs/heads/for-next):

Hello:

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

Quoted 8 lines · On Mon, 23 Nov 2020 00:45:40 +0100 you wrote:

The only usage of qmi_indication_handler[] is to pass its address to qmi_handle_init() which accepts a const pointer. Make it const to allow the compiler to put it in read-only memory.

---
 drivers/remoteproc/qcom_sysmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
- remoteproc: qcom_sysmon: Constify qmi_indication_handler

    https://git.kernel.org/andersson/remoteproc/c/dd8f52660cb1

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

#2 lore raw
In reply to Rikard Falkeborn
This patch was applied to qcom/linux.git (refs/heads/for-next):

Hello:

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

Quoted 8 lines · On Mon, 23 Nov 2020 00:45:40 +0100 you wrote:

The only usage of qmi_indication_handler[] is to pass its address to qmi_handle_init() which accepts a const pointer. Make it const to allow the compiler to put it in read-only memory.

---
 drivers/remoteproc/qcom_sysmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
- remoteproc: qcom_sysmon: Constify qmi_indication_handler

    https://git.kernel.org/qcom/c/dd8f52660cb1

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