Skip to content

Commit

Permalink
ethernet: tulip: avoid duplicate variable name on sparc
Browse files Browse the repository at this point in the history
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: ca87931 ("ethernet: tulip: remove direct netdev->dev_addr writes")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jakub Kicinski authored and David S. Miller committed Oct 12, 2021
1 parent 850bfb9 commit 177c923
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/ethernet/dec/tulip/tulip_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 defined(CONFIG_SPARC)
struct device_node *dp = pci_device_to_OF_node(pdev);
const unsigned char *addr;
const unsigned char *addr2;
int len;
#endif
eeprom_missing = 1;
Expand All @@ -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;
eth_hw_addr_set(dev, addr);
#if defined(CONFIG_SPARC)
addr = of_get_property(dp, "local-mac-address", &len);
if (addr && len == ETH_ALEN)
eth_hw_addr_set(dev, addr);
addr2 = of_get_property(dp, "local-mac-address", &len);
if (addr2 && len == ETH_ALEN)
eth_hw_addr_set(dev, addr2);
#endif
#if defined(__i386__) || defined(__x86_64__) /* Patch up x86 BIOS bug. */
if (last_irq)
Expand Down

0 comments on commit 177c923

Please sign in to comment.