linux-5.0-rc1/drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:412]: (style) Expression is always false

2019-01-07 Thread David Binderman
fo->PTModeSS = 2; else if (pRaInfo->HighestRate > 0x0b) pRaInfo->PTModeSS = 1; Suggest code rework. Regards David Binderman ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.or

drivers/staging/media/ipu3/ipu3-css.c:1831: bad compare ?

2019-01-07 Thread David Binderman
index < 0) { dev_err(css->dev, "failed to find suitable binary\n"); return -EINVAL; } Suggest sanity check return value from function first, then if it is ok, assign it to an unsigned variable. Regards David Binderman

linux-5.3-rc4/drivers/staging/comedi/drivers/dt3000.c:373: (error) Signed integer overflow for expression 'divider*base'

2019-08-12 Thread David Binderman
rework code to use longs. Regards David Binderman time-_Base seems to be 50 or 100. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

drivers/staging/wilc1000/host_interface.c:: 6 * pointless test ?

2017-10-23 Thread David Binderman
ue due to limited range of data type [-Wtype-limits] Regards David Binderman ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

linux-4.18-rc8/tools/hv/hv_kvp_daemon.c:289: dead code block ?

2018-08-06 Thread David Binderman
i].key, key_size)) continue; /* * Found a match; just move the remaining * entries up. */ if (i == num_records) { Regards David Binderman ___ devel

linux-4.1-rc1/drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c:424: bad if test ?

2015-04-27 Thread David Binderman
estRate> 0x0b)     pRaInfo->PTModeSS = 2;     else if (pRaInfo->HighestRate> 0x0b)     pRaInfo->PTModeSS = 1; Regards David Binderman ___ devel mailing list de...

linux-4.12-rc1/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/string_support.h:76: cart before the horse ?

2017-05-14 Thread David Binderman
++ix) /*Nothing else to do*/; Regards David Binderman ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

linux-4.12-rc1/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c:2966: cart before the horse ?

2017-05-14 Thread David Binderman
Hello there, linux-4.12-rc1/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c:2966]: (style) Array index 'i' is used before limits check. Source code is while (szLine[i] != '{' && i < strlen(szLine))

staging/dgap/dgap.c:981: bad if test ?

2015-01-22 Thread David Binderman
David Binderman ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

RE: staging/dgap/dgap.c:981: bad if test ?

2015-01-22 Thread David Binderman
!= PORTS ||     module_type != MODEM) { I used the static analyser cppcheck to find these two bugs, but you might be able to find similar problems by using gcc compiler flag -Wlogical-op. Regards David Binderman > Date: Thu, 22 Jan 2015 13:14

RE: staging/dgap/dgap.c:981: bad if test ?

2015-01-22 Thread David Binderman
Hello there, > On Thu, Jan 22, 2015 at 10:20:44AM +0000, David Binderman wrote: >> I used the static analyser cppcheck to find these two bugs, but >> you might be able to find similar problems by using gcc compiler >> flag -Wlogical-o

drivers/staging/ks7010/ks_wlan_net.c:1287: suspicious if ?

2016-08-01 Thread David Binderman
else return -EINVAL; } else if (enabled) { /* 2 */ I am not sure of a suitable fix for this. Regards David Binderman ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

linux-4.8-rc3/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c:3533: pointless test ?

2016-08-22 Thread David Binderman
Config.HCIExtensionVer >= 1) { Suggest remove second test. Regards David Binderman ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

linux-4.9-rc1/drivers/staging/lustre/lustre/osc/osc_request.c:973: always false test ?

2016-10-17 Thread David Binderman
Hello there, linux-4.9-rc1/drivers/staging/lustre/lustre/osc/osc_request.c:973]: (style) Checking if unsigned variable 'cli.cl_avail_grant' is less than zero. Source code is    if (cli->cl_avail_grant < 0) { Suggest code rework. Regards