* [PATCH] mt76: fix compilation warning in mt76_eeprom_override()
@ 2019-12-16 18:32 Lorenzo Bianconi
2019-12-18 8:30 ` Kalle Valo
0 siblings, 1 reply; 4+ messages in thread
From: Lorenzo Bianconi @ 2019-12-16 18:32 UTC (permalink / raw)
To: nbd; +Cc: linux-wireless, lorenzo.bianconi, ryder.lee, shayne.chen
Fix the following compilation warning in mt76_eeprom_override routine
when CONFIG_OF is not set and label 'out' is not actually used
drivers/net/wireless/mediatek/mt76/eeprom.c: In function ‘mt76_eeprom_override’:
drivers/net/wireless/mediatek/mt76/eeprom.c:100:1: warning: label ‘out’ defined but not used [-Wunused-label]
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/wireless/mediatek/mt76/eeprom.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/eeprom.c b/drivers/net/wireless/mediatek/mt76/eeprom.c
index 8f2693748faf..c236e303ccfd 100644
--- a/drivers/net/wireless/mediatek/mt76/eeprom.c
+++ b/drivers/net/wireless/mediatek/mt76/eeprom.c
@@ -87,17 +87,14 @@ mt76_eeprom_override(struct mt76_dev *dev)
{
#ifdef CONFIG_OF
struct device_node *np = dev->dev->of_node;
- const u8 *mac;
+ const u8 *mac = NULL;
- if (!np)
- goto out;
-
- mac = of_get_mac_address(np);
- if (!IS_ERR(mac))
+ if (np)
+ mac = of_get_mac_address(np);
+ if (!IS_ERR_OR_NULL(mac))
ether_addr_copy(dev->macaddr, mac);
#endif
-out:
if (!is_valid_ether_addr(dev->macaddr)) {
eth_random_addr(dev->macaddr);
dev_info(dev->dev,
--
2.21.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] mt76: fix compilation warning in mt76_eeprom_override()
2019-12-16 18:32 [PATCH] mt76: fix compilation warning in mt76_eeprom_override() Lorenzo Bianconi
@ 2019-12-18 8:30 ` Kalle Valo
2019-12-18 8:58 ` Lorenzo Bianconi
0 siblings, 1 reply; 4+ messages in thread
From: Kalle Valo @ 2019-12-18 8:30 UTC (permalink / raw)
To: Lorenzo Bianconi
Cc: nbd, linux-wireless, lorenzo.bianconi, ryder.lee, shayne.chen
Lorenzo Bianconi <lorenzo@kernel.org> writes:
> Fix the following compilation warning in mt76_eeprom_override routine
> when CONFIG_OF is not set and label 'out' is not actually used
>
> drivers/net/wireless/mediatek/mt76/eeprom.c: In function ‘mt76_eeprom_override’:
> drivers/net/wireless/mediatek/mt76/eeprom.c:100:1: warning: label ‘out’ defined but not used [-Wunused-label]
>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
What commit introduced this? Or is this an old issue?
--
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mt76: fix compilation warning in mt76_eeprom_override()
2019-12-18 8:30 ` Kalle Valo
@ 2019-12-18 8:58 ` Lorenzo Bianconi
2019-12-18 9:00 ` Kalle Valo
0 siblings, 1 reply; 4+ messages in thread
From: Lorenzo Bianconi @ 2019-12-18 8:58 UTC (permalink / raw)
To: Kalle Valo; +Cc: nbd, linux-wireless, lorenzo.bianconi, ryder.lee, shayne.chen
[-- Attachment #1: Type: text/plain, Size: 851 bytes --]
> Lorenzo Bianconi <lorenzo@kernel.org> writes:
>
> > Fix the following compilation warning in mt76_eeprom_override routine
> > when CONFIG_OF is not set and label 'out' is not actually used
> >
> > drivers/net/wireless/mediatek/mt76/eeprom.c: In function ‘mt76_eeprom_override’:
> > drivers/net/wireless/mediatek/mt76/eeprom.c:100:1: warning: label ‘out’ defined but not used [-Wunused-label]
> >
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
>
> What commit introduced this? Or is this an old issue?
Hi Kalle,
I did not added the Fixed tag since this commit is currently just on Felix's tree:
commit c203e25590b472eb561e1c53898a7f7b5c734563
mt76: fix possible undetected invalid MAC address
Regards,
Lorenzo
>
> --
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mt76: fix compilation warning in mt76_eeprom_override()
2019-12-18 8:58 ` Lorenzo Bianconi
@ 2019-12-18 9:00 ` Kalle Valo
0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2019-12-18 9:00 UTC (permalink / raw)
To: Lorenzo Bianconi
Cc: nbd, linux-wireless, lorenzo.bianconi, ryder.lee, shayne.chen
Lorenzo Bianconi <lorenzo@kernel.org> writes:
>> Lorenzo Bianconi <lorenzo@kernel.org> writes:
>>
>> > Fix the following compilation warning in mt76_eeprom_override routine
>> > when CONFIG_OF is not set and label 'out' is not actually used
>> >
>> > drivers/net/wireless/mediatek/mt76/eeprom.c: In function ‘mt76_eeprom_override’:
>> > drivers/net/wireless/mediatek/mt76/eeprom.c:100:1: warning: label
>> > ‘out’ defined but not used [-Wunused-label]
>> >
>> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
>>
>> What commit introduced this? Or is this an old issue?
>
> Hi Kalle,
>
> I did not added the Fixed tag since this commit is currently just on Felix's tree:
>
> commit c203e25590b472eb561e1c53898a7f7b5c734563
> mt76: fix possible undetected invalid MAC address
Ok, so no need to push to wireless-drivers then.
--
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-12-18 9:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-16 18:32 [PATCH] mt76: fix compilation warning in mt76_eeprom_override() Lorenzo Bianconi
2019-12-18 8:30 ` Kalle Valo
2019-12-18 8:58 ` Lorenzo Bianconi
2019-12-18 9:00 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).