net: phy: mv88e61xx.c : fixed build warning
authorPrafulla Wadaskar <prafulla@marvell.com>
Mon, 21 Sep 2009 14:58:18 +0000 (20:28 +0530)
committerBen Warren <biggerbadderben@gmail.com>
Mon, 5 Oct 2009 05:30:46 +0000 (22:30 -0700)
following build warning was observed

mv88e61xx.c: In function ‘mv88e61xx_busychk’:
mv88e61xx.c:208: warning: dereferencing type-punned pointer will break strict-aliasing rules

This patch fixes the same
Patch tested for rd6281a board build

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
drivers/net/phy/mv88e61xx.c

index 3754e8bdc43206760c184706ffbee78dc69fc398..2d1de0291700424fa62df72638b2d18a89baec09 100644 (file)
@@ -201,11 +201,11 @@ static void mv88e61xx_port_vlan_config(struct mv88e61xx_config *swconfig,
  */
 static int mv88e61xx_busychk(char *name)
 {
-       u32 reg = 0;
+       u16 reg = 0;
        u32 timeout = MV88E61XX_PHY_TIMEOUT;
        do {
                RD_PHY(name, MV88E61XX_GLB2REG_DEVADR,
-                      MV88E61XX_PHY_CMD, (u16 *) & reg);
+                      MV88E61XX_PHY_CMD, &reg);
                if (timeout-- == 0) {
                        printf("SMI busy timeout\n");
                        return -1;