[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230911-topic-mars-v1-8-a7d38bf87bdb@linaro.org>
Date: Mon, 11 Sep 2023 17:10:22 +0200
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 RFT 08/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 | 56 ++++++++++++++++----------------
1 file changed, 28 insertions(+), 28 deletions(-)
diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h
index 515e7d78b7ab..9a38d568117a 100644
--- a/drivers/media/platform/qcom/venus/core.h
+++ b/drivers/media/platform/qcom/venus/core.h
@@ -57,39 +57,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 unsigned int vcodec_clks_num;
const char * const vcodec_pmdomains[VIDC_PMDOMAINS_NUM_MAX];
- unsigned int vcodec_pmdomains_num;
- const char **opp_pmdomain;
- unsigned int vcodec_num;
+ 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.42.0
Powered by blists - more mailing lists