net: wireless: ath: ath9k: remove unnecessary code
Subsystems (3)
PATCH 1/1 net: wireless: ath: ath9k: remove unnecessary code
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
--- drivers/net/wireless/ath/ath9k/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath9k/eeprom.c +1 -1
@@ -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);
Signature · 1 line
2.5.0
Quoted 14 lines · 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 <[email protected]>--- drivers/net/wireless/ath/ath9k/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/wireless/ath/ath9k/eeprom.c +0
-0
drivers/net/wireless/ath/ath9k/eeprom.c bool ath9k_hw_nvram_read(struct ath_hw *ah, u32 off, u16 *data) · line 149
Quoted 8 lines
drivers/net/wireless/ath/ath9k/eeprom.c +1
-1@@ -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.
Signature · 1 line
Kalle Valo
Hi Kalle,
Quoting Kalle Valo <[email protected]>:
Quoted 18 lines
Quoted 16 lines · 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 <[email protected]>--- drivers/net/wireless/ath/ath9k/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/wireless/ath/ath9k/eeprom.c +0
-0@@ -143,7 +143,7 @@ bool ath9k_hw_nvram_read(struct ath_hw *ah, u32 off, u16 *data)
Quoted 11 lines
Quoted 7 lines
drivers/net/wireless/ath/ath9k/eeprom.c +1
-1if (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
Quoted 35 lines · Gustavo A. R. Silva
Hi Kalle,
Quoting Kalle Valo <[email protected]>:
Quoted 19 lines
Quoted 17 lines · 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 <[email protected]>--- drivers/net/wireless/ath/ath9k/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/wireless/ath/ath9k/eeprom.c +0
-0@@ -143,7 +143,7 @@ bool ath9k_hw_nvram_read(struct ath_hw *ah, u32 off, u16 *data)Quoted 11 lines
Quoted 7 lines
drivers/net/wireless/ath/ath9k/eeprom.c +1
-1if (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.
Quoted 1 line
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.
Signature · 1 line
Kalle Valo
Quoting Kalle Valo <[email protected]>:
Quoted 37 lines
Quoted 35 lines · Gustavo A. R. Silva
Hi Kalle,
Quoting Kalle Valo <[email protected]>:
Quoted 30 lines
Quoted 23 lines · 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 <[email protected]>--- drivers/net/wireless/ath/ath9k/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/wireless/ath/ath9k/eeprom.c +1
-1@@ -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 Quoted 1 line
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.
Quoted 7 lines
Quoted 1 line
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