From: "Gustavo A. R. Silva" <gustavoars@kernel.org>
To: Michael Chan <michael.chan@broadcom.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, gospo@broadcom.com,
gustavo@embeddedor.com,
Andy Gospodarek <andrew.gospodarek@broadcom.com>
Subject: Re: [PATCH net-next 1/2] bnxt_en: Fix W=1 warning in bnxt_dcb.c from fortify memcpy()
Date: Tue, 8 Aug 2023 05:16:58 -0600 [thread overview]
Message-ID: <ZNIkKpWh8NnIyzJ7@work> (raw)
In-Reply-To: <20230807145720.159645-2-michael.chan@broadcom.com>
On Mon, Aug 07, 2023 at 07:57:19AM -0700, Michael Chan wrote:
> Fix the following warning:
>
> inlined from ‘bnxt_hwrm_queue_cos2bw_qcfg’ at drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c:165:3,
> ./include/linux/fortify-string.h:592:4: error: call to ‘__read_overflow2_field’ declared with attribute warning: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Werror]
> __read_overflow2_field(q_size_field, size);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Modify the FW interface defintion of struct hwrm_queue_cos2bw_qcfg_output
> to use an array of sub struct for the queue1 to queue7 fields. Note that
> the layout of the queue0 fields are different and these are not part of
> the array. This makes the code much cleaner by removing the pointer
> arithmetic for memcpy().
Thanks for fixing this. :)
>
> Link: https://lore.kernel.org/netdev/20230727190726.1859515-2-kuba@kernel.org/
> Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
> Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
--
Gustavo
next prev parent reply other threads:[~2023-08-08 11:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-07 14:57 [PATCH net-next 0/2] bnxt_en: Fix 2 compile warnings in bnxt_dcb.c Michael Chan
2023-08-07 14:57 ` [PATCH net-next 1/2] bnxt_en: Fix W=1 warning in bnxt_dcb.c from fortify memcpy() Michael Chan
2023-08-08 11:16 ` Gustavo A. R. Silva [this message]
2023-08-07 14:57 ` [PATCH net-next 2/2] bnxt_en: Fix W=stringop-overflow warning in bnxt_dcb.c Michael Chan
2023-08-08 11:18 ` Gustavo A. R. Silva
2023-08-08 22:10 ` [PATCH net-next 0/2] bnxt_en: Fix 2 compile warnings " patchwork-bot+netdevbpf
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=ZNIkKpWh8NnIyzJ7@work \
--to=gustavoars@kernel.org \
--cc=andrew.gospodarek@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gospo@broadcom.com \
--cc=gustavo@embeddedor.com \
--cc=kuba@kernel.org \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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.