[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z7_Fm5jyyOwsG89W@gallifrey>
Date: Thu, 27 Feb 2025 01:53:31 +0000
From: "Dr. David Alan Gilbert" <linux@...blig.org>
To: bbrezillon@...nel.org, schalla@...vell.com
Cc: herbert@...dor.apana.org.au, davem@...emloft.net,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] crypto: octeontx2 - Remove unused
otx2_cpt_print_uc_dbg_info
Note: Arnaud's email address is bouncing:
A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:
arno@...isbad.org
all hosts for 'natisbad.org' have been failing for a long time (and retry time not reached)
* linux@...blig.org (linux@...blig.org) wrote:
> From: "Dr. David Alan Gilbert" <linux@...blig.org>
>
> otx2_cpt_print_uc_dbg_info() has been unused since 2023's
> commit 82f89f1aa6ca ("crypto: octeontx2 - add devlink option to set t106
> mode")
>
> Remove it and the get_engs_info() helper it's the only user of.
>
> Signed-off-by: Dr. David Alan Gilbert <linux@...blig.org>
> ---
> .../marvell/octeontx2/otx2_cptpf_ucode.c | 99 -------------------
> .../marvell/octeontx2/otx2_cptpf_ucode.h | 1 -
> 2 files changed, 100 deletions(-)
>
> diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c b/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c
> index 5c9484646172..0af34e0e46f2 100644
> --- a/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c
> +++ b/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c
> @@ -1774,102 +1774,3 @@ int otx2_cpt_dl_custom_egrp_delete(struct otx2_cptpf_dev *cptpf,
> dev_err(dev, "%s\n", err_msg);
> return -EINVAL;
> }
> -
> -static void get_engs_info(struct otx2_cpt_eng_grp_info *eng_grp, char *buf,
> - int size, int idx)
> -{
> - struct otx2_cpt_engs_rsvd *mirrored_engs = NULL;
> - struct otx2_cpt_engs_rsvd *engs;
> - int len, i;
> -
> - buf[0] = '\0';
> - for (i = 0; i < OTX2_CPT_MAX_ETYPES_PER_GRP; i++) {
> - engs = &eng_grp->engs[i];
> - if (!engs->type)
> - continue;
> - if (idx != -1 && idx != i)
> - continue;
> -
> - if (eng_grp->mirror.is_ena)
> - mirrored_engs = find_engines_by_type(
> - &eng_grp->g->grp[eng_grp->mirror.idx],
> - engs->type);
> - if (i > 0 && idx == -1) {
> - len = strlen(buf);
> - scnprintf(buf + len, size - len, ", ");
> - }
> -
> - len = strlen(buf);
> - scnprintf(buf + len, size - len, "%d %s ",
> - mirrored_engs ? engs->count + mirrored_engs->count :
> - engs->count,
> - get_eng_type_str(engs->type));
> - if (mirrored_engs) {
> - len = strlen(buf);
> - scnprintf(buf + len, size - len,
> - "(%d shared with engine_group%d) ",
> - engs->count <= 0 ?
> - engs->count + mirrored_engs->count :
> - mirrored_engs->count,
> - eng_grp->mirror.idx);
> - }
> - }
> -}
> -
> -void otx2_cpt_print_uc_dbg_info(struct otx2_cptpf_dev *cptpf)
> -{
> - struct otx2_cpt_eng_grps *eng_grps = &cptpf->eng_grps;
> - struct otx2_cpt_eng_grp_info *mirrored_grp;
> - char engs_info[2 * OTX2_CPT_NAME_LENGTH];
> - struct otx2_cpt_eng_grp_info *grp;
> - struct otx2_cpt_engs_rsvd *engs;
> - int i, j;
> -
> - pr_debug("Engine groups global info");
> - pr_debug("max SE %d, max IE %d, max AE %d", eng_grps->avail.max_se_cnt,
> - eng_grps->avail.max_ie_cnt, eng_grps->avail.max_ae_cnt);
> - pr_debug("free SE %d", eng_grps->avail.se_cnt);
> - pr_debug("free IE %d", eng_grps->avail.ie_cnt);
> - pr_debug("free AE %d", eng_grps->avail.ae_cnt);
> -
> - for (i = 0; i < OTX2_CPT_MAX_ENGINE_GROUPS; i++) {
> - grp = &eng_grps->grp[i];
> - pr_debug("engine_group%d, state %s", i,
> - grp->is_enabled ? "enabled" : "disabled");
> - if (grp->is_enabled) {
> - mirrored_grp = &eng_grps->grp[grp->mirror.idx];
> - pr_debug("Ucode0 filename %s, version %s",
> - grp->mirror.is_ena ?
> - mirrored_grp->ucode[0].filename :
> - grp->ucode[0].filename,
> - grp->mirror.is_ena ?
> - mirrored_grp->ucode[0].ver_str :
> - grp->ucode[0].ver_str);
> - if (is_2nd_ucode_used(grp))
> - pr_debug("Ucode1 filename %s, version %s",
> - grp->ucode[1].filename,
> - grp->ucode[1].ver_str);
> - }
> -
> - for (j = 0; j < OTX2_CPT_MAX_ETYPES_PER_GRP; j++) {
> - engs = &grp->engs[j];
> - if (engs->type) {
> - u32 mask[5] = { };
> -
> - get_engs_info(grp, engs_info,
> - 2 * OTX2_CPT_NAME_LENGTH, j);
> - pr_debug("Slot%d: %s", j, engs_info);
> - bitmap_to_arr32(mask, engs->bmap,
> - eng_grps->engs_num);
> - if (is_dev_otx2(cptpf->pdev))
> - pr_debug("Mask: %8.8x %8.8x %8.8x %8.8x",
> - mask[3], mask[2], mask[1],
> - mask[0]);
> - else
> - pr_debug("Mask: %8.8x %8.8x %8.8x %8.8x %8.8x",
> - mask[4], mask[3], mask[2], mask[1],
> - mask[0]);
> - }
> - }
> - }
> -}
> diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.h b/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.h
> index 365fe8943bd9..7e6a6a4ec37c 100644
> --- a/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.h
> +++ b/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.h
> @@ -166,7 +166,6 @@ int otx2_cpt_dl_custom_egrp_create(struct otx2_cptpf_dev *cptpf,
> struct devlink_param_gset_ctx *ctx);
> int otx2_cpt_dl_custom_egrp_delete(struct otx2_cptpf_dev *cptpf,
> struct devlink_param_gset_ctx *ctx);
> -void otx2_cpt_print_uc_dbg_info(struct otx2_cptpf_dev *cptpf);
> struct otx2_cpt_engs_rsvd *find_engines_by_type(
> struct otx2_cpt_eng_grp_info *eng_grp,
> int eng_type);
> --
> 2.48.1
>
--
-----Open up your eyes, open up your mind, open up your code -------
/ Dr. David Alan Gilbert | Running GNU/Linux | Happy \
\ dave @ treblig.org | | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/
Powered by blists - more mailing lists