* [PATCH] staging: vt6656: replace memcpy by ether_addr_copy
@ 2015-02-17 20:00 Aya Mahfouz
2015-02-26 18:28 ` [Outreachy kernel] " Greg KH
0 siblings, 1 reply; 14+ messages in thread
From: Aya Mahfouz @ 2015-02-17 20:00 UTC (permalink / raw)
To: outreachy-kernel
This patch fixes the following checkpatch.pl warning:
Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are
__aligned(2)
The changes were applied using the following coccinelle
rule:
@@ expression e1, e2; @@
- memcpy(e1, e2, ETH_ALEN);
+ ether_addr_copy(e1, e2);
All variables defined in vnt_mac_set_key start at even offsets
making the variables aligned to the u16 datatype.
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
---
drivers/staging/vt6656/mac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/vt6656/mac.c b/drivers/staging/vt6656/mac.c
index bb37e33..5958ecf 100644
--- a/drivers/staging/vt6656/mac.c
+++ b/drivers/staging/vt6656/mac.c
@@ -126,7 +126,7 @@ void vnt_mac_set_keyentry(struct vnt_private *priv, u16 key_ctl, u32 entry_idx,
offset += (entry_idx * MISCFIFO_KEYENTRYSIZE);
set_key.u.write.key_ctl = cpu_to_le16(key_ctl);
- memcpy(set_key.u.write.addr, addr, ETH_ALEN);
+ ether_addr_copy(set_key.u.write.addr, addr);
/* swap over swap[0] and swap[1] to get correct write order */
swap(set_key.u.swap[0], set_key.u.swap[1]);
--
1.9.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH] Staging: vt6656: replace memcpy by ether_addr_copy
@ 2015-02-21 11:32 Yeliz Taneroglu
0 siblings, 0 replies; 14+ messages in thread
From: Yeliz Taneroglu @ 2015-02-21 11:32 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Yeliz Taneroglu
This patch fixes the following checkpatch.pl warning:
Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are
__aligned(2)
Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
---
drivers/staging/vt6656/main_usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 2fbff90..27a1f98 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -319,7 +319,7 @@ static int vnt_init_registers(struct vnt_private *priv)
/* get permanent network address */
memcpy(priv->permanent_net_addr, init_rsp->net_addr, 6);
- memcpy(priv->current_net_addr, priv->permanent_net_addr, ETH_ALEN);
+ ether_addr_copy(priv->current_net_addr, priv->permanent_net_addr);
/* if exist SW network address, use it */
dev_dbg(&priv->usb->dev, "Network address = %pM\n",
--
1.8.3.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: vt6656: replace memcpy by ether_addr_copy
2015-02-17 20:00 [PATCH] staging: vt6656: replace memcpy by ether_addr_copy Aya Mahfouz
@ 2015-02-26 18:28 ` Greg KH
2015-02-26 20:32 ` Aya Mahfouz
0 siblings, 1 reply; 14+ messages in thread
From: Greg KH @ 2015-02-26 18:28 UTC (permalink / raw)
To: Aya Mahfouz; +Cc: outreachy-kernel
On Tue, Feb 17, 2015 at 10:00:55PM +0200, Aya Mahfouz wrote:
> This patch fixes the following checkpatch.pl warning:
>
> Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are
> __aligned(2)
>
> The changes were applied using the following coccinelle
> rule:
> @@ expression e1, e2; @@
> - memcpy(e1, e2, ETH_ALEN);
> + ether_addr_copy(e1, e2);
>
> All variables defined in vnt_mac_set_key start at even offsets
> making the variables aligned to the u16 datatype.
>
> Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
> ---
> drivers/staging/vt6656/mac.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/vt6656/mac.c b/drivers/staging/vt6656/mac.c
> index bb37e33..5958ecf 100644
> --- a/drivers/staging/vt6656/mac.c
> +++ b/drivers/staging/vt6656/mac.c
> @@ -126,7 +126,7 @@ void vnt_mac_set_keyentry(struct vnt_private *priv, u16 key_ctl, u32 entry_idx,
> offset += (entry_idx * MISCFIFO_KEYENTRYSIZE);
>
> set_key.u.write.key_ctl = cpu_to_le16(key_ctl);
> - memcpy(set_key.u.write.addr, addr, ETH_ALEN);
> + ether_addr_copy(set_key.u.write.addr, addr);
>
> /* swap over swap[0] and swap[1] to get correct write order */
> swap(set_key.u.swap[0], set_key.u.swap[1]);
This patch breaks the build, please _always_ test build your patches :(
thanks,
greg k-h
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: vt6656: replace memcpy by ether_addr_copy
2015-02-26 18:28 ` [Outreachy kernel] " Greg KH
@ 2015-02-26 20:32 ` Aya Mahfouz
2015-02-26 20:35 ` Julia Lawall
2015-02-26 20:59 ` Greg KH
0 siblings, 2 replies; 14+ messages in thread
From: Aya Mahfouz @ 2015-02-26 20:32 UTC (permalink / raw)
To: Greg KH; +Cc: outreachy-kernel
On Thu, Feb 26, 2015 at 10:28:27AM -0800, Greg KH wrote:
> On Tue, Feb 17, 2015 at 10:00:55PM +0200, Aya Mahfouz wrote:
> > This patch fixes the following checkpatch.pl warning:
> >
> > Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are
> > __aligned(2)
> >
> > The changes were applied using the following coccinelle
> > rule:
> > @@ expression e1, e2; @@
> > - memcpy(e1, e2, ETH_ALEN);
> > + ether_addr_copy(e1, e2);
> >
> > All variables defined in vnt_mac_set_key start at even offsets
> > making the variables aligned to the u16 datatype.
> >
> > Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
> > ---
> > drivers/staging/vt6656/mac.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/vt6656/mac.c b/drivers/staging/vt6656/mac.c
> > index bb37e33..5958ecf 100644
> > --- a/drivers/staging/vt6656/mac.c
> > +++ b/drivers/staging/vt6656/mac.c
> > @@ -126,7 +126,7 @@ void vnt_mac_set_keyentry(struct vnt_private *priv, u16 key_ctl, u32 entry_idx,
> > offset += (entry_idx * MISCFIFO_KEYENTRYSIZE);
> >
> > set_key.u.write.key_ctl = cpu_to_le16(key_ctl);
> > - memcpy(set_key.u.write.addr, addr, ETH_ALEN);
> > + ether_addr_copy(set_key.u.write.addr, addr);
> >
> > /* swap over swap[0] and swap[1] to get correct write order */
> > swap(set_key.u.swap[0], set_key.u.swap[1]);
>
> This patch breaks the build, please _always_ test build your patches :(
>
> thanks,
>
> greg k-h
Hello Greg,
I always do and I didn't get any warnings or erros when building it
before sending. If you have the time, please let me know what is the
error.
It also seems to be that you compile all warnings as errors, it would be
kind of you if you let me know your build settings.
--
Kind Regards,
Aya Saif El-yazal Mahfouz
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: vt6656: replace memcpy by ether_addr_copy
2015-02-26 20:32 ` Aya Mahfouz
@ 2015-02-26 20:35 ` Julia Lawall
2015-02-26 20:41 ` Aya Mahfouz
2015-02-26 20:59 ` Greg KH
1 sibling, 1 reply; 14+ messages in thread
From: Julia Lawall @ 2015-02-26 20:35 UTC (permalink / raw)
To: Aya Mahfouz; +Cc: Greg KH, outreachy-kernel
On Thu, 26 Feb 2015, Aya Mahfouz wrote:
> On Thu, Feb 26, 2015 at 10:28:27AM -0800, Greg KH wrote:
> > On Tue, Feb 17, 2015 at 10:00:55PM +0200, Aya Mahfouz wrote:
> > > This patch fixes the following checkpatch.pl warning:
> > >
> > > Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are
> > > __aligned(2)
> > >
> > > The changes were applied using the following coccinelle
> > > rule:
> > > @@ expression e1, e2; @@
> > > - memcpy(e1, e2, ETH_ALEN);
> > > + ether_addr_copy(e1, e2);
> > >
> > > All variables defined in vnt_mac_set_key start at even offsets
> > > making the variables aligned to the u16 datatype.
> > >
> > > Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
> > > ---
> > > drivers/staging/vt6656/mac.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/staging/vt6656/mac.c b/drivers/staging/vt6656/mac.c
> > > index bb37e33..5958ecf 100644
> > > --- a/drivers/staging/vt6656/mac.c
> > > +++ b/drivers/staging/vt6656/mac.c
> > > @@ -126,7 +126,7 @@ void vnt_mac_set_keyentry(struct vnt_private *priv, u16 key_ctl, u32 entry_idx,
> > > offset += (entry_idx * MISCFIFO_KEYENTRYSIZE);
> > >
> > > set_key.u.write.key_ctl = cpu_to_le16(key_ctl);
> > > - memcpy(set_key.u.write.addr, addr, ETH_ALEN);
> > > + ether_addr_copy(set_key.u.write.addr, addr);
> > >
> > > /* swap over swap[0] and swap[1] to get correct write order */
> > > swap(set_key.u.swap[0], set_key.u.swap[1]);
> >
> > This patch breaks the build, please _always_ test build your patches :(
> >
> > thanks,
> >
> > greg k-h
>
> Hello Greg,
>
> I always do and I didn't get any warnings or erros when building it
> before sending. If you have the time, please let me know what is the
> error.
>
> It also seems to be that you compile all warnings as errors, it would be
> kind of you if you let me know your build settings.
Are you sure that you have a .o file for this file?
julia
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: vt6656: replace memcpy by ether_addr_copy
2015-02-26 20:35 ` Julia Lawall
@ 2015-02-26 20:41 ` Aya Mahfouz
0 siblings, 0 replies; 14+ messages in thread
From: Aya Mahfouz @ 2015-02-26 20:41 UTC (permalink / raw)
To: Julia Lawall; +Cc: Greg KH, outreachy-kernel
On Thu, Feb 26, 2015 at 09:35:08PM +0100, Julia Lawall wrote:
> On Thu, 26 Feb 2015, Aya Mahfouz wrote:
>
> > On Thu, Feb 26, 2015 at 10:28:27AM -0800, Greg KH wrote:
> > > On Tue, Feb 17, 2015 at 10:00:55PM +0200, Aya Mahfouz wrote:
> > > > This patch fixes the following checkpatch.pl warning:
> > > >
> > > > Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are
> > > > __aligned(2)
> > > >
> > > > The changes were applied using the following coccinelle
> > > > rule:
> > > > @@ expression e1, e2; @@
> > > > - memcpy(e1, e2, ETH_ALEN);
> > > > + ether_addr_copy(e1, e2);
> > > >
> > > > All variables defined in vnt_mac_set_key start at even offsets
> > > > making the variables aligned to the u16 datatype.
> > > >
> > > > Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
> > > > ---
> > > > drivers/staging/vt6656/mac.c | 2 +-
> > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/staging/vt6656/mac.c b/drivers/staging/vt6656/mac.c
> > > > index bb37e33..5958ecf 100644
> > > > --- a/drivers/staging/vt6656/mac.c
> > > > +++ b/drivers/staging/vt6656/mac.c
> > > > @@ -126,7 +126,7 @@ void vnt_mac_set_keyentry(struct vnt_private *priv, u16 key_ctl, u32 entry_idx,
> > > > offset += (entry_idx * MISCFIFO_KEYENTRYSIZE);
> > > >
> > > > set_key.u.write.key_ctl = cpu_to_le16(key_ctl);
> > > > - memcpy(set_key.u.write.addr, addr, ETH_ALEN);
> > > > + ether_addr_copy(set_key.u.write.addr, addr);
> > > >
> > > > /* swap over swap[0] and swap[1] to get correct write order */
> > > > swap(set_key.u.swap[0], set_key.u.swap[1]);
> > >
> > > This patch breaks the build, please _always_ test build your patches :(
> > >
> > > thanks,
> > >
> > > greg k-h
> >
> > Hello Greg,
> >
> > I always do and I didn't get any warnings or erros when building it
> > before sending. If you have the time, please let me know what is the
> > error.
> >
> > It also seems to be that you compile all warnings as errors, it would be
> > kind of you if you let me know your build settings.
>
> Are you sure that you have a .o file for this file?
>
> julia
I'm rebuilding the kernel now. I will let you know once I'm done.
--
Kind Regards,
Aya Saif El-yazal Mahfouz
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: vt6656: replace memcpy by ether_addr_copy
2015-02-26 20:32 ` Aya Mahfouz
2015-02-26 20:35 ` Julia Lawall
@ 2015-02-26 20:59 ` Greg KH
2015-02-27 1:32 ` Aya Mahfouz
1 sibling, 1 reply; 14+ messages in thread
From: Greg KH @ 2015-02-26 20:59 UTC (permalink / raw)
To: Aya Mahfouz; +Cc: outreachy-kernel
On Thu, Feb 26, 2015 at 10:32:44PM +0200, Aya Mahfouz wrote:
> On Thu, Feb 26, 2015 at 10:28:27AM -0800, Greg KH wrote:
> > On Tue, Feb 17, 2015 at 10:00:55PM +0200, Aya Mahfouz wrote:
> > > This patch fixes the following checkpatch.pl warning:
> > >
> > > Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are
> > > __aligned(2)
> > >
> > > The changes were applied using the following coccinelle
> > > rule:
> > > @@ expression e1, e2; @@
> > > - memcpy(e1, e2, ETH_ALEN);
> > > + ether_addr_copy(e1, e2);
> > >
> > > All variables defined in vnt_mac_set_key start at even offsets
> > > making the variables aligned to the u16 datatype.
> > >
> > > Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
> > > ---
> > > drivers/staging/vt6656/mac.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/staging/vt6656/mac.c b/drivers/staging/vt6656/mac.c
> > > index bb37e33..5958ecf 100644
> > > --- a/drivers/staging/vt6656/mac.c
> > > +++ b/drivers/staging/vt6656/mac.c
> > > @@ -126,7 +126,7 @@ void vnt_mac_set_keyentry(struct vnt_private *priv, u16 key_ctl, u32 entry_idx,
> > > offset += (entry_idx * MISCFIFO_KEYENTRYSIZE);
> > >
> > > set_key.u.write.key_ctl = cpu_to_le16(key_ctl);
> > > - memcpy(set_key.u.write.addr, addr, ETH_ALEN);
> > > + ether_addr_copy(set_key.u.write.addr, addr);
> > >
> > > /* swap over swap[0] and swap[1] to get correct write order */
> > > swap(set_key.u.swap[0], set_key.u.swap[1]);
> >
> > This patch breaks the build, please _always_ test build your patches :(
> >
> > thanks,
> >
> > greg k-h
>
> Hello Greg,
>
> I always do and I didn't get any warnings or erros when building it
> before sending. If you have the time, please let me know what is the
> error.
The compiler does not know what ether_addr_copy() is.
> It also seems to be that you compile all warnings as errors, it would be
> kind of you if you let me know your build settings.
I am building a "normal" x86-64 kernel with this driver enabled. And
no, I am not treating warnings as errors, but your patches should never
be adding build warnings, that is not allowed either.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: vt6656: replace memcpy by ether_addr_copy
2015-02-26 20:59 ` Greg KH
@ 2015-02-27 1:32 ` Aya Mahfouz
2015-02-27 1:55 ` Greg KH
0 siblings, 1 reply; 14+ messages in thread
From: Aya Mahfouz @ 2015-02-27 1:32 UTC (permalink / raw)
To: Greg KH; +Cc: outreachy-kernel
On Thu, Feb 26, 2015 at 12:59:30PM -0800, Greg KH wrote:
> On Thu, Feb 26, 2015 at 10:32:44PM +0200, Aya Mahfouz wrote:
> > On Thu, Feb 26, 2015 at 10:28:27AM -0800, Greg KH wrote:
> > > On Tue, Feb 17, 2015 at 10:00:55PM +0200, Aya Mahfouz wrote:
> > > > This patch fixes the following checkpatch.pl warning:
> > > >
> > > > Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are
> > > > __aligned(2)
> > > >
> > > > The changes were applied using the following coccinelle
> > > > rule:
> > > > @@ expression e1, e2; @@
> > > > - memcpy(e1, e2, ETH_ALEN);
> > > > + ether_addr_copy(e1, e2);
> > > >
> > > > All variables defined in vnt_mac_set_key start at even offsets
> > > > making the variables aligned to the u16 datatype.
> > > >
> > > > Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
> > > > ---
> > > > drivers/staging/vt6656/mac.c | 2 +-
> > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/staging/vt6656/mac.c b/drivers/staging/vt6656/mac.c
> > > > index bb37e33..5958ecf 100644
> > > > --- a/drivers/staging/vt6656/mac.c
> > > > +++ b/drivers/staging/vt6656/mac.c
> > > > @@ -126,7 +126,7 @@ void vnt_mac_set_keyentry(struct vnt_private *priv, u16 key_ctl, u32 entry_idx,
> > > > offset += (entry_idx * MISCFIFO_KEYENTRYSIZE);
> > > >
> > > > set_key.u.write.key_ctl = cpu_to_le16(key_ctl);
> > > > - memcpy(set_key.u.write.addr, addr, ETH_ALEN);
> > > > + ether_addr_copy(set_key.u.write.addr, addr);
> > > >
> > > > /* swap over swap[0] and swap[1] to get correct write order */
> > > > swap(set_key.u.swap[0], set_key.u.swap[1]);
> > >
> > > This patch breaks the build, please _always_ test build your patches :(
> > >
> > > thanks,
> > >
> > > greg k-h
> >
> > Hello Greg,
> >
> > I always do and I didn't get any warnings or erros when building it
> > before sending. If you have the time, please let me know what is the
> > error.
>
> The compiler does not know what ether_addr_copy() is.
>
> > It also seems to be that you compile all warnings as errors, it would be
> > kind of you if you let me know your build settings.
>
> I am building a "normal" x86-64 kernel with this driver enabled. And
> no, I am not treating warnings as errors, but your patches should never
> be adding build warnings, that is not allowed either.
>
Yes, concerning warnings, you told me that before. It seems to me that
I'm compiling the modules in a wrong way. I usually use one of the
following commands, if compiling a module:
make -C $pwd SUBDIRS=drivers/staging/xxx modules
make M=drivers/staging/xxx
The .o files were generated only after I broke the whole kernel build,
otherwise nothing is generated.
Any remedies?
> thanks,
>
> greg k-h
--
Kind Regards,
Aya Saif El-yazal Mahfouz
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: vt6656: replace memcpy by ether_addr_copy
2015-02-27 1:32 ` Aya Mahfouz
@ 2015-02-27 1:55 ` Greg KH
2015-02-27 1:59 ` Aya Mahfouz
0 siblings, 1 reply; 14+ messages in thread
From: Greg KH @ 2015-02-27 1:55 UTC (permalink / raw)
To: Aya Mahfouz; +Cc: outreachy-kernel
On Fri, Feb 27, 2015 at 03:32:51AM +0200, Aya Mahfouz wrote:
> On Thu, Feb 26, 2015 at 12:59:30PM -0800, Greg KH wrote:
> > On Thu, Feb 26, 2015 at 10:32:44PM +0200, Aya Mahfouz wrote:
> > > On Thu, Feb 26, 2015 at 10:28:27AM -0800, Greg KH wrote:
> > > > On Tue, Feb 17, 2015 at 10:00:55PM +0200, Aya Mahfouz wrote:
> > > > > This patch fixes the following checkpatch.pl warning:
> > > > >
> > > > > Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are
> > > > > __aligned(2)
> > > > >
> > > > > The changes were applied using the following coccinelle
> > > > > rule:
> > > > > @@ expression e1, e2; @@
> > > > > - memcpy(e1, e2, ETH_ALEN);
> > > > > + ether_addr_copy(e1, e2);
> > > > >
> > > > > All variables defined in vnt_mac_set_key start at even offsets
> > > > > making the variables aligned to the u16 datatype.
> > > > >
> > > > > Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
> > > > > ---
> > > > > drivers/staging/vt6656/mac.c | 2 +-
> > > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/drivers/staging/vt6656/mac.c b/drivers/staging/vt6656/mac.c
> > > > > index bb37e33..5958ecf 100644
> > > > > --- a/drivers/staging/vt6656/mac.c
> > > > > +++ b/drivers/staging/vt6656/mac.c
> > > > > @@ -126,7 +126,7 @@ void vnt_mac_set_keyentry(struct vnt_private *priv, u16 key_ctl, u32 entry_idx,
> > > > > offset += (entry_idx * MISCFIFO_KEYENTRYSIZE);
> > > > >
> > > > > set_key.u.write.key_ctl = cpu_to_le16(key_ctl);
> > > > > - memcpy(set_key.u.write.addr, addr, ETH_ALEN);
> > > > > + ether_addr_copy(set_key.u.write.addr, addr);
> > > > >
> > > > > /* swap over swap[0] and swap[1] to get correct write order */
> > > > > swap(set_key.u.swap[0], set_key.u.swap[1]);
> > > >
> > > > This patch breaks the build, please _always_ test build your patches :(
> > > >
> > > > thanks,
> > > >
> > > > greg k-h
> > >
> > > Hello Greg,
> > >
> > > I always do and I didn't get any warnings or erros when building it
> > > before sending. If you have the time, please let me know what is the
> > > error.
> >
> > The compiler does not know what ether_addr_copy() is.
> >
> > > It also seems to be that you compile all warnings as errors, it would be
> > > kind of you if you let me know your build settings.
> >
> > I am building a "normal" x86-64 kernel with this driver enabled. And
> > no, I am not treating warnings as errors, but your patches should never
> > be adding build warnings, that is not allowed either.
> >
>
> Yes, concerning warnings, you told me that before. It seems to me that
> I'm compiling the modules in a wrong way. I usually use one of the
> following commands, if compiling a module:
>
> make -C $pwd SUBDIRS=drivers/staging/xxx modules
> make M=drivers/staging/xxx
Both of those should work.
> The .o files were generated only after I broke the whole kernel build,
> otherwise nothing is generated.
>
> Any remedies?
I don't understand, what exactly was the errors?
It's usually just easiest to build the whole tree, you can do it quicker
by doing:
make -j16
replace the number with 2x the number of cpus you have, and you should
be fine.
good luck,
greg k-h
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: vt6656: replace memcpy by ether_addr_copy
2015-02-27 1:55 ` Greg KH
@ 2015-02-27 1:59 ` Aya Mahfouz
2015-02-27 5:45 ` Julia Lawall
0 siblings, 1 reply; 14+ messages in thread
From: Aya Mahfouz @ 2015-02-27 1:59 UTC (permalink / raw)
To: Greg KH; +Cc: outreachy-kernel
On Thu, Feb 26, 2015 at 05:55:12PM -0800, Greg KH wrote:
> On Fri, Feb 27, 2015 at 03:32:51AM +0200, Aya Mahfouz wrote:
> > On Thu, Feb 26, 2015 at 12:59:30PM -0800, Greg KH wrote:
> > > On Thu, Feb 26, 2015 at 10:32:44PM +0200, Aya Mahfouz wrote:
> > > > On Thu, Feb 26, 2015 at 10:28:27AM -0800, Greg KH wrote:
> > > > > On Tue, Feb 17, 2015 at 10:00:55PM +0200, Aya Mahfouz wrote:
> > > > > > This patch fixes the following checkpatch.pl warning:
> > > > > >
> > > > > > Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are
> > > > > > __aligned(2)
> > > > > >
> > > > > > The changes were applied using the following coccinelle
> > > > > > rule:
> > > > > > @@ expression e1, e2; @@
> > > > > > - memcpy(e1, e2, ETH_ALEN);
> > > > > > + ether_addr_copy(e1, e2);
> > > > > >
> > > > > > All variables defined in vnt_mac_set_key start at even offsets
> > > > > > making the variables aligned to the u16 datatype.
> > > > > >
> > > > > > Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
> > > > > > ---
> > > > > > drivers/staging/vt6656/mac.c | 2 +-
> > > > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > >
> > > > > > diff --git a/drivers/staging/vt6656/mac.c b/drivers/staging/vt6656/mac.c
> > > > > > index bb37e33..5958ecf 100644
> > > > > > --- a/drivers/staging/vt6656/mac.c
> > > > > > +++ b/drivers/staging/vt6656/mac.c
> > > > > > @@ -126,7 +126,7 @@ void vnt_mac_set_keyentry(struct vnt_private *priv, u16 key_ctl, u32 entry_idx,
> > > > > > offset += (entry_idx * MISCFIFO_KEYENTRYSIZE);
> > > > > >
> > > > > > set_key.u.write.key_ctl = cpu_to_le16(key_ctl);
> > > > > > - memcpy(set_key.u.write.addr, addr, ETH_ALEN);
> > > > > > + ether_addr_copy(set_key.u.write.addr, addr);
> > > > > >
> > > > > > /* swap over swap[0] and swap[1] to get correct write order */
> > > > > > swap(set_key.u.swap[0], set_key.u.swap[1]);
> > > > >
> > > > > This patch breaks the build, please _always_ test build your patches :(
> > > > >
> > > > > thanks,
> > > > >
> > > > > greg k-h
> > > >
> > > > Hello Greg,
> > > >
> > > > I always do and I didn't get any warnings or erros when building it
> > > > before sending. If you have the time, please let me know what is the
> > > > error.
> > >
> > > The compiler does not know what ether_addr_copy() is.
> > >
> > > > It also seems to be that you compile all warnings as errors, it would be
> > > > kind of you if you let me know your build settings.
> > >
> > > I am building a "normal" x86-64 kernel with this driver enabled. And
> > > no, I am not treating warnings as errors, but your patches should never
> > > be adding build warnings, that is not allowed either.
> > >
> >
> > Yes, concerning warnings, you told me that before. It seems to me that
> > I'm compiling the modules in a wrong way. I usually use one of the
> > following commands, if compiling a module:
> >
> > make -C $pwd SUBDIRS=drivers/staging/xxx modules
> > make M=drivers/staging/xxx
>
> Both of those should work.
>
> > The .o files were generated only after I broke the whole kernel build,
> > otherwise nothing is generated.
> >
> > Any remedies?
>
> I don't understand, what exactly was the errors?
>
> It's usually just easiest to build the whole tree, you can do it quicker
> by doing:
> make -j16
>
> replace the number with 2x the number of cpus you have, and you should
> be fine.
>
> good luck,
>
> greg k-h
ok, Thanks!
--
Kind Regards,
Aya Saif El-yazal Mahfouz
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: vt6656: replace memcpy by ether_addr_copy
2015-02-27 1:59 ` Aya Mahfouz
@ 2015-02-27 5:45 ` Julia Lawall
2015-02-27 5:53 ` Aya Mahfouz
0 siblings, 1 reply; 14+ messages in thread
From: Julia Lawall @ 2015-02-27 5:45 UTC (permalink / raw)
To: Aya Mahfouz; +Cc: Greg KH, outreachy-kernel
> > It's usually just easiest to build the whole tree, you can do it quicker
> > by doing:
> > make -j16
> >
> > replace the number with 2x the number of cpus you have, and you should
> > be fine.
> >
> > good luck,
> >
> > greg k-h
>
> ok, Thanks!
I guess that the problem would have been seen by just compiling make
foo/bar/file.o?
julia
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: vt6656: replace memcpy by ether_addr_copy
2015-02-27 5:45 ` Julia Lawall
@ 2015-02-27 5:53 ` Aya Mahfouz
2015-02-27 8:53 ` Arnd Bergmann
0 siblings, 1 reply; 14+ messages in thread
From: Aya Mahfouz @ 2015-02-27 5:53 UTC (permalink / raw)
To: Julia Lawall; +Cc: Greg KH, outreachy-kernel
On Fri, Feb 27, 2015 at 06:45:35AM +0100, Julia Lawall wrote:
> > > It's usually just easiest to build the whole tree, you can do it quicker
> > > by doing:
> > > make -j16
> > >
> > > replace the number with 2x the number of cpus you have, and you should
> > > be fine.
> > >
> > > good luck,
> > >
> > > greg k-h
> >
> > ok, Thanks!
>
> I guess that the problem would have been seen by just compiling make
> foo/bar/file.o?
>
Yup! works for me and my poor old CPU :-D Thanks!
> julia
--
Kind Regards,
Aya Saif El-yazal Mahfouz
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: vt6656: replace memcpy by ether_addr_copy
2015-02-27 5:53 ` Aya Mahfouz
@ 2015-02-27 8:53 ` Arnd Bergmann
2015-02-27 10:23 ` Aya Mahfouz
0 siblings, 1 reply; 14+ messages in thread
From: Arnd Bergmann @ 2015-02-27 8:53 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Aya Mahfouz, Julia Lawall, Greg KH
On Friday 27 February 2015 07:53:49 Aya Mahfouz wrote:
> On Fri, Feb 27, 2015 at 06:45:35AM +0100, Julia Lawall wrote:
> > > > It's usually just easiest to build the whole tree, you can do it quicker
> > > > by doing:
> > > > make -j16
> > > >
> > > > replace the number with 2x the number of cpus you have, and you should
> > > > be fine.
> > > >
> > > > good luck,
> > > >
> > > > greg k-h
> > >
> > > ok, Thanks!
> >
> > I guess that the problem would have been seen by just compiling make
> > foo/bar/file.o?
> >
> Yup! works for me and my poor old CPU Thanks!
It's also what I normally do, or for the whole directory
make foo/bar/
which will build all files that are turned on in the configuration.
Using 'make foo/bar/file.o' will try to build that one file even
if it is disabled in the configuration, which may or may not be what
you want. The advantage is that you don't have to figure out how
to enable it, but the downside is that it may fail to build in your
current configuration because of some other configuration option
rather than something you did.
Arnd
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: vt6656: replace memcpy by ether_addr_copy
2015-02-27 8:53 ` Arnd Bergmann
@ 2015-02-27 10:23 ` Aya Mahfouz
0 siblings, 0 replies; 14+ messages in thread
From: Aya Mahfouz @ 2015-02-27 10:23 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: outreachy-kernel, Julia Lawall, Greg KH
On Fri, Feb 27, 2015 at 09:53:06AM +0100, Arnd Bergmann wrote:
> On Friday 27 February 2015 07:53:49 Aya Mahfouz wrote:
> > On Fri, Feb 27, 2015 at 06:45:35AM +0100, Julia Lawall wrote:
> > > > > It's usually just easiest to build the whole tree, you can do it quicker
> > > > > by doing:
> > > > > make -j16
> > > > >
> > > > > replace the number with 2x the number of cpus you have, and you should
> > > > > be fine.
> > > > >
> > > > > good luck,
> > > > >
> > > > > greg k-h
> > > >
> > > > ok, Thanks!
> > >
> > > I guess that the problem would have been seen by just compiling make
> > > foo/bar/file.o?
> > >
> > Yup! works for me and my poor old CPU Thanks!
>
> It's also what I normally do, or for the whole directory
>
> make foo/bar/
>
> which will build all files that are turned on in the configuration.
> Using 'make foo/bar/file.o' will try to build that one file even
> if it is disabled in the configuration, which may or may not be what
> you want. The advantage is that you don't have to figure out how
> to enable it, but the downside is that it may fail to build in your
> current configuration because of some other configuration option
> rather than something you did.
>
Thanks Arnd! Yeah, I usually see that some symbols cannot be enabled
unless their dependencies are enabled too.
> Arnd
--
Kind Regards,
Aya Saif El-yazal Mahfouz
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2015-02-27 10:23 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-17 20:00 [PATCH] staging: vt6656: replace memcpy by ether_addr_copy Aya Mahfouz
2015-02-26 18:28 ` [Outreachy kernel] " Greg KH
2015-02-26 20:32 ` Aya Mahfouz
2015-02-26 20:35 ` Julia Lawall
2015-02-26 20:41 ` Aya Mahfouz
2015-02-26 20:59 ` Greg KH
2015-02-27 1:32 ` Aya Mahfouz
2015-02-27 1:55 ` Greg KH
2015-02-27 1:59 ` Aya Mahfouz
2015-02-27 5:45 ` Julia Lawall
2015-02-27 5:53 ` Aya Mahfouz
2015-02-27 8:53 ` Arnd Bergmann
2015-02-27 10:23 ` Aya Mahfouz
-- strict thread matches above, loose matches on Subject: below --
2015-02-21 11:32 [PATCH] Staging: " Yeliz Taneroglu
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.