[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210207155550.GA88784@kernelvm>
Date: Sun, 7 Feb 2021 15:55:50 +0000
From: Phillip Potter <phil@...lpotter.co.uk>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: alexander.sverdlin@...ia.com, andrew@...n.ch, davem@...emloft.net,
chris.packham@...iedtelesis.co.nz, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org, joe@...ches.com
Subject: Re: [PATCH v2] staging: octeon: convert all uses of strlcpy to
strscpy in ethernet-mdio.c
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@...lpotter.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
Powered by blists - more mailing lists