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

Marek Vasut marex at denx.de
Wed Sep 12 11:51:57 CEST 2012


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 at denx.de>
> Cc: Mike Frysinger <vapier at 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


More information about the U-Boot mailing list