Re: [PATCH 44/45] iwlwifi: fix printf specifier

2015-12-22 Thread Joe Perches
On Mon, 2015-12-21 at 22:50 +0200, Emmanuel Grumbach wrote:
> Smatch warned about a bad specifier being used. Fix that.

I see nothing here other than a signed/unsigned
issue that shouldn't need fixing.  The conversion
from hex to decimal may not be useful.

> Signed-off-by: Emmanuel Grumbach 
> ---
>  drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c 
> b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c
> index b395854..c15f5be 100644
> --- a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c
> +++ b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c
> @@ -454,11 +454,11 @@ static void iwl_eeprom_enhanced_txpower(struct device 
> *dev,
>    TXP_CHECK_AND_PRINT(COMMON_TYPE),
>    txp->flags);
>   IWL_DEBUG_EEPROM(dev,
> -  "\t\t chain_A: 0x%02x chain_B: 0X%02x chain_C: 
> 0X%02x\n",
> +  "\t\t chain_A: %d chain_B: %d chain_C: %d\n",
>    txp->chain_a_max, txp->chain_b_max,
>    txp->chain_c_max);
>   IWL_DEBUG_EEPROM(dev,
> -  "\t\t MIMO2: 0x%02x MIMO3: 0x%02x High 
> 20_on_40: 0x%02x Low 20_on_40: 0x%02x\n",
> +  "\t\t MIMO2: %d MIMO3: %d High 20_on_40: 
> 0x%02x Low 20_on_40: 0x%02x\n",
>    txp->mimo2_max, txp->mimo3_max,
>    ((txp->delta_20_in_40 & 0xf0) >> 4),
>    (txp->delta_20_in_40 & 0x0f));

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 44/45] iwlwifi: fix printf specifier

2015-12-22 Thread Grumbach, Emmanuel


On 12/23/2015 06:08 AM, Joe Perches wrote:
> On Mon, 2015-12-21 at 22:50 +0200, Emmanuel Grumbach wrote:
>> Smatch warned about a bad specifier being used. Fix that.
> I see nothing here other than a signed/unsigned
> issue that shouldn't need fixing.  The conversion
> from hex to decimal may not be useful.

Yes so maybe I could just use the 0x%x specifier since
printk-formats.txt seems to say that 0x%x is good for s32 as well. Seems
that the "02" makes it "unsigned only".
Printing those values in hexadecimal is annoying anyway since we usually
express Tx power in decimal.
Thanks for pointing that out!

>> Signed-off-by: Emmanuel Grumbach 
>> ---
>>  drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c 
>> b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c
>> index b395854..c15f5be 100644
>> --- a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c
>> +++ b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c
>> @@ -454,11 +454,11 @@ static void iwl_eeprom_enhanced_txpower(struct device 
>> *dev,
>>   TXP_CHECK_AND_PRINT(COMMON_TYPE),
>>   txp->flags);
>>  IWL_DEBUG_EEPROM(dev,
>> - "\t\t chain_A: 0x%02x chain_B: 0X%02x chain_C: 
>> 0X%02x\n",
>> + "\t\t chain_A: %d chain_B: %d chain_C: %d\n",
>>   txp->chain_a_max, txp->chain_b_max,
>>   txp->chain_c_max);
>>  IWL_DEBUG_EEPROM(dev,
>> - "\t\t MIMO2: 0x%02x MIMO3: 0x%02x High 
>> 20_on_40: 0x%02x Low 20_on_40: 0x%02x\n",
>> + "\t\t MIMO2: %d MIMO3: %d High 20_on_40: 
>> 0x%02x Low 20_on_40: 0x%02x\n",
>>   txp->mimo2_max, txp->mimo3_max,
>>   ((txp->delta_20_in_40 & 0xf0) >> 4),
>>   (txp->delta_20_in_40 & 0x0f));
>

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 44/45] iwlwifi: fix printf specifier

2015-12-21 Thread Emmanuel Grumbach
Smatch warned about a bad specifier being used. Fix that.

Signed-off-by: Emmanuel Grumbach 
---
 drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c 
b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c
index b395854..c15f5be 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c
@@ -454,11 +454,11 @@ static void iwl_eeprom_enhanced_txpower(struct device 
*dev,
 TXP_CHECK_AND_PRINT(COMMON_TYPE),
 txp->flags);
IWL_DEBUG_EEPROM(dev,
-"\t\t chain_A: 0x%02x chain_B: 0X%02x chain_C: 
0X%02x\n",
+"\t\t chain_A: %d chain_B: %d chain_C: %d\n",
 txp->chain_a_max, txp->chain_b_max,
 txp->chain_c_max);
IWL_DEBUG_EEPROM(dev,
-"\t\t MIMO2: 0x%02x MIMO3: 0x%02x High 
20_on_40: 0x%02x Low 20_on_40: 0x%02x\n",
+"\t\t MIMO2: %d MIMO3: %d High 20_on_40: 
0x%02x Low 20_on_40: 0x%02x\n",
 txp->mimo2_max, txp->mimo3_max,
 ((txp->delta_20_in_40 & 0xf0) >> 4),
 (txp->delta_20_in_40 & 0x0f));
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html