public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] icom: fixing a if clause spaghetti
@ 2009-05-28 20:54 Breno Leitao
  0 siblings, 0 replies; only message in thread
From: Breno Leitao @ 2009-05-28 20:54 UTC (permalink / raw)
  To: akpm, alan; +Cc: Linux Kernel Mailing List

adapter->version can only be ADAPTER_V2 or ADAPTER_V1. So, 
that OR operand in the "if" clause is non-sense and can be removed.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
---
diff --git a/drivers/serial/icom.c b/drivers/serial/icom.c
index a461b3b..fd5fd23 100644
--- a/drivers/serial/icom.c
+++ b/drivers/serial/icom.c
@@ -408,7 +408,7 @@ static void load_code(struct icom_port *icom_port)
 	release_firmware(fw);
 
 	/* Set Hardware level */
-	if ((icom_port->adapter->version | ADAPTER_V2) == ADAPTER_V2)
+	if (icom_port->adapter->version == ADAPTER_V2)
 		writeb(V2_HARDWARE, &(icom_port->dram->misc_flags));
 
 	/* Start the processor in Adapter */
@@ -861,7 +861,7 @@ static irqreturn_t icom_interrupt(int irq, void *dev_id)
 	/* find icom_port for this interrupt */
 	icom_adapter = (struct icom_adapter *) dev_id;
 
-	if ((icom_adapter->version | ADAPTER_V2) == ADAPTER_V2) {
+	if (icom_adapter->version == ADAPTER_V2) {
 		int_reg = icom_adapter->base_addr + 0x8024;
 
 		adapter_interrupts = readl(int_reg);

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-05-28 20:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-28 20:54 [PATCH 1/1] icom: fixing a if clause spaghetti Breno Leitao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox