LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Roel Kluin <12o3l@tiscali.nl>
To: Alex Dubov <oakad@yahoo.com>
Cc: Pierre Ossman <drzeus-mmc@drzeus.cx>,
	lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH] MMC: DATA_CARRY is not boolean in tifm_sd_transfer_data() (was: MMC: logical-bitwise and confusion in  tifm_sd_transfer_data()?)
Date: Tue, 11 Mar 2008 09:00:41 +0100	[thread overview]
Message-ID: <47D63C29.90304@tiscali.nl> (raw)
In-Reply-To: <854975.87080.qm@web36710.mail.mud.yahoo.com>

Alex Dubov wrote:
> --- Pierre Ossman <drzeus-mmc@drzeus.cx> wrote:
> 
>> On Sun, 09 Mar 2008 21:31:08 +0100
>> Roel Kluin <12o3l@tiscali.nl> wrote:
>>
>>> from drivers/mmc/host/tifm_sd.c:183:
>>>
>>> if ((r_data->flags & MMC_DATA_WRITE)
>>>     && DATA_CARRY)
>>>
>>> shouldn't this be bit-wise &?
>> First off, I'm not the maintainer of that driver, Alex Dubov is.
>>
>> Second, the code seems broken, but not in the way you suggest. It should probably have been:
>>
>> if ((r_data->flags & MMC_DATA_WRITE)
>> 	&& (host->cmd_flags & DATA_CARRY))
>>
> 
> Yes, this is the intended meaning. Can you fix it yourself or should I send a separate patch?

Thanks,
---
DATA_CARRY is not boolean

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/drivers/mmc/host/tifm_sd.c b/drivers/mmc/host/tifm_sd.c
index 20d5c7b..1c14a18 100644
--- a/drivers/mmc/host/tifm_sd.c
+++ b/drivers/mmc/host/tifm_sd.c
@@ -180,7 +180,7 @@ static void tifm_sd_transfer_data(struct tifm_sd *host)
 			host->sg_pos++;
 			if (host->sg_pos == host->sg_len) {
 				if ((r_data->flags & MMC_DATA_WRITE)
-				    && DATA_CARRY)
+				    && (host->cmd_flags & DATA_CARRY))
 					writel(host->bounce_buf_data[0],
 					       host->dev->addr
 					       + SOCK_MMCSD_DATA);

  reply	other threads:[~2008-03-11  8:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-09 20:31 MMC: logical-bitwise and confusion in tifm_sd_transfer_data()? Roel Kluin
2008-03-10 12:56 ` Pierre Ossman
2008-03-11  7:40   ` Alex Dubov
2008-03-11  8:00     ` Roel Kluin [this message]
2008-03-15 15:01       ` [PATCH] MMC: DATA_CARRY is not boolean in tifm_sd_transfer_data() (was: MMC: logical-bitwise and confusion in tifm_sd_transfer_data()?) Pierre Ossman

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=47D63C29.90304@tiscali.nl \
    --to=12o3l@tiscali.nl \
    --cc=drzeus-mmc@drzeus.cx \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oakad@yahoo.com \
    --subject='Re: [PATCH] MMC: DATA_CARRY is not boolean in tifm_sd_transfer_data() (was: MMC: logical-bitwise and confusion in  tifm_sd_transfer_data()?)' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).