tg3: The case of switches

This patch fixes checkpatch errors related to switch statements.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Matt Carlson 2010-04-05 10:19:27 +00:00 committed by David S. Miller
parent c6cdf43631
commit 33f401aec7

View File

@ -581,11 +581,11 @@ static int tg3_ape_lock(struct tg3 *tp, int locknum)
return 0; return 0;
switch (locknum) { switch (locknum) {
case TG3_APE_LOCK_GRC: case TG3_APE_LOCK_GRC:
case TG3_APE_LOCK_MEM: case TG3_APE_LOCK_MEM:
break; break;
default: default:
return -EINVAL; return -EINVAL;
} }
off = 4 * locknum; off = 4 * locknum;
@ -619,11 +619,11 @@ static void tg3_ape_unlock(struct tg3 *tp, int locknum)
return; return;
switch (locknum) { switch (locknum) {
case TG3_APE_LOCK_GRC: case TG3_APE_LOCK_GRC:
case TG3_APE_LOCK_MEM: case TG3_APE_LOCK_MEM:
break; break;
default: default:
return; return;
} }
off = 4 * locknum; off = 4 * locknum;
@ -3428,7 +3428,7 @@ static int tg3_fiber_aneg_smachine(struct tg3 *tp,
ap->rxconfig = rx_cfg_reg; ap->rxconfig = rx_cfg_reg;
ret = ANEG_OK; ret = ANEG_OK;
switch(ap->state) { switch (ap->state) {
case ANEG_STATE_UNKNOWN: case ANEG_STATE_UNKNOWN:
if (ap->flags & (MR_AN_ENABLE | MR_RESTART_AN)) if (ap->flags & (MR_AN_ENABLE | MR_RESTART_AN))
ap->state = ANEG_STATE_AN_ENABLE; ap->state = ANEG_STATE_AN_ENABLE;
@ -6565,35 +6565,35 @@ static void tg3_ape_driver_state_change(struct tg3 *tp, int kind)
return; return;
switch (kind) { switch (kind) {
case RESET_KIND_INIT: case RESET_KIND_INIT:
tg3_ape_write32(tp, TG3_APE_HOST_SEG_SIG, tg3_ape_write32(tp, TG3_APE_HOST_SEG_SIG,
APE_HOST_SEG_SIG_MAGIC); APE_HOST_SEG_SIG_MAGIC);
tg3_ape_write32(tp, TG3_APE_HOST_SEG_LEN, tg3_ape_write32(tp, TG3_APE_HOST_SEG_LEN,
APE_HOST_SEG_LEN_MAGIC); APE_HOST_SEG_LEN_MAGIC);
apedata = tg3_ape_read32(tp, TG3_APE_HOST_INIT_COUNT); apedata = tg3_ape_read32(tp, TG3_APE_HOST_INIT_COUNT);
tg3_ape_write32(tp, TG3_APE_HOST_INIT_COUNT, ++apedata); tg3_ape_write32(tp, TG3_APE_HOST_INIT_COUNT, ++apedata);
tg3_ape_write32(tp, TG3_APE_HOST_DRIVER_ID, tg3_ape_write32(tp, TG3_APE_HOST_DRIVER_ID,
APE_HOST_DRIVER_ID_MAGIC); APE_HOST_DRIVER_ID_MAGIC);
tg3_ape_write32(tp, TG3_APE_HOST_BEHAVIOR, tg3_ape_write32(tp, TG3_APE_HOST_BEHAVIOR,
APE_HOST_BEHAV_NO_PHYLOCK); APE_HOST_BEHAV_NO_PHYLOCK);
event = APE_EVENT_STATUS_STATE_START; event = APE_EVENT_STATUS_STATE_START;
break; break;
case RESET_KIND_SHUTDOWN: case RESET_KIND_SHUTDOWN:
/* With the interface we are currently using, /* With the interface we are currently using,
* APE does not track driver state. Wiping * APE does not track driver state. Wiping
* out the HOST SEGMENT SIGNATURE forces * out the HOST SEGMENT SIGNATURE forces
* the APE to assume OS absent status. * the APE to assume OS absent status.
*/ */
tg3_ape_write32(tp, TG3_APE_HOST_SEG_SIG, 0x0); tg3_ape_write32(tp, TG3_APE_HOST_SEG_SIG, 0x0);
event = APE_EVENT_STATUS_STATE_UNLOAD; event = APE_EVENT_STATUS_STATE_UNLOAD;
break; break;
case RESET_KIND_SUSPEND: case RESET_KIND_SUSPEND:
event = APE_EVENT_STATUS_STATE_SUSPEND; event = APE_EVENT_STATUS_STATE_SUSPEND;
break; break;
default: default:
return; return;
} }
event |= APE_EVENT_STATUS_DRIVER_EVNT | APE_EVENT_STATUS_STATE_CHNGE; event |= APE_EVENT_STATUS_DRIVER_EVNT | APE_EVENT_STATUS_STATE_CHNGE;
@ -11102,7 +11102,7 @@ static int tg3_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
return phy_mii_ioctl(phydev, data, cmd); return phy_mii_ioctl(phydev, data, cmd);
} }
switch(cmd) { switch (cmd) {
case SIOCGMIIPHY: case SIOCGMIIPHY:
data->phy_id = tp->phy_addr; data->phy_id = tp->phy_addr;