Re: [PATCH] mlxsw: spectrum_switchdev: remove duplicated check on multicast_enable

2018-04-24 Thread Colin Ian King
On 24/04/18 13:51, Ido Schimmel wrote: > On Tue, Apr 24, 2018 at 12:51:39PM +0100, Colin King wrote: >> From: Colin Ian King >> >> The check on bridge_port->bridge_device->multicast_enable is performed >> twice in two nested if statements. I can't see any reason for this, the >> second check is re

Re: [PATCH] mlxsw: spectrum_switchdev: remove duplicated check on multicast_enable

2018-04-24 Thread Ido Schimmel
On Tue, Apr 24, 2018 at 12:51:39PM +0100, Colin King wrote: > From: Colin Ian King > > The check on bridge_port->bridge_device->multicast_enable is performed > twice in two nested if statements. I can't see any reason for this, the > second check is redundant and can be removed. > > Detected by

[PATCH] mlxsw: spectrum_switchdev: remove duplicated check on multicast_enable

2018-04-24 Thread Colin King
From: Colin Ian King The check on bridge_port->bridge_device->multicast_enable is performed twice in two nested if statements. I can't see any reason for this, the second check is redundant and can be removed. Detected by cppcheck: drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c:1722]: