From: Jakub Kicinski <kuba@kernel.org>
To: Jijie Shao <shaojijie@huawei.com>
Cc: Arnd Bergmann <arnd@kernel.org>,
Yisen Zhuang <yisen.zhuang@huawei.com>,
Salil Mehta <salil.mehta@huawei.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Arnd Bergmann <arnd@arndb.de>,
Hao Chen <chenhao418@huawei.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] [v2] net: hns3: reduce stack usage in hclge_dbg_dump_tm_pri()
Date: Tue, 5 Dec 2023 19:23:46 -0800 [thread overview]
Message-ID: <20231205192346.4409ee16@kernel.org> (raw)
In-Reply-To: <7df7cfcb-d39b-4643-a378-a18b8d2b5b35@huawei.com>
On Mon, 4 Dec 2023 22:50:55 +0800 Jijie Shao wrote:
> > static int hclge_dbg_dump_tm_pri(struct hclge_dev *hdev, char *buf, int len)
> > {
> > - char data_str[ARRAY_SIZE(tm_pri_items)][HCLGE_DBG_DATA_STR_LEN];
> > + char *data_str;
>
> We want to define variables in an inverted triangle based on the code length.
> so, "char *data_str" should move four lines down.
>
> struct hclge_tm_shaper_para c_shaper_para, p_shaper_para;
> char *result[ARRAY_SIZE(tm_pri_items)], *sch_mode_str;
> char content[HCLGE_DBG_TM_INFO_LEN];
> u8 pri_num, sch_mode, weight, i, j;
> char *data_str;
> int pos, ret;
I took the liberty of fixing this when applying.
Don't want this to fall thru the cracks.
Applied to net-next now, thanks!
next prev parent reply other threads:[~2023-12-06 3:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-04 8:57 [PATCH] [v2] net: hns3: reduce stack usage in hclge_dbg_dump_tm_pri() Arnd Bergmann
2023-12-04 14:50 ` Jijie Shao
2023-12-06 3:23 ` Jakub Kicinski [this message]
2023-12-04 18:54 ` Christophe JAILLET
2023-12-04 20:06 ` Arnd Bergmann
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=20231205192346.4409ee16@kernel.org \
--to=kuba@kernel.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=chenhao418@huawei.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=salil.mehta@huawei.com \
--cc=shaojijie@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.