[PATCH 6/8] staging: et131x: Combine two if statements with same effect

Mark Einon mark.einon at gmail.com
Thu Sep 11 21:59:44 UTC 2014


Both these if statements have the same effect when true, so combine
them and save a few lines.

Signed-off-by: Mark Einon <mark.einon at gmail.com>
---
 drivers/staging/et131x/et131x.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
index 732432e..e9e269f 100644
--- a/drivers/staging/et131x/et131x.c
+++ b/drivers/staging/et131x/et131x.c
@@ -4137,10 +4137,8 @@ static void et131x_multicast(struct net_device *netdev)
 	else
 		adapter->packet_filter &= ~ET131X_PACKET_TYPE_PROMISCUOUS;
 
-	if (netdev->flags & IFF_ALLMULTI)
-		adapter->packet_filter |= ET131X_PACKET_TYPE_ALL_MULTICAST;
-
-	if (netdev_mc_count(netdev) > NIC_MAX_MCAST_LIST)
+	if ((netdev->flags & IFF_ALLMULTI) ||
+	    (netdev_mc_count(netdev) > NIC_MAX_MCAST_LIST))
 		adapter->packet_filter |= ET131X_PACKET_TYPE_ALL_MULTICAST;
 
 	if (netdev_mc_count(netdev) < 1) {
-- 
2.1.0



More information about the devel mailing list