linux-4.7-rc3/drivers/net/wireless/ath/ath9k/htc_drv_main.c: 2 * strange tests ?

2016-06-13 Thread David Binderman
_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

linux-4.7-rc2/drivers/net/wireless/ath/ath6kl/wmi.c:2547]: (style) Redundant condition

2016-06-07 Thread David Binderman
net/wireless/ath/ath6kl/wmi.c:3521]: (style) Variable 'ret' is assigned a value that is never used. Regards David Binderman

linux-4.7-rc2/drivers/net/fjes/fjes_main.c:1346]: (style) Redundant condition

2016-06-07 Thread David Binderman
le: [drivers/net/fjes/fjes_main.c:1321]: (style) Variable 'max_epid' is assigned a value that is never used. [drivers/net/fjes/fjes_main.c:1320]: (style) Variable 'my_epid' is assigned a value that is never used. These two might be candidates for deletion. Regards David Binderman

linux-4.7-rc2/drivers/net/ethernet/freescale/fman/fman.c:2329]: (style) Redundant condition

2016-06-07 Thread David Binderman
_id] && (mfl <= fman->state->port_mfl[mac_id]))) { Suggest new code if ((!fman->state->port_mfl[mac_id]) || (mfl <= fman->state->port_mfl[mac_id])) { Regards David Binderman

linux-4.7-rc1/drivers/isdn/capi/capidrv.c:1707]: (style) Redundant condition

2016-05-30 Thread David Binderman
Hello there, linux-4.7-rc1/drivers/isdn/capi/capidrv.c:1707]: (style) Redundant condition: If 'EXPR == ' '', the comparison 'EXPR' is always true. Source code is while (*s && *s == ' ') s++; Suggest new code while (*s == ' ') s++; Regards David Binderman

drivers/net/ethernet/qlogic/qed/qed_dcbx.c:210: pointless test ?

2016-05-23 Thread David Binderman
Hello there, drivers/net/ethernet/qlogic/qed/qed_dcbx.c:210:16: warning: comparison is always false due to limited range of data type [-Wtype-limits] Source code is if (priority < 0) { but u8 tc, priority, priority_map; Regards David Binderman

linux-4.6/net/kcm/kcmsock.c:1508: bad if test ?

2016-05-16 Thread David Binderman
Hello there, linux-4.6/net/kcm/kcmsock.c:1508]: (style) Checking if unsigned variable 'copied' is less than zero. Source code is if (copied < 0) { but size_t copied; Suggest code rework. Regards David Binderman

drivers/net/phy/dp83867.c:167: possible bad if ?

2015-07-20 Thread David Binderman
-interface= PHY_INTERFACE_MODE_RGMII_ID)     (phydev-interface = PHY_INTERFACE_MODE_RGMII_RXID)) { Regards David Binderman -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More

RE: drivers/net/phy/dp83867.c:167: possible bad if ?

2015-07-20 Thread David Binderman
in future in your section of the Linux kernel, it might be a wise idea to add compiler flag -Wlogical-op to your builds. If all goes well, this extra compiler flag should have nothing to say. Just an idea. Regards David Binderman -- To unsubscribe from

linux-4.2-rc2/drivers/net/ethernet/brocade/bna/bfa_ioc.c:2843: out of bounds string access ?

2015-07-13 Thread David Binderman
/drivers/net/ethernet/brocade/ -name \*.h -print` linux-4.2-rc2/drivers/net/ethernet/brocade/bna/bfa_defs.h:    BFA_ADAPTER_MFG_NAME_LEN    = 8,   /*! manufacturer name length */ $ so the code attempts to read eight bytes from a seven byte string. Suggest code rework. Regards David Binderman

linux-4.2-rc2/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1993: possible bad error checking ?

2015-07-13 Thread David Binderman
; but     unsigned int entry; So the error checking from the function call looks broken to me. If the return value from the function call to jumbo_frm is a plain signed integer, suggest sanity check that *before* assigning into an unsigned integer. Regards David Binderman

RE: linux-4.2-rc1/samples/bpf/sockex3_kern.c: bad expression ?

2015-07-07 Thread David Binderman
Hello there Alexei, oops, yes. Could you please send a patch to fix it. Sorry, but I gave up trying to do kernel patches many years ago. Regards David Binderman -- To unsubscribe from this list: send the line

linux-4.2-rc1/samples/bpf/sockex3_kern.c: bad expression ?

2015-07-07 Thread David Binderman
Hello there, [linux-4.2-rc1/samples/bpf/sockex3_kern.c:268]: (style) Expression '(X 0xf0) == 0x4' is always false. Source code is    if ((verlen 0xF0) == 4) Maybe    if ((verlen 0xF0) == 0x40) Regards David Binderman -- To unsubscribe from