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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 23 Aug 2007 10:31:03 +1000
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Olof Johansson <olof@...om.net>
Cc:	jgarzik@...ox.com, netdev@...r.kernel.org, linuxppc-dev@...abs.org
Subject: Re: [PATCH] [02/10] pasemi_mac: Stop using the pci config space
 accessors for register read/writes

Hi Olof,

On Wed, 22 Aug 2007 09:12:48 -0500 Olof Johansson <olof@...om.net> wrote:
>
> -static unsigned int read_iob_reg(struct pasemi_mac *mac, unsigned int reg)
> +static inline unsigned int read_iob_reg(struct pasemi_mac *mac, unsigned int reg)
          ^^^^^^
For static functions in C files, we tend not to bother marking them
inline any more as the compiler does a pretty good job theses days.

>  {
>  	unsigned int val;
>  
> -	pci_read_config_dword(mac->iob_pdev, reg, &val);
> +	val = in_le32(mac->iob_regs+reg);
> +
>  	return val;

Why not just "return in_le32(mac->iob_regs+reg);" ?
And similarly below?

> +static inline void __iomem * __devinit map_onedev(struct pci_dev *p, int index)
          ^^^^^^                ^^^^^^^^^
Mixing inline and __*init is just plain silly :-)

> +fallback:
> +	/* This is hardcoded and ugly, but we have some firmware versions
> +	 * who don't provide the register space in the device tree. Luckily
           ^^^
"that"

-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au
http://www.canb.auug.org.au/~sfr/

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ