From: Andrew Lunn <andrew@lunn.ch>
To: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: YueHaibing <yuehaibing@huawei.com>,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
netdev@vger.kernel.org, rasmus.villemoes@prevas.dk,
kuba@kernel.org, davem@davemloft.net, leoyang.li@nxp.com
Subject: Re: [PATCH net-next] ethernet: ucc_geth: Use kmemdup() rather than kmalloc+memcpy
Date: Sun, 23 May 2021 16:26:50 +0200 [thread overview]
Message-ID: <YKpmKln1Z/UvZgZQ@lunn.ch> (raw)
In-Reply-To: <20210523152937.Horde.5kC0kzvaP3No5BC63LlZ_A7@messagerie.c-s.fr>
On Sun, May 23, 2021 at 03:29:37PM +0200, Christophe Leroy wrote:
> YueHaibing <yuehaibing@huawei.com> a écrit :
>
> > Issue identified with Coccinelle.
> >
> > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> > ---
> > drivers/net/ethernet/freescale/ucc_geth.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/freescale/ucc_geth.c
> > b/drivers/net/ethernet/freescale/ucc_geth.c
> > index e0936510fa34..51206272cc25 100644
> > --- a/drivers/net/ethernet/freescale/ucc_geth.c
> > +++ b/drivers/net/ethernet/freescale/ucc_geth.c
> > @@ -3590,10 +3590,10 @@ static int ucc_geth_probe(struct
> > platform_device* ofdev)
> > if ((ucc_num < 0) || (ucc_num > 7))
> > return -ENODEV;
> >
> > - ug_info = kmalloc(sizeof(*ug_info), GFP_KERNEL);
> > + ug_info = kmemdup(&ugeth_primary_info, sizeof(*ug_info),
> > + GFP_KERNEL);
>
> Can you keep that as a single line ? The tolerance is 100 chars per line now.
Networking prefers 80. If it fits a single 80 char line, please use a single line.
Otherwise please leave it as it is.
Andrew
next prev parent reply other threads:[~2021-05-23 14:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-23 7:56 YueHaibing
2021-05-23 13:29 ` Christophe Leroy
2021-05-23 14:26 ` Andrew Lunn [this message]
2021-05-24 1:07 ` YueHaibing
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=YKpmKln1Z/UvZgZQ@lunn.ch \
--to=andrew@lunn.ch \
--cc=christophe.leroy@csgroup.eu \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=leoyang.li@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=netdev@vger.kernel.org \
--cc=rasmus.villemoes@prevas.dk \
--cc=yuehaibing@huawei.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
all inboxes | Powered by JetHome®