From: Stefan Wahren <stefan.wahren@i2se.com>
To: Woojung Huh <woojung.huh@microchip.com>
Cc: Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org,
Stefan Wahren <stefan.wahren@i2se.com>
Subject: [PATCH V2 2/4 next] net: lan78xx: Drop unnecessary strcpy in lan78xx_probe
Date: Tue, 4 Sep 2018 19:29:10 +0200 [thread overview]
Message-ID: <1536082152-3669-3-git-send-email-stefan.wahren@i2se.com> (raw)
In-Reply-To: <1536082152-3669-1-git-send-email-stefan.wahren@i2se.com>
There is no need for this strcpy because alloc_etherdev() already
does this job.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Raghuram Chary Jallipalli <raghuramchary.jallipalli@microchip.com>
---
drivers/net/usb/lan78xx.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index 3f70b94..3d505c2 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -3766,7 +3766,6 @@ static int lan78xx_probe(struct usb_interface *intf,
ret = lan78xx_bind(dev, intf);
if (ret < 0)
goto out2;
- strcpy(netdev->name, "eth%d");
if (netdev->mtu > (dev->hard_mtu - netdev->hard_header_len))
netdev->mtu = dev->hard_mtu - netdev->hard_header_len;
--
2.7.4
next prev parent reply other threads:[~2018-09-04 17:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-04 17:29 [PATCH V2 0/4 next] net: lan78xx: Minor improvements Stefan Wahren
2018-09-04 17:29 ` [PATCH V2 1/4 next] net: lan78xx: Bail out if lan78xx_get_endpoints fails Stefan Wahren
2018-09-04 17:29 ` Stefan Wahren [this message]
2018-09-04 17:29 ` [PATCH V2 3/4 next] net: lan78xx: Switch to SPDX identifier Stefan Wahren
2018-09-04 17:29 ` [PATCH V2 4/4 next] net: lan78xx: Make declaration style consistent Stefan Wahren
2018-09-06 5:20 ` [PATCH V2 0/4 next] net: lan78xx: Minor improvements David Miller
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=1536082152-3669-3-git-send-email-stefan.wahren@i2se.com \
--to=stefan.wahren@i2se.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=woojung.huh@microchip.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).