[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230911-topic-mars-v2-7-3dac84b88c4b@linaro.org>
Date: Fri, 09 Feb 2024 22:09:51 +0100
From: Konrad Dybcio <konrad.dybcio@...aro.org>
To: Stanimir Varbanov <stanimir.k.varbanov@...il.com>,
Vikash Garodia <quic_vgarodia@...cinc.com>,
Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
Andy Gross <agross@...nel.org>, Bjorn Andersson <andersson@...nel.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Dikshita Agarwal <quic_dikshita@...cinc.com>,
Philipp Zabel <p.zabel@...gutronix.de>
Cc: Marijn Suijten <marijn.suijten@...ainline.org>,
Stanimir Varbanov <stanimir.varbanov@...aro.org>,
Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
linux-media@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org, Konrad Dybcio <konrad.dybcio@...aro.org>
Subject: [PATCH v2 07/20] media: venus: core: Constify all members of the
resource struct
Nothing inside the resource struct needs to be mutable. Sprinkle
'const' all over it. A lot of 'const'.
Signed-off-by: Konrad Dybcio <konrad.dybcio@...aro.org>
---
drivers/media/platform/qcom/venus/core.h | 58 ++++++++++++++++----------------
1 file changed, 29 insertions(+), 29 deletions(-)
diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h
index 6a77de374454..6b1887f7d9cb 100644
--- a/drivers/media/platform/qcom/venus/core.h
+++ b/drivers/media/platform/qcom/venus/core.h
@@ -56,39 +56,39 @@ enum vpu_version {
};
struct venus_resources {
- u64 dma_mask;
- const struct freq_tbl *freq_tbl;
- unsigned int freq_tbl_size;
- const struct bw_tbl *bw_tbl_enc;
- unsigned int bw_tbl_enc_size;
- const struct bw_tbl *bw_tbl_dec;
- unsigned int bw_tbl_dec_size;
- const struct reg_val *reg_tbl;
- unsigned int reg_tbl_size;
- const struct hfi_ubwc_config *ubwc_conf;
+ const u64 dma_mask;
+ const struct freq_tbl * const freq_tbl;
+ const unsigned int freq_tbl_size;
+ const struct bw_tbl * const bw_tbl_enc;
+ const unsigned int bw_tbl_enc_size;
+ const struct bw_tbl * const bw_tbl_dec;
+ const unsigned int bw_tbl_dec_size;
+ const struct reg_val * const reg_tbl;
+ const unsigned int reg_tbl_size;
+ const struct hfi_ubwc_config * const ubwc_conf;
const char * const clks[VIDC_CLKS_NUM_MAX];
- unsigned int clks_num;
+ const unsigned int clks_num;
const char * const vcodec0_clks[VIDC_VCODEC_CLKS_NUM_MAX];
const char * const vcodec1_clks[VIDC_VCODEC_CLKS_NUM_MAX];
- unsigned int vcodec_clks_num;
- const char **vcodec_pmdomains;
- unsigned int vcodec_pmdomains_num;
- const char **opp_pmdomain;
- unsigned int vcodec_num;
+ const unsigned int vcodec_clks_num;
+ const char * const *vcodec_pmdomains;
+ const unsigned int vcodec_pmdomains_num;
+ const char * const * const opp_pmdomain;
+ const unsigned int vcodec_num;
const char * const resets[VIDC_RESETS_NUM_MAX];
- unsigned int resets_num;
- enum hfi_version hfi_version;
- enum vpu_version vpu_version;
- u8 num_vpp_pipes;
- u32 max_load;
- unsigned int vmem_id;
- u32 vmem_size;
- u32 vmem_addr;
- u32 cp_start;
- u32 cp_size;
- u32 cp_nonpixel_start;
- u32 cp_nonpixel_size;
- const char *fwname;
+ const unsigned int resets_num;
+ const enum hfi_version hfi_version;
+ const enum vpu_version vpu_version;
+ const u8 num_vpp_pipes;
+ const u32 max_load;
+ const unsigned int vmem_id;
+ const u32 vmem_size;
+ const u32 vmem_addr;
+ const u32 cp_start;
+ const u32 cp_size;
+ const u32 cp_nonpixel_start;
+ const u32 cp_nonpixel_size;
+ const char * const fwname;
};
enum venus_fmt {
--
2.43.0
Powered by blists - more mailing lists