Re: 2.6.23-rc6-mm1: Build failures on ppc64_defconfig

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On (22/09/07 12:24), Satyam Sharma didst pronounce:
> 
> 
> On Thu, 20 Sep 2007, Satyam Sharma wrote:
> > 
> > BTW ppc64_defconfig didn't quite like 2.6.23-rc6-mm1 either ...
> > IIRC I got build failures in:
> 
> > drivers/net/spider_net.c
> 
> 
> [PATCH -mm] spider_net: Misc build fixes after recent netdev stats changes
> 
> Unbreak the following:
> 
> drivers/net/spider_net.c: In function 'spider_net_release_tx_chain':
> drivers/net/spider_net.c:818: error: 'dev' undeclared (first use in this function)
> drivers/net/spider_net.c:818: error: (Each undeclared identifier is reported only once
> drivers/net/spider_net.c:818: error: for each function it appears in.)
> drivers/net/spider_net.c: In function 'spider_net_xmit':
> drivers/net/spider_net.c:922: error: 'dev' undeclared (first use in this function)
> drivers/net/spider_net.c: In function 'spider_net_pass_skb_up':
> drivers/net/spider_net.c:1018: error: 'dev' undeclared (first use in this function)
> drivers/net/spider_net.c: In function 'spider_net_decode_one_descr':
> drivers/net/spider_net.c:1215: error: 'dev' undeclared (first use in this function)
> make[2]: *** [drivers/net/spider_net.o] Error 1
> 
> Signed-off-by: Satyam Sharma <[email protected]>

I've confirmed that this patch fixes the build error in question.

Acked-by: Mel Gorman <[email protected]>

> 
> ---
> 
>  drivers/net/spider_net.c |   24 +++++++++++-------------
>  1 file changed, 11 insertions(+), 13 deletions(-)
> 
> diff -ruNp a/drivers/net/spider_net.c b/drivers/net/spider_net.c
> --- a/drivers/net/spider_net.c	2007-09-22 06:26:39.000000000 +0530
> +++ b/drivers/net/spider_net.c	2007-09-22 12:12:23.000000000 +0530
> @@ -795,6 +795,7 @@ spider_net_set_low_watermark(struct spid
>  static int
>  spider_net_release_tx_chain(struct spider_net_card *card, int brutal)
>  {
> +	struct net_device *dev = card->netdev;
>  	struct spider_net_descr_chain *chain = &card->tx_chain;
>  	struct spider_net_descr *descr;
>  	struct spider_net_hw_descr *hwdescr;
> @@ -919,7 +920,7 @@ spider_net_xmit(struct sk_buff *skb, str
>  	spider_net_release_tx_chain(card, 0);
>  
>  	if (spider_net_prepare_tx_descr(card, skb) != 0) {
> -		dev->stats.tx_dropped++;
> +		netdev->stats.tx_dropped++;
>  		netif_stop_queue(netdev);
>  		return NETDEV_TX_BUSY;
>  	}
> @@ -979,16 +980,12 @@ static void
>  spider_net_pass_skb_up(struct spider_net_descr *descr,
>  		       struct spider_net_card *card)
>  {
> -	struct spider_net_hw_descr *hwdescr= descr->hwdescr;
> -	struct sk_buff *skb;
> -	struct net_device *netdev;
> -	u32 data_status, data_error;
> -
> -	data_status = hwdescr->data_status;
> -	data_error = hwdescr->data_error;
> -	netdev = card->netdev;
> +	struct spider_net_hw_descr *hwdescr = descr->hwdescr;
> +	struct sk_buff *skb = descr->skb;
> +	struct net_device *netdev = card->netdev;
> +	u32 data_status = hwdescr->data_status;
> +	u32 data_error = hwdescr->data_error;
>  
> -	skb = descr->skb;
>  	skb_put(skb, hwdescr->valid_size);
>  
>  	/* the card seems to add 2 bytes of junk in front
> @@ -1015,8 +1012,8 @@ spider_net_pass_skb_up(struct spider_net
>  	}
>  
>  	/* update netdevice statistics */
> -	dev->stats.rx_packets++;
> -	dev->stats.rx_bytes += skb->len;
> +	netdev->stats.rx_packets++;
> +	netdev->stats.rx_bytes += skb->len;
>  
>  	/* pass skb up to stack */
>  	netif_receive_skb(skb);
> @@ -1184,6 +1181,7 @@ static int spider_net_resync_tail_ptr(st
>  static int
>  spider_net_decode_one_descr(struct spider_net_card *card)
>  {
> +	struct net_device *dev = card->netdev;
>  	struct spider_net_descr_chain *chain = &card->rx_chain;
>  	struct spider_net_descr *descr = chain->tail;
>  	struct spider_net_hw_descr *hwdescr = descr->hwdescr;
> @@ -1210,7 +1208,7 @@ spider_net_decode_one_descr(struct spide
>  	     (status == SPIDER_NET_DESCR_PROTECTION_ERROR) ||
>  	     (status == SPIDER_NET_DESCR_FORCE_END) ) {
>  		if (netif_msg_rx_err(card))
> -			dev_err(&card->netdev->dev,
> +			dev_err(&dev->dev,
>  			       "dropping RX descriptor with state %d\n", status);
>  		dev->stats.rx_dropped++;
>  		goto bad_desc;
> 

-- 
-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux