Bug 46571 - drivers/staging/csr/unifi_pdu_processing.c:2722: bad if test
Summary: drivers/staging/csr/unifi_pdu_processing.c:2722: bad if test
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Staging (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_staging@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-28 17:11 UTC by David Binderman
Modified: 2012-08-28 17:42 UTC (History)
0 users

See Also:
Kernel Version: 3.6-rc3
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description David Binderman 2012-08-28 17:11:19 UTC
I just tried to compile the Linux kernel 3.6-rc3
with the extra compiler flag -Wlogical-op

The compiler said
drivers/staging/csr/unifi_pdu_processing.c: In function ‘uf_handle_uspframes_delivery’:
drivers/staging/csr/unifi_pdu_processing.c:2722:9: warning: logical ‘or’ of collectively exhaustive tests is always true [-Wlogical-op]
         if ((staInfo->timSet != CSR_WIFI_TIM_RESET) || (staInfo->timSet != CSR_WIFI_TIM_RESETTING)) {
         ^
but

$ fgrep CSR_WIFI_TIM_RESET drivers/staging/csr/unifi_priv.h
#define CSR_WIFI_TIM_RESET       0
#define CSR_WIFI_TIM_RESETTING   2

Suggest change || to &&
Comment 1 Greg Kroah-Hartman 2012-08-28 17:42:26 UTC
On Tue, Aug 28, 2012 at 05:11:19PM +0000, bugzilla-daemon@bugzilla.kernel.org wrote:
>            Summary: drivers/staging/csr/unifi_pdu_processing.c:2722: bad
>                     if test

Please send a patch through email for this.

Note You need to log in before you can comment on or make changes to this bug.