All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Balaji T K <balajitk@ti.com>
Cc: Chris Ball <chris@printf.net>,
	linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: [patch 1/2]  mmc: omap_hsmmc: remove a duplicative test
Date: Thu, 30 Jan 2014 12:15:18 +0000	[thread overview]
Message-ID: <20140130121518.GA10368@elgon.mountain> (raw)

Static checkers complain that testing for both "next" and "!next" is
duplicative.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 2a629fbde613..bfb0dbd052c0 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1235,8 +1235,7 @@ static int omap_hsmmc_pre_dma_transfer(struct omap_hsmmc_host *host,
 	}
 
 	/* Check if next job is already prepared */
-	if (next ||
-	    (!next && data->host_cookie != host->next_data.cookie)) {
+	if (next || data->host_cookie != host->next_data.cookie) {
 		dma_len = dma_map_sg(chan->device->dev, data->sg, data->sg_len,
 				     omap_hsmmc_get_dma_dir(host, data));
 

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Balaji T K <balajitk@ti.com>
Cc: Chris Ball <chris@printf.net>,
	linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: [patch 1/2]  mmc: omap_hsmmc: remove a duplicative test
Date: Thu, 30 Jan 2014 15:15:18 +0300	[thread overview]
Message-ID: <20140130121518.GA10368@elgon.mountain> (raw)

Static checkers complain that testing for both "next" and "!next" is
duplicative.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 2a629fbde613..bfb0dbd052c0 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1235,8 +1235,7 @@ static int omap_hsmmc_pre_dma_transfer(struct omap_hsmmc_host *host,
 	}
 
 	/* Check if next job is already prepared */
-	if (next ||
-	    (!next && data->host_cookie != host->next_data.cookie)) {
+	if (next || data->host_cookie != host->next_data.cookie) {
 		dma_len = dma_map_sg(chan->device->dev, data->sg, data->sg_len,
 				     omap_hsmmc_get_dma_dir(host, data));
 

             reply	other threads:[~2014-01-30 12:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-30 12:15 Dan Carpenter [this message]
2014-01-30 12:15 ` [patch 1/2] mmc: omap_hsmmc: remove a duplicative test Dan Carpenter
2014-01-30 12:59 ` Balaji T K
2014-01-30 13:11   ` Balaji T K

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140130121518.GA10368@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=balajitk@ti.com \
    --cc=chris@printf.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.