linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Guangbin Huang <huangguangbin2@huawei.com>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	Linux Memory Management List <linux-mm@kvack.org>,
	Huazhong Tan <tanhuazhong@huawei.com>
Subject: [linux-next:master 3282/7430] drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:721:12: warning: stack frame size of 1040 bytes in function 'hclge_dbg_dump_tm_pg'
Date: Mon, 7 Jun 2021 17:13:52 +0800	[thread overview]
Message-ID: <202106071743.qQW4lHf0-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   ccc252d2e818f6a479441119ad453c3ce7c7c461
commit: cad7c215a4b1bc67920ab0d2673ac08a2cc885f1 [3282/7430] net: hns3: refactor dump tm of debugfs
config: powerpc-randconfig-r036-20210607 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project ae973380c5f6be77ce395022be40350942260be9)
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 powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=cad7c215a4b1bc67920ab0d2673ac08a2cc885f1
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout cad7c215a4b1bc67920ab0d2673ac08a2cc885f1
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc 

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>:309: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 of 1040 bytes 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: 42759 bytes --]

                 reply	other threads:[~2021-06-07  9:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202106071743.qQW4lHf0-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-mm@kvack.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox