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]
Date:	Fri, 3 Aug 2007 18:35:21 +0900
From:	Tejun Heo <htejun@...il.com>
To:	Brandon Philips <brandon@...e.de>
Cc:	netdev@...r.kernel.org, teheo@...e.de,
	Brandon Philips <bphilips@...e.de>
Subject: Re: [patch 5/5][RFC] Update e1000 driver to use devres.

On Thu, Aug 02, 2007 at 03:45:52PM -0700, Brandon Philips wrote:
>  	if ((err = pci_request_regions(pdev, e1000_driver_name)))
> -		goto err_pci_reg;
> +		goto err_dma;

Why not just return?  Ditto for all goto err_dma's.

>  	err = -EIO;
> -	adapter->hw.hw_addr = ioremap(mmio_start, mmio_len);
> +	adapter->hw.hw_addr = devm_ioremap(&pdev->dev, mmio_start, mmio_len);

This is correct conversion but I have no idea why the origical code
did manual ioremap instead of using pci_iomap().

> -		adapter->hw.flash_address = ioremap(flash_start, flash_len);
> +		adapter->hw.flash_address = devm_ioremap(&pdev->dev,
> +							flash_start,
> +							flash_len);

Ditto.

>  err_dma:
>  	pci_disable_device(pdev);
>  	return err;

err_dma can be killed.

Thanks.

-- 
tejun
-
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