Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH] scsi: ufs: qcom: Make struct ufs_qcom_bw_table static const
@ 2023-08-02  4:01 Manivannan Sadhasivam
  2023-08-02 15:56 ` Bart Van Assche
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Manivannan Sadhasivam @ 2023-08-02  4:01 UTC (permalink / raw)
  To: andersson, konrad.dybcio, jejb, martin.petersen
  Cc: linux-arm-msm, linux-scsi, linux-kernel, Manivannan Sadhasivam,
	Bart Van Assche

ufs_qcom_bw_table is not modified anywhere. So make it static const so that
it can be placed in read-only memory.

Reported-by: Bart Van Assche <bvanassche@acm.org>
Closes: https://lore.kernel.org/linux-scsi/43cd0057-c6d8-bc92-08f4-d767336d2cfe@acm.org/
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 drivers/ufs/host/ufs-qcom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
index 75a1fd295f34..0341c025e818 100644
--- a/drivers/ufs/host/ufs-qcom.c
+++ b/drivers/ufs/host/ufs-qcom.c
@@ -58,7 +58,7 @@ enum {
 	MODE_MAX,
 };
 
-struct __ufs_qcom_bw_table {
+static const struct __ufs_qcom_bw_table {
 	u32 mem_bw;
 	u32 cfg_bw;
 } ufs_qcom_bw_table[MODE_MAX + 1][QCOM_UFS_MAX_GEAR + 1][QCOM_UFS_MAX_LANE + 1] = {
-- 
2.25.1


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

end of thread, other threads:[~2023-08-21 22:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-02  4:01 [PATCH] scsi: ufs: qcom: Make struct ufs_qcom_bw_table static const Manivannan Sadhasivam
2023-08-02 15:56 ` Bart Van Assche
2023-08-08  1:13 ` Martin K. Petersen
2023-08-21 22:27 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox