[NIU]: getting rid of __ucmpdi2 in niu.o
By the time we get to that switch by PHY type, we have 8bit value. No need to keep it in u64 when u8 would do. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
f937f1f46b
Коммит
a9d41192b9
|
@ -6123,19 +6123,19 @@ static int __devinit niu_pci_probe_sprom(struct niu *np)
|
||||||
val = nr64(ESPC_PHY_TYPE);
|
val = nr64(ESPC_PHY_TYPE);
|
||||||
switch (np->port) {
|
switch (np->port) {
|
||||||
case 0:
|
case 0:
|
||||||
val = (val & ESPC_PHY_TYPE_PORT0) >>
|
val8 = (val & ESPC_PHY_TYPE_PORT0) >>
|
||||||
ESPC_PHY_TYPE_PORT0_SHIFT;
|
ESPC_PHY_TYPE_PORT0_SHIFT;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
val = (val & ESPC_PHY_TYPE_PORT1) >>
|
val8 = (val & ESPC_PHY_TYPE_PORT1) >>
|
||||||
ESPC_PHY_TYPE_PORT1_SHIFT;
|
ESPC_PHY_TYPE_PORT1_SHIFT;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
val = (val & ESPC_PHY_TYPE_PORT2) >>
|
val8 = (val & ESPC_PHY_TYPE_PORT2) >>
|
||||||
ESPC_PHY_TYPE_PORT2_SHIFT;
|
ESPC_PHY_TYPE_PORT2_SHIFT;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
val = (val & ESPC_PHY_TYPE_PORT3) >>
|
val8 = (val & ESPC_PHY_TYPE_PORT3) >>
|
||||||
ESPC_PHY_TYPE_PORT3_SHIFT;
|
ESPC_PHY_TYPE_PORT3_SHIFT;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -6143,9 +6143,9 @@ static int __devinit niu_pci_probe_sprom(struct niu *np)
|
||||||
np->port);
|
np->port);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
niudbg(PROBE, "SPROM: PHY type %llx\n", (unsigned long long) val);
|
niudbg(PROBE, "SPROM: PHY type %x\n", val8);
|
||||||
|
|
||||||
switch (val) {
|
switch (val8) {
|
||||||
case ESPC_PHY_TYPE_1G_COPPER:
|
case ESPC_PHY_TYPE_1G_COPPER:
|
||||||
/* 1G copper, MII */
|
/* 1G copper, MII */
|
||||||
np->flags &= ~(NIU_FLAGS_FIBER |
|
np->flags &= ~(NIU_FLAGS_FIBER |
|
||||||
|
@ -6175,8 +6175,7 @@ static int __devinit niu_pci_probe_sprom(struct niu *np)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
dev_err(np->device, PFX "Bogus SPROM phy type %llu\n",
|
dev_err(np->device, PFX "Bogus SPROM phy type %u\n", val8);
|
||||||
(unsigned long long) val);
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче