All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Huazhong Tan <tanhuazhong@huawei.com>
Cc: David Miller <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Networking <netdev@vger.kernel.org>,
	Salil Mehta <salil.mehta@huawei.com>,
	yisen.zhuang@huawei.com, huangdaode@huawei.com,
	Linuxarm <linuxarm@huawei.com>,
	Guangbin Huang <huangguangbin2@huawei.com>
Subject: Re: [PATCH net-next 12/15] net: hns3: refactor dump qs shaper of debugfs
Date: Fri, 23 Jul 2021 21:56:25 +0200	[thread overview]
Message-ID: <CAK8P3a3GygY5_AauiY51ahyCyaurjj1UAfPJnYFiok7x5TCjfg@mail.gmail.com> (raw)
In-Reply-To: <1621477304-4495-13-git-send-email-tanhuazhong@huawei.com>

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

  reply	other threads:[~2021-07-23 19:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-20  2:21 [PATCH net-next 00/15] net: hns3: refactor some debugfs commands Huazhong Tan
2021-05-20  2:21 ` [PATCH net-next 01/15] net: hns3: refactor dump reg of debugfs Huazhong Tan
2021-05-20  2:21 ` [PATCH net-next 02/15] net: hns3: refactor dump reg dcb info " Huazhong Tan
2021-05-20  2:21 ` [PATCH net-next 03/15] net: hns3: refactor queue map " Huazhong Tan
2021-05-20  2:21 ` [PATCH net-next 04/15] net: hns3: refactor queue info " Huazhong Tan
2021-05-20  2:21 ` [PATCH net-next 05/15] net: hns3: refactor dump fd tcam " Huazhong Tan
2021-05-20  2:21 ` [PATCH net-next 06/15] net: hns3: refactor dump tm map " Huazhong Tan
2021-05-20  2:21 ` [PATCH net-next 07/15] net: hns3: refactor dump tm " Huazhong Tan
2021-05-20  2:21 ` [PATCH net-next 08/15] net: hns3: refactor dump tc " Huazhong Tan
2021-05-20  2:21 ` [PATCH net-next 09/15] net: hns3: refactor dump qos pause cfg " Huazhong Tan
2021-05-20  2:21 ` [PATCH net-next 10/15] net: hns3: refactor dump qos pri map " Huazhong Tan
2021-05-20  2:21 ` [PATCH net-next 11/15] net: hns3: refactor dump qos buf cfg " Huazhong Tan
2021-05-20  2:21 ` [PATCH net-next 12/15] net: hns3: refactor dump qs shaper " Huazhong Tan
2021-07-23 19:56   ` Arnd Bergmann [this message]
2021-05-20  2:21 ` [PATCH net-next 13/15] net: hns3: refactor dump mac tnl status " Huazhong Tan
2021-05-20  2:21 ` [PATCH net-next 14/15] net: hns3: refactor dump serv info " Huazhong Tan
2021-05-20  2:21 ` [PATCH net-next 15/15] net: hns3: remove the useless debugfs file node cmd Huazhong Tan

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=CAK8P3a3GygY5_AauiY51ahyCyaurjj1UAfPJnYFiok7x5TCjfg@mail.gmail.com \
    --to=arnd@kernel.org \
    --cc=davem@davemloft.net \
    --cc=huangdaode@huawei.com \
    --cc=huangguangbin2@huawei.com \
    --cc=kuba@kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=salil.mehta@huawei.com \
    --cc=tanhuazhong@huawei.com \
    --cc=yisen.zhuang@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.