lkml.org 
[lkml]   [2021]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectdrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:721:12: warning: stack frame size (1056) exceeds limit (1024) in function 'hclge_dbg_dump_tm_pg'
Hi Guangbin,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9ff50bf2f2ff5fab01cac26d8eed21a89308e6ef
commit: cad7c215a4b1bc67920ab0d2673ac08a2cc885f1 net: hns3: refactor dump tm of debugfs
date: 3 months ago
config: riscv-randconfig-r021-20210822 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 9e9d70591e72fc6762b4b9a226b68ed1307419bf)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cad7c215a4b1bc67920ab0d2673ac08a2cc885f1
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout cad7c215a4b1bc67920ab0d2673ac08a2cc885f1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:721:12: warning: stack frame size (1056) exceeds limit (1024) in function 'hclge_dbg_dump_tm_pg' [-Wframe-larger-than]
static int hclge_dbg_dump_tm_pg(struct hclge_dev *hdev, char *buf, int len)
^
1 warning generated.


vim +/hclge_dbg_dump_tm_pg +721 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c

720
> 721 static int hclge_dbg_dump_tm_pg(struct hclge_dev *hdev, char *buf, int len)
722 {
723 char data_str[ARRAY_SIZE(tm_pg_items)][HCLGE_DBG_DATA_STR_LEN];
724 struct hclge_tm_shaper_para c_shaper_para, p_shaper_para;
725 char *result[ARRAY_SIZE(tm_pg_items)], *sch_mode_str;
726 u8 pg_id, sch_mode, weight, pri_bit_map, i, j;
727 char content[HCLGE_DBG_TM_INFO_LEN];
728 int pos = 0;
729 int ret;
730
731 for (i = 0; i < ARRAY_SIZE(tm_pg_items); i++)
732 result[i] = &data_str[i][0];
733
734 hclge_dbg_fill_content(content, sizeof(content), tm_pg_items,
735 NULL, ARRAY_SIZE(tm_pg_items));
736 pos += scnprintf(buf + pos, len - pos, "%s", content);
737
738 for (pg_id = 0; pg_id < hdev->tm_info.num_pg; pg_id++) {
739 ret = hclge_tm_get_pg_to_pri_map(hdev, pg_id, &pri_bit_map);
740 if (ret)
741 return ret;
742
743 ret = hclge_tm_get_pg_sch_mode(hdev, pg_id, &sch_mode);
744 if (ret)
745 return ret;
746
747 ret = hclge_tm_get_pg_weight(hdev, pg_id, &weight);
748 if (ret)
749 return ret;
750
751 ret = hclge_tm_get_pg_shaper(hdev, pg_id,
752 HCLGE_OPC_TM_PG_C_SHAPPING,
753 &c_shaper_para);
754 if (ret)
755 return ret;
756
757 ret = hclge_tm_get_pg_shaper(hdev, pg_id,
758 HCLGE_OPC_TM_PG_P_SHAPPING,
759 &p_shaper_para);
760 if (ret)
761 return ret;
762
763 sch_mode_str = sch_mode & HCLGE_TM_TX_SCHD_DWRR_MSK ? "dwrr" :
764 "sp";
765
766 j = 0;
767 sprintf(result[j++], "%02u", pg_id);
768 sprintf(result[j++], "0x%02x", pri_bit_map);
769 sprintf(result[j++], "%4s", sch_mode_str);
770 sprintf(result[j++], "%3u", weight);
771 hclge_dbg_fill_shaper_content(&c_shaper_para, result, &j);
772 hclge_dbg_fill_shaper_content(&p_shaper_para, result, &j);
773
774 hclge_dbg_fill_content(content, sizeof(content), tm_pg_items,
775 (const char **)result,
776 ARRAY_SIZE(tm_pg_items));
777 pos += scnprintf(buf + pos, len - pos, "%s", content);
778 }
779
780 return 0;
781 }
782

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-08-21 23:38    [W:0.042 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site