netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: ShiHao <i.shihao.999@gmail.com>
To: David Laight <david.laight.linux@gmail.com>
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	i.shihao.999@gmail.com, kuba@kernel.org,
	linux-kernel@vger.kernel.org, mchan@broadcom.com,
	netdev@vger.kernel.org, pabeni@redhat.com,
	pavan.chebbi@broadcom.com
Subject: Re: [PATCH] net: ethernet: broadcom: replace strcpy with strscpy
Date: Fri, 14 Nov 2025 14:37:20 +0530	[thread overview]
Message-ID: <aRbxSCXsWCar8tw8@fedora> (raw)
In-Reply-To: <20251113192218.3c17dabc@pumpkin>

On Thu, Nov 13, 2025 at 07:22:18PM +0000, David Laight wrote:

> No one really knows that TG3_BPN_SIZE is in any way related to the destination.
> So this doesn't actually make the code that much better at all.
>
> Since tp->board_part_number is an array and "BCM5717" a constant I suspect
> there is already a compile-time check that the string fits.
> The strcpy() will also be converted to a memcpy().
>
> So all, in all, this makes the code worse on several fronts.
>
> 	Davidi


Okay. I got it thanks for your time david.

      reply	other threads:[~2025-11-14  9:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-13  8:25 [PATCH] net: ethernet: broadcom: replace strcpy with strscpy Shi Hao
2025-11-13 19:22 ` David Laight
2025-11-14  9:07   ` ShiHao [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=aRbxSCXsWCar8tw8@fedora \
    --to=i.shihao.999@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=david.laight.linux@gmail.com \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pavan.chebbi@broadcom.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).