drivers/net/wireless/iwlwifi/iwl-3945.c
Subsystems (2)
PATCH 1/1 drivers/net/wireless/iwlwifi/iwl-3945.c
G'day people
Coverity CID: 2265 NEGATIVE_RETURNS
"rate" is of an unsigned type, and the code requires a signed type. The following patch makes it so.
Only compile tested.
Signed-off-by: Darren Jenkins <darrenrjenkins@gmailcom>
drivers/net/wireless/iwlwifi/iwl-3945.c +1 -1
@@ -449,7 +449,7 @@ static void iwl3945_dbg_report_frame(struct iwl3945_priv *priv,if (print_summary) {char *title; -u32 rate; +int rate;if (hundred) title ="100Frames" ;
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
(Cc'ing linux-wireless)
Quoted 24 lines · Darren Jenkins\
G'day people
Coverity CID: 2265
NEGATIVE_RETURNS"rate" is of an unsigned type, and the code requires a signed type. The following patch makes it so.
Only compile tested.
Signed-off-by: Darren Jenkins <darrenrjenkins@gmailcom>
drivers/net/wireless/iwlwifi/iwl-3945.c +1
-1@@ -449,7 +449,7 @@ static void iwl3945_dbg_report_frame(struct iwl3945_priv *priv,if (print_summary) {char *title; -u32 rate; +int rate;if (hundred) title ="100Frames" ;
Signature · 8 lines
Filippo Zangheri GPG key ID: 0x6C1F2F2F -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
What about the format line in the IWL_DEBUG_RX that uses rate?
Also, please use an email subject that is more descriptive than just the filename. You should probably drop the "G'day..." line as well.
Thanks!
John
Quoted 31 lines · Darren Jenkins
G'day people
Coverity CID: 2265
NEGATIVE_RETURNS"rate" is of an unsigned type, and the code requires a signed type. The following patch makes it so.
Only compile tested.
Signed-off-by: Darren Jenkins <darrenrjenkins@gmailcom>
drivers/net/wireless/iwlwifi/iwl-3945.c +1
-2@@ -449,7 +449,7 @@ static void iwl3945_dbg_report_frame(struct iwl3945_priv *priv,if (print_summary) {char *title; -u32 rate; +int rate;if (hundred) title ="100Frames" ; --To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Signature · 6 lines
John W. Linville [email protected] -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · John W. Linville
What about the format line in the
IWL_DEBUG_RXthat uses rate?Also, please use an email subject that is more descriptive than just the filename. You should probably drop the "G'day..." line as well.
Side with John.
Quoted 18 lines · Darren Jenkins
Quoted 17 lines
G'day people
Coverity CID: 2265
NEGATIVE_RETURNS"rate" is of an unsigned type, and the code requires a signed type. The following patch makes it so.
Only compile tested.
Signed-off-by: Darren Jenkins <darrenrjenkins@gmailcom>
drivers/net/wireless/iwlwifi/iwl-3945.c +0
-0@@ -449,7 +449,7 @@ static void iwl3945_dbg_report_frame(struct iwl3945_priv *priv,
Quoted 7 lines
drivers/net/wireless/iwlwifi/iwl-3945.c static void iwl3945_dbg_report_frame(struct iwl3945_priv *priv, · line 455
Quoted 7 lines
drivers/net/wireless/iwlwifi/iwl-3945.c +1
-1if (print_summary) {char *title; -u32 rate; +int rate;if (hundred) title ="100Frames" ;
The rate variable here takes two roles: one for calculate the index (singed) and the other for the actual rate (unsigned). I think if you do want to fix this, create another local variable int idx to hold the index result.
Thanks,
-yi
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html