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

From: David Binderman <hidden>
Date: 2016-06-07 09:41:12
Also in: lkml

Hello there,

linux-4.7-rc2/drivers/net/ethernet/freescale/fman/fman.c:2329]:
(style) Redundant condition: fman.state.port_mfl[mac_id]. '!A || (A &&
B)' is equivalent to '!A || B'

Source code is

    if ((!fman->state->port_mfl[mac_id]) ||
        (fman->state->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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help