Bug 80801 - staging/bcm/Misc.c:1153: bad if test ?
Summary: staging/bcm/Misc.c:1153: bad if test ?
Status: RESOLVED CODE_FIX
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: 2014-07-21 10:57 UTC by David Binderman
Modified: 2014-07-29 15:27 UTC (History)
2 users (show)

See Also:
Kernel Version: 3.16-rc6
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description David Binderman 2014-07-21 10:57:07 UTC
[linux-3.16-rc6/drivers/staging/bcm/Misc.c:1153] -> [linux-3.16-rc6/drivers/staging/bcm/Misc.c:1156]: (style) Mismatching assignment and comparison, comparison 'reporting_mode==1' is always false.

Source code is

    reporting_mode = ntohl(psAdapter->pstargetparams->m_u32PowerSavingModeOptions) & 0x02;
    // ...

    if (reporting_mode == TRUE) {

Something ANDed with 0x02 can't be equal 1. Suggest code rework.
Comment 1 Andrey Utkin 2014-07-23 11:20:44 UTC
Thanks, patch submitted:

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