Skip to content

Commit ad37a46

Browse files
rikardfalkebornKalle Valo
authored andcommitted
ath10k: Constify static qmi structs
qmi_msg_handler[] and ath10k_qmi_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 <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 6364e69 commit ad37a46

File tree

1 file changed

+2
-2
lines changed
  • drivers/net/wireless/ath/ath10k

1 file changed

+2
-2
lines changed

drivers/net/wireless/ath/ath10k/qmi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ static void ath10k_qmi_msa_ready_ind(struct qmi_handle *qmi_hdl,
917917
ath10k_qmi_driver_event_post(qmi, ATH10K_QMI_EVENT_MSA_READY_IND, NULL);
918918
}
919919

920-
static struct qmi_msg_handler qmi_msg_handler[] = {
920+
static const struct qmi_msg_handler qmi_msg_handler[] = {
921921
{
922922
.type = QMI_INDICATION,
923923
.msg_id = QMI_WLFW_FW_READY_IND_V01,
@@ -981,7 +981,7 @@ static void ath10k_qmi_del_server(struct qmi_handle *qmi_hdl,
981981
NULL);
982982
}
983983

984-
static struct qmi_ops ath10k_qmi_ops = {
984+
static const struct qmi_ops ath10k_qmi_ops = {
985985
.new_server = ath10k_qmi_new_server,
986986
.del_server = ath10k_qmi_del_server,
987987
};

0 commit comments

Comments
 (0)