Commit 177c9235 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller

ethernet: tulip: avoid duplicate variable name on sparc

I recently added a variable called addr to tulip_init_one()
but for sparc there's already a variable called that half
way thru the function. Rename it to fix build.

Fixes: ca879317 ("ethernet: tulip: remove direct netdev->dev_addr writes")
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 850bfb91
...@@ -1605,7 +1605,7 @@ static int tulip_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1605,7 +1605,7 @@ static int tulip_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
if (sum == 0 || sum == 6*0xff) { if (sum == 0 || sum == 6*0xff) {
#if defined(CONFIG_SPARC) #if defined(CONFIG_SPARC)
struct device_node *dp = pci_device_to_OF_node(pdev); struct device_node *dp = pci_device_to_OF_node(pdev);
const unsigned char *addr; const unsigned char *addr2;
int len; int len;
#endif #endif
eeprom_missing = 1; eeprom_missing = 1;
...@@ -1614,9 +1614,9 @@ static int tulip_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1614,9 +1614,9 @@ static int tulip_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
addr[i] = last_phys_addr[i] + 1; addr[i] = last_phys_addr[i] + 1;
eth_hw_addr_set(dev, addr); eth_hw_addr_set(dev, addr);
#if defined(CONFIG_SPARC) #if defined(CONFIG_SPARC)
addr = of_get_property(dp, "local-mac-address", &len); addr2 = of_get_property(dp, "local-mac-address", &len);
if (addr && len == ETH_ALEN) if (addr2 && len == ETH_ALEN)
eth_hw_addr_set(dev, addr); eth_hw_addr_set(dev, addr2);
#endif #endif
#if defined(__i386__) || defined(__x86_64__) /* Patch up x86 BIOS bug. */ #if defined(__i386__) || defined(__x86_64__) /* Patch up x86 BIOS bug. */
if (last_irq) if (last_irq)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment