lkml.org 
[lkml]   [2016]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
Subjectlinux-4.7-rc3/drivers/net/wireless/ath/ath9k/htc_drv_main.c: 2 * strange tests ?
Hello there,

1.

linux-4.7-rc3/drivers/net/wireless/ath/ath9k/htc_drv_main.c:798]:
(warning) Comparison of a boolean expression with an integer other
than 0 or 1.

Source code is

if (common->ani.caldone <= 0) {

but

drivers/net/wireless/ath/ath.h: bool caldone;

Maybe better code

if (!(common->ani.caldone)) {

2.

linux-4.7-rc3/drivers/net/wireless/ath/ath9k/htc_drv_main.c:851]:
(warning) Comparison of a boolean expression with an integer other
than 0 or 1.

if (common->ani.caldone <= 0)

Duplicate. Also in the same file:

drivers/net/wireless/ath/ath9k/htc_drv_main.c:228]: (style) Variable
'ret' is assigned a value that is never used.

This might be a case where a function return value is not checked.

Regards

David Binderman

\
 
 \ /
  Last update: 2016-06-13 19:21    [W:1.939 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site