Message ID | 1621477304-4495-1-git-send-email-tanhuazhong@huawei.com |
---|---|
Headers | show |
Series | net: hns3: refactor some debugfs commands | expand |
On Thu, May 20, 2021 at 4:22 AM Huazhong Tan <tanhuazhong@huawei.com> wrote: > static int hclge_dbg_dump_tm_qset(struct hclge_dev *hdev, char *buf, int len) > { > + char data_str[ARRAY_SIZE(tm_qset_items)][HCLGE_DBG_DATA_STR_LEN]; > + char *result[ARRAY_SIZE(tm_qset_items)], *sch_mode_str; > u8 priority, link_vld, sch_mode, weight; > - char *sch_mode_str; > + struct hclge_tm_shaper_para shaper_para; > + char content[HCLGE_DBG_TM_INFO_LEN]; > + u16 qset_num, i; > int ret, pos; > - u16 qset_num; > - u16 i; > + u8 j; These variables are too large to put on the stack of a function, as pointed out by this compiler warning: drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c: In function 'hclge_dbg_dump_tm_pg': drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:782:1: error: the frame size of 1416 bytes is larger than 1400 bytes [-Werror=frame-larger-than=] I couldn't find an obvious way to fix it. Using kmalloc to dynamically allocate them would work, but it's probably better to use a seq_file here and change the loop to multiple calls. Arnd