mirror of https://github.com/ipxe/ipxe.git
[etherfabric] Avoid unused variable warning in gcc 4.6
Reported-by: Ralph Giles <giles@thaumas.net> Tested-by: Ralph Giles <giles@thaumas.net> Signed-off-by: Michael Brown <mcb30@ipxe.org>pull/1/head
parent
eeba340f6f
commit
9e308d922d
|
@ -3073,11 +3073,9 @@ static void
|
||||||
clear_b0_fpga_memories ( struct efab_nic *efab)
|
clear_b0_fpga_memories ( struct efab_nic *efab)
|
||||||
{
|
{
|
||||||
efab_oword_t blanko, temp;
|
efab_oword_t blanko, temp;
|
||||||
efab_dword_t blankd;
|
|
||||||
int offset;
|
int offset;
|
||||||
|
|
||||||
EFAB_ZERO_OWORD ( blanko );
|
EFAB_ZERO_OWORD ( blanko );
|
||||||
EFAB_ZERO_DWORD ( blankd );
|
|
||||||
|
|
||||||
/* Clear the address region register */
|
/* Clear the address region register */
|
||||||
EFAB_POPULATE_OWORD_4 ( temp,
|
EFAB_POPULATE_OWORD_4 ( temp,
|
||||||
|
@ -3175,7 +3173,7 @@ static void
|
||||||
falcon_probe_nic_variant ( struct efab_nic *efab, struct pci_device *pci )
|
falcon_probe_nic_variant ( struct efab_nic *efab, struct pci_device *pci )
|
||||||
{
|
{
|
||||||
efab_oword_t altera_build, nic_stat;
|
efab_oword_t altera_build, nic_stat;
|
||||||
int is_pcie, fpga_version;
|
int fpga_version;
|
||||||
uint8_t revision;
|
uint8_t revision;
|
||||||
|
|
||||||
/* PCI revision */
|
/* PCI revision */
|
||||||
|
@ -3190,16 +3188,13 @@ falcon_probe_nic_variant ( struct efab_nic *efab, struct pci_device *pci )
|
||||||
/* MAC and PCI type */
|
/* MAC and PCI type */
|
||||||
falcon_read ( efab, &nic_stat, FCN_NIC_STAT_REG );
|
falcon_read ( efab, &nic_stat, FCN_NIC_STAT_REG );
|
||||||
if ( efab->pci_revision == FALCON_REV_B0 ) {
|
if ( efab->pci_revision == FALCON_REV_B0 ) {
|
||||||
is_pcie = 1;
|
|
||||||
efab->phy_10g = EFAB_OWORD_FIELD ( nic_stat, FCN_STRAP_10G );
|
efab->phy_10g = EFAB_OWORD_FIELD ( nic_stat, FCN_STRAP_10G );
|
||||||
}
|
}
|
||||||
else if ( efab->is_asic ) {
|
else if ( efab->is_asic ) {
|
||||||
is_pcie = EFAB_OWORD_FIELD ( nic_stat, FCN_STRAP_PCIE );
|
|
||||||
efab->phy_10g = EFAB_OWORD_FIELD ( nic_stat, FCN_STRAP_10G );
|
efab->phy_10g = EFAB_OWORD_FIELD ( nic_stat, FCN_STRAP_10G );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
int minor = EFAB_OWORD_FIELD ( altera_build, FCN_VER_MINOR );
|
int minor = EFAB_OWORD_FIELD ( altera_build, FCN_VER_MINOR );
|
||||||
is_pcie = 0;
|
|
||||||
efab->phy_10g = ( minor == 0x14 );
|
efab->phy_10g = ( minor == 0x14 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue