netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Jiawen Wu <jiawenwu@trustnetic.com>,
	netdev@vger.kernel.org,  davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, andrew@lunn.ch
Cc: mengyuanlou@net-swift.com
Subject: Re: [PATCH net-next 1/3] net: libwx: support hardware statistics
Date: Tue, 19 Sep 2023 12:08:15 +0200	[thread overview]
Message-ID: <ad8d1b2aaea245f2c21548b7ee485fbd8c57b0fb.camel@redhat.com> (raw)
In-Reply-To: <20230918072108.809020-2-jiawenwu@trustnetic.com>

On Mon, 2023-09-18 at 15:21 +0800, Jiawen Wu wrote:
> +void wx_get_strings(struct net_device *netdev, u32 stringset, u8 *data)
> +{
> +	struct wx *wx = netdev_priv(netdev);
> +	char *p = (char *)data;
> +	int i;
> +
> +	switch (stringset) {
> +	case ETH_SS_TEST:
> +		memcpy(data, *wx_gstrings_test,
> +		       WX_TEST_LEN * ETH_GSTRING_LEN);

It looks like fortify source/clang is not happy about the above line
I'm not sure of the exact curprit as the warning output lacks a
specific indication.

In any case the above syntax is a bit confusing, '*wx_gstrings_test' vs
'wx_gstrings_test' and  WX_TEST_LEN not using ARRAY_SIZE.

Please clean-up the above and try to avoid the mentioned warning.

Cheers,

Paolo


  parent reply	other threads:[~2023-09-19 10:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-18  7:21 [PATCH net-next 0/3] Wangxun ethtool stats Jiawen Wu
2023-09-18  7:21 ` [PATCH net-next 1/3] net: libwx: support hardware statistics Jiawen Wu
2023-09-18 15:23   ` Stephen Hemminger
2023-09-20  7:27     ` Jiawen Wu
2023-09-19 10:08   ` Paolo Abeni [this message]
2023-09-18  7:21 ` [PATCH net-next 2/3] net: txgbe: add ethtool stats support Jiawen Wu
2023-09-18  7:21 ` [PATCH net-next 3/3] net: ngbe: " Jiawen Wu

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=ad8d1b2aaea245f2c21548b7ee485fbd8c57b0fb.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jiawenwu@trustnetic.com \
    --cc=kuba@kernel.org \
    --cc=mengyuanlou@net-swift.com \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).