diff mbox

ehea: simplify conditional

Message ID 20101008011450.0126ffc0@absol.kitzblitz
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Nicolas Kaiser Oct. 7, 2010, 11:14 p.m. UTC
Simplify: ((a && b) || (!a && !b)) => (a == b)

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
---
 drivers/net/ehea/ehea_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Breno Leitao Oct. 7, 2010, 11:49 p.m. UTC | #1
On 10/07/2010 08:14 PM, Nicolas Kaiser wrote:
> Simplify: ((a&&  b) || (!a&&  !b)) =>  (a == b)
>
> Signed-off-by: Nicolas Kaiser<nikai@nikai.net>
Acked-by: Breno Leitao <leitao@linux.vnet.ibm.com>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Oct. 9, 2010, 4:21 p.m. UTC | #2
From: Breno Leitao <leitao@linux.vnet.ibm.com>
Date: Thu, 07 Oct 2010 20:49:05 -0300

> On 10/07/2010 08:14 PM, Nicolas Kaiser wrote:
>> Simplify: ((a&&  b) || (!a&&  !b)) =>  (a == b)
>>
>> Signed-off-by: Nicolas Kaiser<nikai@nikai.net>
> Acked-by: Breno Leitao <leitao@linux.vnet.ibm.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 190fb69..ef305f3 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -1914,7 +1914,7 @@  static void ehea_promiscuous(struct net_device *dev, int enable)
 	struct hcp_ehea_port_cb7 *cb7;
 	u64 hret;
 
-	if ((enable && port->promisc) || (!enable && !port->promisc))
+	if (enable == port->promisc)
 		return;
 
 	cb7 = (void *)get_zeroed_page(GFP_ATOMIC);