* [PATCH] net: wireless: ath: ath9k: remove unnecessary code
@ 2017-05-09 3:48 Gustavo A. R. Silva
2017-05-09 11:32 ` Kalle Valo
0 siblings, 1 reply; 5+ messages in thread
From: Gustavo A. R. Silva @ 2017-05-09 3:48 UTC (permalink / raw)
To: QCA ath9k Development, Kalle Valo
Cc: linux-wireless, netdev, linux-kernel, Gustavo A. R. Silva
The name of an array used by itself will always return the array's address.
So this test will always evaluate as true.
Addresses-Coverity-ID: 1364903
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
drivers/net/wireless/ath/ath9k/eeprom.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c
index fb80ec8..5c3bc28 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom.c
@@ -143,7 +143,7 @@ bool ath9k_hw_nvram_read(struct ath_hw *ah, u32 off, u16 *data)
if (ah->eeprom_blob)
ret = ath9k_hw_nvram_read_firmware(ah->eeprom_blob, off, data);
- else if (pdata && !pdata->use_eeprom && pdata->eeprom_data)
+ else if (pdata && !pdata->use_eeprom)
ret = ath9k_hw_nvram_read_pdata(pdata, off, data);
else
ret = common->bus_ops->eeprom_read(common, off, data);
--
2.5.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] net: wireless: ath: ath9k: remove unnecessary code
2017-05-09 3:48 [PATCH] net: wireless: ath: ath9k: remove unnecessary code Gustavo A. R. Silva
@ 2017-05-09 11:32 ` Kalle Valo
2017-05-09 12:01 ` Gustavo A. R. Silva
0 siblings, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2017-05-09 11:32 UTC (permalink / raw)
To: Gustavo A. R. Silva; +Cc: ath9k-devel, linux-wireless, netdev, linux-kernel
"Gustavo A. R. Silva" <garsilva@embeddedor.com> writes:
> The name of an array used by itself will always return the array's address.
> So this test will always evaluate as true.
>
> Addresses-Coverity-ID: 1364903
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
> ---
> drivers/net/wireless/ath/ath9k/eeprom.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c
> index fb80ec8..5c3bc28 100644
> --- a/drivers/net/wireless/ath/ath9k/eeprom.c
> +++ b/drivers/net/wireless/ath/ath9k/eeprom.c
> @@ -143,7 +143,7 @@ bool ath9k_hw_nvram_read(struct ath_hw *ah, u32 off, u16 *data)
>
> if (ah->eeprom_blob)
> ret = ath9k_hw_nvram_read_firmware(ah->eeprom_blob, off, data);
> - else if (pdata && !pdata->use_eeprom && pdata->eeprom_data)
> + else if (pdata && !pdata->use_eeprom)
> ret = ath9k_hw_nvram_read_pdata(pdata, off, data);
> else
> ret = common->bus_ops->eeprom_read(common, off, data);
The patch may very well be valid (didn't check yet) but the commit log
is gibberish for me.
--
Kalle Valo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net: wireless: ath: ath9k: remove unnecessary code
2017-05-09 11:32 ` Kalle Valo
@ 2017-05-09 12:01 ` Gustavo A. R. Silva
2017-05-09 12:21 ` Kalle Valo
0 siblings, 1 reply; 5+ messages in thread
From: Gustavo A. R. Silva @ 2017-05-09 12:01 UTC (permalink / raw)
To: Kalle Valo; +Cc: ath9k-devel, linux-wireless, netdev, linux-kernel
Hi Kalle,
Quoting Kalle Valo <kvalo@qca.qualcomm.com>:
> "Gustavo A. R. Silva" <garsilva@embeddedor.com> writes:
>
>> The name of an array used by itself will always return the array's address.
>> So this test will always evaluate as true.
>>
>> Addresses-Coverity-ID: 1364903
>> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
>> ---
>> drivers/net/wireless/ath/ath9k/eeprom.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c
>> b/drivers/net/wireless/ath/ath9k/eeprom.c
>> index fb80ec8..5c3bc28 100644
>> --- a/drivers/net/wireless/ath/ath9k/eeprom.c
>> +++ b/drivers/net/wireless/ath/ath9k/eeprom.c
>> @@ -143,7 +143,7 @@ bool ath9k_hw_nvram_read(struct ath_hw *ah, u32
>> off, u16 *data)
>>
>> if (ah->eeprom_blob)
>> ret = ath9k_hw_nvram_read_firmware(ah->eeprom_blob, off, data);
>> - else if (pdata && !pdata->use_eeprom && pdata->eeprom_data)
>> + else if (pdata && !pdata->use_eeprom)
>> ret = ath9k_hw_nvram_read_pdata(pdata, off, data);
>> else
>> ret = common->bus_ops->eeprom_read(common, off, data);
>
> The patch may very well be valid (didn't check yet) but the commit log
> is gibberish for me.
>
Let me correct that and I'll send the patch again.
Thanks!
--
Gustavo A. R. Silva
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net: wireless: ath: ath9k: remove unnecessary code
2017-05-09 12:01 ` Gustavo A. R. Silva
@ 2017-05-09 12:21 ` Kalle Valo
2017-05-09 12:36 ` Gustavo A. R. Silva
0 siblings, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2017-05-09 12:21 UTC (permalink / raw)
To: Gustavo A. R. Silva; +Cc: ath9k-devel, linux-wireless, netdev, linux-kernel
"Gustavo A. R. Silva" <garsilva@embeddedor.com> writes:
> Hi Kalle,
>
> Quoting Kalle Valo <kvalo@qca.qualcomm.com>:
>
>> "Gustavo A. R. Silva" <garsilva@embeddedor.com> writes:
>>
>>> The name of an array used by itself will always return the array's address.
>>> So this test will always evaluate as true.
>>>
>>> Addresses-Coverity-ID: 1364903
>>> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
>>> ---
>>> drivers/net/wireless/ath/ath9k/eeprom.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c
>>> b/drivers/net/wireless/ath/ath9k/eeprom.c
>>> index fb80ec8..5c3bc28 100644
>>> --- a/drivers/net/wireless/ath/ath9k/eeprom.c
>>> +++ b/drivers/net/wireless/ath/ath9k/eeprom.c
>>> @@ -143,7 +143,7 @@ bool ath9k_hw_nvram_read(struct ath_hw *ah, u32
>>> off, u16 *data)
>>>
>>> if (ah->eeprom_blob)
>>> ret = ath9k_hw_nvram_read_firmware(ah->eeprom_blob, off, data);
>>> - else if (pdata && !pdata->use_eeprom && pdata->eeprom_data)
>>> + else if (pdata && !pdata->use_eeprom)
>>> ret = ath9k_hw_nvram_read_pdata(pdata, off, data);
>>> else
>>> ret = common->bus_ops->eeprom_read(common, off, data);
>>
>> The patch may very well be valid (didn't check yet) but the commit log
>> is gibberish for me.
>>
>
> Let me correct that and I'll send the patch again.
Thanks.
Also no need to have that long "net: wireless: ath:" prefix, "ath9k: "
or "ath10k: " is enough.
--
Kalle Valo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net: wireless: ath: ath9k: remove unnecessary code
2017-05-09 12:21 ` Kalle Valo
@ 2017-05-09 12:36 ` Gustavo A. R. Silva
0 siblings, 0 replies; 5+ messages in thread
From: Gustavo A. R. Silva @ 2017-05-09 12:36 UTC (permalink / raw)
To: Kalle Valo; +Cc: ath9k-devel, linux-wireless, netdev, linux-kernel
Quoting Kalle Valo <kvalo@qca.qualcomm.com>:
> "Gustavo A. R. Silva" <garsilva@embeddedor.com> writes:
>
>> Hi Kalle,
>>
>> Quoting Kalle Valo <kvalo@qca.qualcomm.com>:
>>
>>> "Gustavo A. R. Silva" <garsilva@embeddedor.com> writes:
>>>
>>>> The name of an array used by itself will always return the
>>>> array's address.
>>>> So this test will always evaluate as true.
>>>>
>>>> Addresses-Coverity-ID: 1364903
>>>> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
>>>> ---
>>>> drivers/net/wireless/ath/ath9k/eeprom.c | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c
>>>> b/drivers/net/wireless/ath/ath9k/eeprom.c
>>>> index fb80ec8..5c3bc28 100644
>>>> --- a/drivers/net/wireless/ath/ath9k/eeprom.c
>>>> +++ b/drivers/net/wireless/ath/ath9k/eeprom.c
>>>> @@ -143,7 +143,7 @@ bool ath9k_hw_nvram_read(struct ath_hw *ah, u32
>>>> off, u16 *data)
>>>>
>>>> if (ah->eeprom_blob)
>>>> ret = ath9k_hw_nvram_read_firmware(ah->eeprom_blob, off, data);
>>>> - else if (pdata && !pdata->use_eeprom && pdata->eeprom_data)
>>>> + else if (pdata && !pdata->use_eeprom)
>>>> ret = ath9k_hw_nvram_read_pdata(pdata, off, data);
>>>> else
>>>> ret = common->bus_ops->eeprom_read(common, off, data);
>>>
>>> The patch may very well be valid (didn't check yet) but the commit log
>>> is gibberish for me.
>>>
>>
>> Let me correct that and I'll send the patch again.
>
> Thanks.
>
> Also no need to have that long "net: wireless: ath:" prefix, "ath9k: "
> or "ath10k: " is enough.
>
I get it.
Thanks!
--
Gustavo A. R. Silva
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-05-09 12:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-09 3:48 [PATCH] net: wireless: ath: ath9k: remove unnecessary code Gustavo A. R. Silva
2017-05-09 11:32 ` Kalle Valo
2017-05-09 12:01 ` Gustavo A. R. Silva
2017-05-09 12:21 ` Kalle Valo
2017-05-09 12:36 ` Gustavo A. R. Silva
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).