From: Andrei Warkentin <andrey.warkentin@gmail.com>
To: linux-mmc@vger.kernel.org
Cc: Philip Rakity <prakity@marvell.com>,
andreiw@vmware.com, Andrei Warkentin <andrey.warkentin@gmail.com>
Subject: [PATCH] MMC: ext_csd.raw_* used in comparison but never set
Date: Fri, 23 Sep 2011 00:25:30 -0400 [thread overview]
Message-ID: <1316751930-7478-1-git-send-email-andrey.warkentin@gmail.com> (raw)
f39b2dd9d065151a04f5996656d1f27a7eb32d45 added code to
only compare read-only ext_csd fields in bus width
testing code, yet it's comparing some fields that are
never set.
The affected fields are ext_csd.raw_erased_mem_count and
ext_csd.raw_partition_support.
Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
---
drivers/mmc/core/mmc.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 5700b1c..bb33832 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -359,6 +359,7 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd)
* card has the Enhanced area enabled. If so, export enhanced
* area offset and size to user by adding sysfs interface.
*/
+ card->ext_csd.raw_partition_support = ext_csd[EXT_CSD_PARTITION_SUPPORT];
if ((ext_csd[EXT_CSD_PARTITION_SUPPORT] & 0x2) &&
(ext_csd[EXT_CSD_PARTITION_ATTRIBUTE] & 0x1)) {
u8 hc_erase_grp_sz =
@@ -405,6 +406,7 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd)
if (card->ext_csd.rev >= 5)
card->ext_csd.rel_param = ext_csd[EXT_CSD_WR_REL_PARAM];
+ card->ext_csd.raw_erased_mem_count = ext_csd[EXT_CSD_ERASED_MEM_CONT];
if (ext_csd[EXT_CSD_ERASED_MEM_CONT])
card->erased_byte = 0xFF;
else
--
1.7.6.1
next reply other threads:[~2011-09-23 4:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-23 4:25 Andrei Warkentin [this message]
2011-09-23 21:39 ` [PATCH] MMC: ext_csd.raw_* used in comparison but never set Philip Rakity
2011-09-24 16:14 ` Chris Ball
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=1316751930-7478-1-git-send-email-andrey.warkentin@gmail.com \
--to=andrey.warkentin@gmail.com \
--cc=andreiw@vmware.com \
--cc=linux-mmc@vger.kernel.org \
--cc=prakity@marvell.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox