summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorYoussef Samir <quic_yabdulra@quicinc.com>2024-12-13 11:51:10 -0700
committerJeffrey Hugo <quic_jhugo@quicinc.com>2025-01-17 09:04:09 -0700
commit931a765c2d95c46cb818eccc641006c86697486f (patch)
tree98dfca5c2d3992e78fec7a6ce0800ef2716037a1 /drivers
parent713a341836942d2b3ea4463377cb8c8f7fc37a26 (diff)
downloadlwn-931a765c2d95c46cb818eccc641006c86697486f.tar.gz
lwn-931a765c2d95c46cb818eccc641006c86697486f.zip
accel/qaic: Change aic100_image_table definition
aic100_image_table is currently defined as a "const char *" array, this can potentially lead to the accidental modification of the pointers inside. Also, checkpatch.pl gives a warning about it. Change the type to a "const char * const" array to make the pointers immutable, preventing accidental modification of the images' paths. Signed-off-by: Youssef Samir <quic_yabdulra@quicinc.com> Reviewed-by: Carl Vanderlip <quic_carlv@quicinc.com> Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241213185110.2469159-1-quic_jhugo@quicinc.com
Diffstat (limited to 'drivers')
-rw-r--r--drivers/accel/qaic/sahara.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/accel/qaic/sahara.c b/drivers/accel/qaic/sahara.c
index 21d58aed0deb..09c8b055aa81 100644
--- a/drivers/accel/qaic/sahara.c
+++ b/drivers/accel/qaic/sahara.c
@@ -160,7 +160,7 @@ struct sahara_context {
struct work_struct fw_work;
struct work_struct dump_work;
struct mhi_device *mhi_dev;
- const char **image_table;
+ const char * const *image_table;
u32 table_size;
u32 active_image_id;
const struct firmware *firmware;
@@ -177,7 +177,7 @@ struct sahara_context {
bool is_mem_dump_mode;
};
-static const char *aic100_image_table[] = {
+static const char * const aic100_image_table[] = {
[1] = "qcom/aic100/fw1.bin",
[2] = "qcom/aic100/fw2.bin",
[4] = "qcom/aic100/fw4.bin",