[PATCH] qe: miscellaneous code improvements and fixes to the QE library

Scott Wood scottwood at freescale.com
Thu Sep 20 04:28:58 EST 2007


Timur Tabi wrote:
> -void qe_setbrg(u32 brg, u32 rate)
> +void qe_setbrg(unsigned int brg, unsigned int rate, unsigned int multiplier)
>  {
>  	volatile u32 *bp;

While you're at it, this should be __be32 __iomem *, no volatile.

> +/* Configure the UCC to either Slow or Fast.
> + *
> + * A given UCC can be figured to support either "slow" devices (e.g. UART)
> + * or "fast" devices (e.g. Ethernet).
> + *
> + * 'ucc_num' is the UCC number, from 0 - 7.
> + *
> + * This function also sets the UCC_GUEMR_SET_RESERVED3 bit because that bit
> + * must always be set to 1.
> + */
> +int ucc_set_type(unsigned int ucc_num, enum ucc_speed_type speed)
>  {
> -	u8 guemr = 0;
> +	u8 __iomem *p_guemr;

We don't do Hungarian notation in Linux. :-)
What's wrong with just "u8 __iomem *guemr"?

-Scott




More information about the Linuxppc-dev mailing list