[U-Boot] [PATCH v2 3/7] usb: eth: introduce support for Moschip USB ethernet

Wolfgang Denk wd at denx.de
Mon Feb 17 22:11:17 CET 2014


Dear Gerhard,

In message <1392665727-5734-4-git-send-email-gsi at denx.de> you wrote:
> introduce an 'mcs7830' driver for Moschip based USB ethernet adapters,
> which was implemented based on the U-Boot Asix driver with additional
> information gathered from the Moschip Linux driver
...
> +/* bit masks and default values for the above registers */
> +#define PHY_CMD1_READ		BIT(6)
> +#define PHY_CMD1_WRITE		BIT(5)
> +#define PHY_CMD1_PHYADDR	BIT(0)
> +
> +#define PHY_CMD2_PEND		BIT(7)
> +#define PHY_CMD2_READY		BIT(6)
...

As mentioned in patch # 1, I object against the use of these
obfuscating BIT() macros.  Please do not use these; use plain
readable code, that leaves no ambiguities to the reader.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Just because your doctor has a name for your condition  doesn't  mean
he knows what it is.


More information about the U-Boot mailing list