Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: octeontx2 - Remove unused otx2_cpt_print_uc_dbg_info

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@treblig.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Dr. David Alan Gilbert and committed by
Herbert Xu
1b5da8b2 48a1bfc2

-100
-99
drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c
··· 1775 1775 dev_err(dev, "%s\n", err_msg); 1776 1776 return -EINVAL; 1777 1777 } 1778 - 1779 - static void get_engs_info(struct otx2_cpt_eng_grp_info *eng_grp, char *buf, 1780 - int size, int idx) 1781 - { 1782 - struct otx2_cpt_engs_rsvd *mirrored_engs = NULL; 1783 - struct otx2_cpt_engs_rsvd *engs; 1784 - int len, i; 1785 - 1786 - buf[0] = '\0'; 1787 - for (i = 0; i < OTX2_CPT_MAX_ETYPES_PER_GRP; i++) { 1788 - engs = &eng_grp->engs[i]; 1789 - if (!engs->type) 1790 - continue; 1791 - if (idx != -1 && idx != i) 1792 - continue; 1793 - 1794 - if (eng_grp->mirror.is_ena) 1795 - mirrored_engs = find_engines_by_type( 1796 - &eng_grp->g->grp[eng_grp->mirror.idx], 1797 - engs->type); 1798 - if (i > 0 && idx == -1) { 1799 - len = strlen(buf); 1800 - scnprintf(buf + len, size - len, ", "); 1801 - } 1802 - 1803 - len = strlen(buf); 1804 - scnprintf(buf + len, size - len, "%d %s ", 1805 - mirrored_engs ? engs->count + mirrored_engs->count : 1806 - engs->count, 1807 - get_eng_type_str(engs->type)); 1808 - if (mirrored_engs) { 1809 - len = strlen(buf); 1810 - scnprintf(buf + len, size - len, 1811 - "(%d shared with engine_group%d) ", 1812 - engs->count <= 0 ? 1813 - engs->count + mirrored_engs->count : 1814 - mirrored_engs->count, 1815 - eng_grp->mirror.idx); 1816 - } 1817 - } 1818 - } 1819 - 1820 - void otx2_cpt_print_uc_dbg_info(struct otx2_cptpf_dev *cptpf) 1821 - { 1822 - struct otx2_cpt_eng_grps *eng_grps = &cptpf->eng_grps; 1823 - struct otx2_cpt_eng_grp_info *mirrored_grp; 1824 - char engs_info[2 * OTX2_CPT_NAME_LENGTH]; 1825 - struct otx2_cpt_eng_grp_info *grp; 1826 - struct otx2_cpt_engs_rsvd *engs; 1827 - int i, j; 1828 - 1829 - pr_debug("Engine groups global info"); 1830 - pr_debug("max SE %d, max IE %d, max AE %d", eng_grps->avail.max_se_cnt, 1831 - eng_grps->avail.max_ie_cnt, eng_grps->avail.max_ae_cnt); 1832 - pr_debug("free SE %d", eng_grps->avail.se_cnt); 1833 - pr_debug("free IE %d", eng_grps->avail.ie_cnt); 1834 - pr_debug("free AE %d", eng_grps->avail.ae_cnt); 1835 - 1836 - for (i = 0; i < OTX2_CPT_MAX_ENGINE_GROUPS; i++) { 1837 - grp = &eng_grps->grp[i]; 1838 - pr_debug("engine_group%d, state %s", i, 1839 - str_enabled_disabled(grp->is_enabled)); 1840 - if (grp->is_enabled) { 1841 - mirrored_grp = &eng_grps->grp[grp->mirror.idx]; 1842 - pr_debug("Ucode0 filename %s, version %s", 1843 - grp->mirror.is_ena ? 1844 - mirrored_grp->ucode[0].filename : 1845 - grp->ucode[0].filename, 1846 - grp->mirror.is_ena ? 1847 - mirrored_grp->ucode[0].ver_str : 1848 - grp->ucode[0].ver_str); 1849 - if (is_2nd_ucode_used(grp)) 1850 - pr_debug("Ucode1 filename %s, version %s", 1851 - grp->ucode[1].filename, 1852 - grp->ucode[1].ver_str); 1853 - } 1854 - 1855 - for (j = 0; j < OTX2_CPT_MAX_ETYPES_PER_GRP; j++) { 1856 - engs = &grp->engs[j]; 1857 - if (engs->type) { 1858 - u32 mask[5] = { }; 1859 - 1860 - get_engs_info(grp, engs_info, 1861 - 2 * OTX2_CPT_NAME_LENGTH, j); 1862 - pr_debug("Slot%d: %s", j, engs_info); 1863 - bitmap_to_arr32(mask, engs->bmap, 1864 - eng_grps->engs_num); 1865 - if (is_dev_otx2(cptpf->pdev)) 1866 - pr_debug("Mask: %8.8x %8.8x %8.8x %8.8x", 1867 - mask[3], mask[2], mask[1], 1868 - mask[0]); 1869 - else 1870 - pr_debug("Mask: %8.8x %8.8x %8.8x %8.8x %8.8x", 1871 - mask[4], mask[3], mask[2], mask[1], 1872 - mask[0]); 1873 - } 1874 - } 1875 - } 1876 - }
-1
drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.h
··· 166 166 struct devlink_param_gset_ctx *ctx); 167 167 int otx2_cpt_dl_custom_egrp_delete(struct otx2_cptpf_dev *cptpf, 168 168 struct devlink_param_gset_ctx *ctx); 169 - void otx2_cpt_print_uc_dbg_info(struct otx2_cptpf_dev *cptpf); 170 169 struct otx2_cpt_engs_rsvd *find_engines_by_type( 171 170 struct otx2_cpt_eng_grp_info *eng_grp, 172 171 int eng_type);