Re: [PATCH 2/2] crypto: hisilicon/zip - optimize the address offset of the reg query function

From: Herbert Xu
Date: Fri May 31 2024 - 05:35:26 EST


On Mon, May 06, 2024 at 07:59:53PM +0800, Chenghai Huang wrote:
>
> @@ -807,6 +786,18 @@ static int hisi_zip_regs_show(struct seq_file *s, void *unused)
>
> DEFINE_SHOW_ATTRIBUTE(hisi_zip_regs);
>
> +static void __iomem *get_zip_core_addr(struct hisi_qm *qm, int core_num)
> +{
> + u32 zip_comp_core_num = qm->cap_tables.dev_cap_table[ZIP_CLUSTER_COMP_NUM_CAP_IDX].cap_val;
> +
> + if (core_num < zip_comp_core_num)
> + return qm->io_base + HZIP_CORE_DFX_BASE +
> + (core_num + 1) * HZIP_CORE_ADDR_INTRVL;
> +
> + qm->io_base + HZIP_CORE_DFX_DECOMP_BASE +
> + (core_num - zip_comp_core_num) * HZIP_CORE_ADDR_INTRVL;
> +}
> +

This doesn't even build.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt