lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <45B5A147.6050205@garzik.org>
Date:	Tue, 23 Jan 2007 00:46:47 -0500
From:	Jeff Garzik <jeff@...zik.org>
To:	Ananda Raju <Ananda.Raju@...erion.com>
CC:	netdev@...r.kernel.org, leonid.grossman@...erion.com,
	alicia.pena@...erion.com, ramkrishna.vepa@...erion.com,
	sivakumar.subramani@...erion.com, sreenivasa.honnur@...erion.com,
	sriram.rapuru@...erion.com
Subject: Re: [PATCH 2.6.20 3/5] s2io: Fixes in updating skb->truesize and
 code cleanup.

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)

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ