Patchwork [U-Boot,2/2] bfin: Fix warning in bfin_mac

login
register
mail settings
Submitter Marek Vasut
Date Sept. 11, 2012, 7:08 p.m.
Message ID <1347390507-27299-2-git-send-email-marex@denx.de>
Download mbox | patch
Permalink /patch/183175/
State Accepted
Delegated to: Sonic Zhang
Headers show

Comments

Marek Vasut - Sept. 11, 2012, 7:08 p.m.
The buf variable in bfin_mac.c is not used and produces warning,
fix it.

bfin_mac.c: In function 'bfin_EMAC_send':
bfin_mac.c:125:16: warning: variable 'buf' set but not used [-Wunused-but-set-variable]

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Mike Frysinger <vapier@gentoo.org>
---
 drivers/net/bfin_mac.c |    2 --
 1 file changed, 2 deletions(-)
Mike Frysinger - Sept. 12, 2012, 4:27 a.m.
Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike
Marek Vasut - Sept. 12, 2012, 9:51 a.m.
Dear Marek Vasut,

> The buf variable in bfin_mac.c is not used and produces warning,
> fix it.
> 
> bfin_mac.c: In function 'bfin_EMAC_send':
> bfin_mac.c:125:16: warning: variable 'buf' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Mike Frysinger <vapier@gentoo.org>

Guess I should have Cced Joe too ... 

> ---
>  drivers/net/bfin_mac.c |    2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
> index c63398e..0ffd59d 100644
> --- a/drivers/net/bfin_mac.c
> +++ b/drivers/net/bfin_mac.c
> @@ -122,8 +122,6 @@ static int bfin_EMAC_send(struct eth_device *dev, void
> *packet, int length) {
>  	int i;
>  	int result = 0;
> -	unsigned int *buf;
> -	buf = (unsigned int *)packet;
> 
>  	if (length <= 0) {
>  		printf("Ethernet: bad packet size: %d\n", length);

Best regards,
Marek Vasut
Joe Hershberger - Sept. 12, 2012, 2:32 p.m.
On Wed, Sep 12, 2012 at 4:51 AM, Marek Vasut <marex@denx.de> wrote:
> Dear Marek Vasut,
>
>> The buf variable in bfin_mac.c is not used and produces warning,
>> fix it.
>>
>> bfin_mac.c: In function 'bfin_EMAC_send':
>> bfin_mac.c:125:16: warning: variable 'buf' set but not used
>> [-Wunused-but-set-variable]
>>
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> Cc: Mike Frysinger <vapier@gentoo.org>
>
> Guess I should have Cced Joe too ...
>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Mike Frysinger - Sept. 12, 2012, 4:18 p.m.
On Wed, Sep 12, 2012 at 10:32 AM, Joe Hershberger wrote:
> On Wed, Sep 12, 2012 at 4:51 AM, Marek Vasut wrote:
>> Dear Marek Vasut,
>>> The buf variable in bfin_mac.c is not used and produces warning,
>>> fix it.
>>>
>>> bfin_mac.c: In function 'bfin_EMAC_send':
>>> bfin_mac.c:125:16: warning: variable 'buf' set but not used
>>> [-Wunused-but-set-variable]
>>>
>>> Signed-off-by: Marek Vasut <marex@denx.de>
>>> Cc: Mike Frysinger <vapier@gentoo.org>
>>
>> Guess I should have Cced Joe too ...
>
> Acked-by: Joe Hershberger <joe.hershberger@ni.com>

i can pick this up, or you can.  it'll be another week before i'm back
home & working on u-boot though.
-mike

Patch

diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index c63398e..0ffd59d 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -122,8 +122,6 @@  static int bfin_EMAC_send(struct eth_device *dev, void *packet, int length)
 {
 	int i;
 	int result = 0;
-	unsigned int *buf;
-	buf = (unsigned int *)packet;
 
 	if (length <= 0) {
 		printf("Ethernet: bad packet size: %d\n", length);