public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dma/timberdale: simplify conditional
@ 2010-10-07 22:48 Nicolas Kaiser
  2010-10-08 12:22 ` Jack Stone
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Kaiser @ 2010-10-07 22:48 UTC (permalink / raw)
  To: Dan Williams; +Cc: linux-kernel

Simplify: ((a && b) || (!a && !b)) => (a == b)

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

diff --git a/drivers/dma/timb_dma.c b/drivers/dma/timb_dma.c
index 2ec1ed5..3b88a4e 100644
--- a/drivers/dma/timb_dma.c
+++ b/drivers/dma/timb_dma.c
@@ -759,7 +759,7 @@ static int __devinit td_probe(struct platform_device *pdev)
 			pdata->channels + i;
 
 		/* even channels are RX, odd are TX */
-		if (((i % 2) && pchan->rx) || (!(i % 2) && !pchan->rx)) {
+		if ((i % 2) == pchan->rx) {
 			dev_err(&pdev->dev, "Wrong channel configuration\n");
 			err = -EINVAL;
 			goto err_tasklet_kill;
-- 
1.7.2.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-10-08 13:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-07 22:48 [PATCH] dma/timberdale: simplify conditional Nicolas Kaiser
2010-10-08 12:22 ` Jack Stone
2010-10-08 12:25   ` Jack Stone
2010-10-08 12:48     ` driver or calculation of load average wrong ? Frank Salomon
2010-10-08 12:52   ` [PATCH] dma/timberdale: simplify conditional Jack Stone

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