_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
is assigned a value that is never used.
[drivers/net/wireless/ath/ath6kl/wmi.c:3521]: (style) Variable 'ret'
is assigned a value that is never used.
Regards
David Binderman
Also in the same file:
[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
ate->port_mfl[mac_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
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
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
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
r to detect this problem 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
aybe
if ((phydev->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 netde
; 0))
goto dma_map_err;
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.
Re
linux-4.2-rc2/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
Da
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
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
13 matches
Mail list logo