From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Date: Thu, 27 Jan 2011 10:10:48 -0600 Subject: [U-Boot] [PATCH 02/14] powerpc/fman: add PHY support for dTSEC In-Reply-To: <1296103972-2696-3-git-send-email-Mingkai.hu@freescale.com> References: <1296103972-2696-1-git-send-email-Mingkai.hu@freescale.com> <1296103972-2696-2-git-send-email-Mingkai.hu@freescale.com> <1296103972-2696-3-git-send-email-Mingkai.hu@freescale.com> Message-ID: <4D419908.7040509@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Mingkai Hu wrote: > + u16 phy_reg; > + u32 phy_ID; > + int i; > + struct phy_info *theInfo = NULL; > + > + /* Grab the bits from PHYIR1, and put them in the upper half */ > + phy_reg = tsec_phy_read(mii_info, 0, MII_PHYSID1); > + phy_ID = (phy_reg & 0xffff) << 16; > + > + /* Grab the bits from PHYIR2, and put them in the lower half */ > + phy_reg = tsec_phy_read(mii_info, 0, MII_PHYSID2); > + phy_ID |= (phy_reg & 0xffff); The "& 0xffff" is unnecessary since phy_reg is a u16, so it can never be larger than 0xffff. > + theInfo = phy_info[i]; CamelCase variables? > + * Copyright 2009-2010 Freescale Semiconductor, Inc. Should any of these be 2011? -- Timur Tabi Linux kernel developer at Freescale