diff options
author | David Bauer <mail@david-bauer.net> | 2021-07-29 20:28:10 +0200 |
---|---|---|
committer | David Bauer <mail@david-bauer.net> | 2021-07-29 20:49:57 +0200 |
commit | a57d7c29a40ae5b691deafcc267652b918159bc0 (patch) | |
tree | ff5c606c3e3118b77c79890b032ce89d1853f7ee /target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch | |
parent | e8e2b88f5feb852904598cbe8746cc5b3c0022ab (diff) | |
download | upstream-a57d7c29a40ae5b691deafcc267652b918159bc0.tar.gz upstream-a57d7c29a40ae5b691deafcc267652b918159bc0.tar.bz2 upstream-a57d7c29a40ae5b691deafcc267652b918159bc0.zip |
generic: fix build warning
Fixes a unused variable warning:
drivers/of/of_net.c: In function 'of_get_mac_address_mtd':
drivers/of/of_net.c:92:19: warning: unused variable 'prop' [-Wunused-variable]
Signed-off-by: David Bauer <mail@david-bauer.net>
Diffstat (limited to 'target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch')
-rw-r--r-- | target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch b/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch index cc5cd96ead..71d794e83b 100644 --- a/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch +++ b/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch @@ -34,7 +34,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> { struct property *pp = of_find_property(np, name, NULL); -@@ -78,6 +79,56 @@ static const void *of_get_mac_addr_nvmem +@@ -78,6 +79,55 @@ static const void *of_get_mac_addr_nvmem return mac; } @@ -43,7 +43,6 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> +#ifdef CONFIG_MTD + struct platform_device *pdev = of_find_device_by_node(np); + struct device_node *mtd_np = NULL; -+ struct property *prop; + size_t retlen; + int size, ret; + struct mtd_info *mtd; @@ -91,7 +90,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> /** * Search the device tree for the best MAC address to use. 'mac-address' is * checked first, because that is supposed to contain to "most recent" MAC -@@ -98,6 +149,10 @@ static const void *of_get_mac_addr_nvmem +@@ -98,6 +148,10 @@ static const void *of_get_mac_addr_nvmem * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists * but is all zeros. * @@ -102,7 +101,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> * Return: Will be a valid pointer on success and ERR_PTR in case of error. */ const void *of_get_mac_address(struct device_node *np) -@@ -116,6 +171,10 @@ const void *of_get_mac_address(struct de +@@ -116,6 +170,10 @@ const void *of_get_mac_address(struct de if (addr) return addr; |