From: kernel test robot <lkp@intel.com>
To: Guangbin Huang <huangguangbin2@huawei.com>
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org,
Huazhong Tan <tanhuazhong@huawei.com>
Subject: 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'
Date: Sun, 22 Aug 2021 05:37:02 +0800 [thread overview]
Message-ID: <202108220555.AHJbJqoe-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4107 bytes --]
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
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 41349 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: 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'
Date: Sun, 22 Aug 2021 05:37:02 +0800 [thread overview]
Message-ID: <202108220555.AHJbJqoe-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4211 bytes --]
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(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 41349 bytes --]
next reply other threads:[~2021-08-21 21:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-21 21:37 kernel test robot [this message]
2021-08-21 21:37 ` 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' kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2021-07-26 21:04 kernel test robot
2021-07-26 21:04 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202108220555.AHJbJqoe-lkp@intel.com \
--to=lkp@intel.com \
--cc=clang-built-linux@googlegroups.com \
--cc=huangguangbin2@huawei.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tanhuazhong@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.