linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 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'
@ 2021-07-26 21:04 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-07-26 21:04 UTC (permalink / raw)
  To: Guangbin Huang; +Cc: clang-built-linux, kbuild-all, linux-kernel, Huazhong Tan

[-- Attachment #1: Type: text/plain, Size: 4995 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   ff1176468d368232b684f75e82563369208bc371
commit: cad7c215a4b1bc67920ab0d2673ac08a2cc885f1 net: hns3: refactor dump tm of debugfs
date:   10 weeks ago
config: powerpc64-randconfig-r034-20210727 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project c63dbd850182797bc4b76124d08e1c320ab2365d)
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 powerpc64 cross compiling tool for clang build
        # apt-get install binutils-powerpc64-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=powerpc64 

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 >>):

   In file included from drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:4:
   In file included from include/linux/device.h:15:
   In file included from include/linux/dev_printk.h:16:
   In file included from include/linux/ratelimit.h:6:
   In file included from include/linux/sched.h:14:
   In file included from include/linux/pid.h:5:
   In file included from include/linux/rculist.h:10:
   In file included from include/linux/list.h:9:
   In file included from include/linux/kernel.h:12:
   In file included from include/linux/bitops.h:32:
   In file included from arch/powerpc/include/asm/bitops.h:62:
   arch/powerpc/include/asm/barrier.h:49:9: warning: '__lwsync' macro redefined [-Wmacro-redefined]
   #define __lwsync()      __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory")
           ^
   <built-in>:310:9: note: previous definition is here
   #define __lwsync __builtin_ppc_lwsync
           ^
>> 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)
              ^
   2 warnings 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: 40837 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* 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'
@ 2021-08-21 21:37 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-08-21 21:37 UTC (permalink / raw)
  To: Guangbin Huang; +Cc: clang-built-linux, kbuild-all, linux-kernel, Huazhong Tan

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-21 21:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-26 21:04 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
2021-08-21 21:37 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).