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
Subject: Re: [PATCH net-next 2/2] bnxt_en: Fix W=stringop-overflow warning in bnxt_dcb.c
Date: Tue, 8 Aug 2023 05:18:10 -0600 [thread overview]
Message-ID: <ZNIkcmR10HlELEqp@work> (raw)
In-Reply-To: <20230807145720.159645-3-michael.chan@broadcom.com>
On Mon, Aug 07, 2023 at 07:57:20AM -0700, Michael Chan wrote:
> Fix the following warning:
>
> drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c: In function ‘bnxt_hwrm_queue_cos2bw_cfg’:
> cc1: error: writing 12 bytes into a region of size 1 [-Werror=stringop-overflow ]
> In file included from drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c:19:
> drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h:6045:17: note: destination object ‘unused_0’ of size 1
> 6045 | u8 unused_0;
>
> Fix it by modifying struct hwrm_queue_cos2bw_cfg_input to use an array
> of sub struct similar to the previous patch. This will eliminate the
> pointer arithmetc to calculate the destination pointer passed to
> memcpy().
Thanks for fixing this. :)
>
> Link: https://lore.kernel.org/netdev/CACKFLinikvXmKcxr4kjWO9TPYxTd2cb5agT1j=w9Qyj5-24s5A@mail.gmail.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:17 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
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 [this message]
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=ZNIkcmR10HlELEqp@work \
--to=gustavoars@kernel.org \
--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 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).