All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phillip Potter <phil@philpotter.co.uk>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: alexander.sverdlin@nokia.com, andrew@lunn.ch,
	davem@davemloft.net, chris.packham@alliedtelesis.co.nz,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	joe@perches.com
Subject: Re: [PATCH v2] staging: octeon: convert all uses of strlcpy to strscpy in ethernet-mdio.c
Date: Sun, 7 Feb 2021 15:55:50 +0000	[thread overview]
Message-ID: <20210207155550.GA88784@kernelvm> (raw)
In-Reply-To: <YCAIqrpLLBxZh+47@kroah.com>

On Sun, Feb 07, 2021 at 04:35:06PM +0100, Greg KH wrote:
> On Sun, Feb 07, 2021 at 03:13:20PM +0000, Phillip Potter wrote:
> > Convert three calls to strlcpy inside the cvm_oct_get_drvinfo function
> > to strscpy calls. As return values were not checked for these three
> > calls before, change should be safe as functionality is equivalent.
> > 
> > Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
> > ---
> > 
> > v2: Modified changelog to take account of feedback from Greg KH.
> > 
> >  drivers/staging/octeon/ethernet-mdio.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/staging/octeon/ethernet-mdio.c b/drivers/staging/octeon/ethernet-mdio.c
> > index b0fd083a5bf2..b3049108edc4 100644
> > --- a/drivers/staging/octeon/ethernet-mdio.c
> > +++ b/drivers/staging/octeon/ethernet-mdio.c
> > @@ -21,9 +21,9 @@
> >  static void cvm_oct_get_drvinfo(struct net_device *dev,
> >  				struct ethtool_drvinfo *info)
> >  {
> > -	strlcpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
> > -	strlcpy(info->version, UTS_RELEASE, sizeof(info->version));
> > -	strlcpy(info->bus_info, "Builtin", sizeof(info->bus_info));
> > +	strscpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
> > +	strscpy(info->version, UTS_RELEASE, sizeof(info->version));
> > +	strscpy(info->bus_info, "Builtin", sizeof(info->bus_info));
> >  }
> >  
> >  static int cvm_oct_nway_reset(struct net_device *dev)
> 
> Sorry, this does not apply to my tree, someone already did this
> conversion before you :(
> 
> greg k-h

Thank you anyway, and thank you to you and Joe for your feedback, much
appreciated.

Regards,
Phil

  reply	other threads:[~2021-02-07 15:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-07 15:13 [PATCH v2] staging: octeon: convert all uses of strlcpy to strscpy in ethernet-mdio.c Phillip Potter
2021-02-07 15:35 ` Greg KH
2021-02-07 15:55   ` Phillip Potter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-02-07 15:03 Phillip Potter
2021-02-07 15:06 ` Greg KH

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=20210207155550.GA88784@kernelvm \
    --to=phil@philpotter.co.uk \
    --cc=alexander.sverdlin@nokia.com \
    --cc=andrew@lunn.ch \
    --cc=chris.packham@alliedtelesis.co.nz \
    --cc=davem@davemloft.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@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 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.