Subject: Re: [PATCH 2.6.20 3/5] s2io: Fixes in updating skb->truesize and code cleanup.

From: Jeff Garzik <[email-masked]>
Date: Tue, 23 Jan 2007 00:46:47 -0500

Ananda Raju wrote:
> @@ -6999,7 +7003,7 @@ s2io_init_nic(struct pci_dev *pdev, cons
>  		goto mem_alloc_failed;
>  	}
>  
> -	sp->bar0 = ioremap(pci_resource_start(pdev, 0),
> +	sp->bar0 = (caddr_t) ioremap(pci_resource_start(pdev, 0),
>  				     pci_resource_len(pdev, 0));
>  	if (!sp->bar0) {
>  		DBG_PRINT(ERR_DBG, "%s: Neterion: cannot remap io mem1\n",
> @@ -7008,7 +7012,7 @@ s2io_init_nic(struct pci_dev *pdev, cons
>  		goto bar0_remap_failed;
>  	}
>  
> -	sp->bar1 = ioremap(pci_resource_start(pdev, 2),
> +	sp->bar1 = (caddr_t) ioremap(pci_resource_start(pdev, 2),
>  				     pci_resource_len(pdev, 2));
>  	if (!sp->bar1) {
>  		DBG_PRINT(ERR_DBG, "%s: Neterion: cannot remap io mem2\n",

adds pointless casts.

further, caddr_t type should /never/ be used.

Linux kernel uses void*, from which you may assign to/from freely, 
without casting.

> @@ -7645,6 +7649,7 @@ static void lro_append_pkt(nic_t *sp, lr
>  		lro->last_frag->next = skb;
>  	else
>  		skb_shinfo(first)->frag_list = skb;
> +	first->truesize += skb->truesize;//updating skb->truesize
>  	lro->last_frag = skb;
>  	sp->mac_control.stats_info->sw_stat.clubbed_frms_cnt++;
>  	return;

pointless comment (and C++ too, which is discouraged)