mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Jijie Shao" <shaojijie@huawei.com>,
	"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>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>
Cc: "Hao Chen" <chenhao418@huawei.com>,
	Netdev <netdev@vger.kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: hns3: reduce stack usage in hclge_dbg_dump_tm_pri()
Date: Mon, 04 Dec 2023 09:52:58 +0100	[thread overview]
Message-ID: <dc1ba294-233a-4308-81df-23783487b817@app.fastmail.com> (raw)
In-Reply-To: <5402aa8a-a20f-4d28-bd36-3b88702ea6ae@huawei.com>

On Mon, Dec 4, 2023, at 09:31, Jijie Shao wrote:
> on 2023/12/4 15:29, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>>
>> @@ -981,7 +981,7 @@ static const struct hclge_dbg_item tm_pri_items[] = {
>>   
>>   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;
>>   	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];
>> @@ -991,9 +991,13 @@ static int hclge_dbg_dump_tm_pri(struct hclge_dev *hdev, char *buf, int len)
>>   	ret = hclge_tm_get_pri_num(hdev, &pri_num);
>>   	if (ret)
>>   		return ret;
>
> Thanks,
>   But it would be better if there is an empty line here.

ok

>
> all exception condition also need to free memory before return. eg:


Indeed, I'll send a v2 in a bit.

     Arnd

      reply	other threads:[~2023-12-04  8:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-04  7:29 Arnd Bergmann
2023-12-04  8:31 ` Jijie Shao
2023-12-04  8:52   ` Arnd Bergmann [this message]

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=dc1ba294-233a-4308-81df-23783487b817@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=chenhao418@huawei.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®