From: Jakub Kicinski <kuba@kernel.org>
To: Fan Gong <gongfan1@huawei.com>
Cc: Zhu Yikai <zhuyikai1@h-partners.com>, <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Markus Elfring <Markus.Elfring@web.de>,
Pavan Chebbi <pavan.chebbi@broadcom.com>,
ALOK TIWARI <alok.a.tiwari@oracle.com>,
<linux-kernel@vger.kernel.org>, <linux-doc@vger.kernel.org>,
luosifu <luosifu@huawei.com>, Xin Guo <guoxin09@huawei.com>,
Zhou Shuai <zhoushuai28@huawei.com>, Wu Like <wulike1@huawei.com>,
Shi Jing <shijing34@huawei.com>,
Luo Yang <luoyang82@h-partners.com>
Subject: Re: [PATCH net-next v10 2/9] hinic3: Add PF management interfaces
Date: Fri, 9 Jan 2026 06:23:42 -0800 [thread overview]
Message-ID: <20260109062342.2a6b1c89@kernel.org> (raw)
In-Reply-To: <add09d6f61ba86bd9c3c37fe3845b25291a26bdf.1767861236.git.zhuyikai1@h-partners.com>
On Fri, 9 Jan 2026 10:35:52 +0800 Fan Gong wrote:
> +static void hinic3_init_mgmt_msg_work(struct hinic3_msg_pf_to_mgmt *pf_to_mgmt,
> + struct hinic3_recv_msg *recv_msg)
> +{
> + struct mgmt_msg_handle_work *mgmt_work;
> +
> + mgmt_work = kmalloc(sizeof(*mgmt_work), GFP_KERNEL);
> + if (!mgmt_work)
> + return;
> +
> + if (recv_msg->msg_len) {
> + mgmt_work->msg = kmalloc(recv_msg->msg_len, GFP_KERNEL);
> + if (!mgmt_work->msg) {
> + kfree(mgmt_work);
> + return;
> + }
> + memcpy(mgmt_work->msg, recv_msg->msg, recv_msg->msg_len);
coccicheck says:
drivers/net/ethernet/huawei/hinic3/hinic3_mgmt.c:128:19-26: WARNING opportunity for kmemdup
--
pw-bot: cr
next prev parent reply other threads:[~2026-01-09 14:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-09 2:35 [PATCH net-next v10 0/9] net: hinic3: PF initialization Fan Gong
2026-01-09 2:35 ` [PATCH net-next v10 1/9] hinic3: Add PF framework Fan Gong
2026-01-09 2:35 ` [PATCH net-next v10 2/9] hinic3: Add PF management interfaces Fan Gong
2026-01-09 14:23 ` Jakub Kicinski [this message]
2026-01-09 2:35 ` [PATCH net-next v10 3/9] hinic3: Add .ndo_tx_timeout and .ndo_get_stats64 Fan Gong
2026-01-09 2:35 ` [PATCH net-next v10 4/9] hinic3: Add .ndo_set_features and .ndo_fix_features Fan Gong
2026-01-09 2:35 ` [PATCH net-next v10 5/9] hinic3: Add .ndo_features_check Fan Gong
2026-01-09 2:35 ` [PATCH net-next v10 6/9] hinic3: Add .ndo_vlan_rx_add/kill_vid and .ndo_validate_addr Fan Gong
2026-01-09 2:35 ` [PATCH net-next v10 7/9] hinic3: Add adaptive IRQ coalescing with DIM Fan Gong
2026-01-09 2:35 ` [PATCH net-next v10 8/9] hinic3: Add mac filter ops Fan Gong
2026-01-09 2:35 ` [PATCH net-next v10 9/9] hinic3: Add HW event handler Fan Gong
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=20260109062342.2a6b1c89@kernel.org \
--to=kuba@kernel.org \
--cc=Markus.Elfring@web.de \
--cc=alok.a.tiwari@oracle.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gongfan1@huawei.com \
--cc=guoxin09@huawei.com \
--cc=horms@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luosifu@huawei.com \
--cc=luoyang82@h-partners.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavan.chebbi@broadcom.com \
--cc=shijing34@huawei.com \
--cc=wulike1@huawei.com \
--cc=zhoushuai28@huawei.com \
--cc=zhuyikai1@h-partners.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