* [PATCH] staging: slicoss: Fix coding style issue
@ 2014-06-13 15:52 Benedict Boerger
2014-06-13 17:04 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Benedict Boerger @ 2014-06-13 15:52 UTC (permalink / raw)
To: linux-kernel
Cc: gregkh, matlackdavid, liodot, charrer, peter.p.waskiewicz.jr,
devel, Benedict Boerger
Fix a coding style issue found by checkpatch.pl.
Use ether_addr_copy instead of memcpy.
Done to complete a eudyptula task.
Signed-off-by: Benedict Boerger <benedict.boerger@cs.tu-dortmund.de>
---
drivers/staging/slicoss/slicoss.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
index 48841e7..02807a3 100644
--- a/drivers/staging/slicoss/slicoss.c
+++ b/drivers/staging/slicoss/slicoss.c
@@ -1790,7 +1790,7 @@ static int slic_mcast_add_list(struct adapter *adapter, char *address)
if (mcaddr == NULL)
return 1;
- memcpy(mcaddr->address, address, ETH_ALEN);
+ ether_addr_copy(mcaddr->address, address);
mcaddr->next = adapter->mcastaddrs;
adapter->mcastaddrs = mcaddr;
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: slicoss: Fix coding style issue
2014-06-13 15:52 [PATCH] staging: slicoss: Fix coding style issue Benedict Boerger
@ 2014-06-13 17:04 ` Greg KH
2014-06-16 8:13 ` Dan Carpenter
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2014-06-13 17:04 UTC (permalink / raw)
To: Benedict Boerger
Cc: linux-kernel, matlackdavid, liodot, charrer,
peter.p.waskiewicz.jr, devel
On Fri, Jun 13, 2014 at 05:52:33PM +0200, Benedict Boerger wrote:
> Fix a coding style issue found by checkpatch.pl.
> Use ether_addr_copy instead of memcpy.
>
> Done to complete a eudyptula task.
>
> Signed-off-by: Benedict Boerger <benedict.boerger@cs.tu-dortmund.de>
>
> ---
> drivers/staging/slicoss/slicoss.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
> index 48841e7..02807a3 100644
> --- a/drivers/staging/slicoss/slicoss.c
> +++ b/drivers/staging/slicoss/slicoss.c
> @@ -1790,7 +1790,7 @@ static int slic_mcast_add_list(struct adapter *adapter, char *address)
> if (mcaddr == NULL)
> return 1;
>
> - memcpy(mcaddr->address, address, ETH_ALEN);
> + ether_addr_copy(mcaddr->address, address);
>
> mcaddr->next = adapter->mcastaddrs;
> adapter->mcastaddrs = mcaddr;
Are you sure this is correct? It's not always a one-to-one replacement
from what I have been told.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: slicoss: Fix coding style issue
2014-06-13 17:04 ` Greg KH
@ 2014-06-16 8:13 ` Dan Carpenter
0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2014-06-16 8:13 UTC (permalink / raw)
To: Greg KH
Cc: Benedict Boerger, matlackdavid, devel, peter.p.waskiewicz.jr,
linux-kernel, liodot, charrer, Joe Perches
On Fri, Jun 13, 2014 at 10:04:35AM -0700, Greg KH wrote:
> On Fri, Jun 13, 2014 at 05:52:33PM +0200, Benedict Boerger wrote:
> > Fix a coding style issue found by checkpatch.pl.
> > Use ether_addr_copy instead of memcpy.
> >
> > Done to complete a eudyptula task.
> >
> > Signed-off-by: Benedict Boerger <benedict.boerger@cs.tu-dortmund.de>
> >
> > ---
> > drivers/staging/slicoss/slicoss.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
> > index 48841e7..02807a3 100644
> > --- a/drivers/staging/slicoss/slicoss.c
> > +++ b/drivers/staging/slicoss/slicoss.c
> > @@ -1790,7 +1790,7 @@ static int slic_mcast_add_list(struct adapter *adapter, char *address)
> > if (mcaddr == NULL)
> > return 1;
> >
> > - memcpy(mcaddr->address, address, ETH_ALEN);
> > + ether_addr_copy(mcaddr->address, address);
> >
> > mcaddr->next = adapter->mcastaddrs;
> > adapter->mcastaddrs = mcaddr;
>
> Are you sure this is correct? It's not always a one-to-one replacement
> from what I have been told.
I hate this checkpatch.pl warning because it just encourages people to
add bugs.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-06-16 8:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-13 15:52 [PATCH] staging: slicoss: Fix coding style issue Benedict Boerger
2014-06-13 17:04 ` Greg KH
2014-06-16 8:13 ` Dan Carpenter
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.