From: Andres Salomon <dilinger@queued.net>
To: drzeus-sdhci@drzeus.cx
Cc: sdhci-devel@list.drzeus.cx, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] mmc: have mmc_align_data_size use ALIGN() macro
Date: Mon, 7 Jul 2008 17:26:46 -0400 [thread overview]
Message-ID: <20080707172646.79cc214c@fred> (raw)
No sense manually doing the alignment dance, there's a macro for that.
Once the optimal alignment stuff is added, this could
probably turn into something like this (in core.h):
static inline u32 mmc_align_data_size(struct mmc_card *card, u32 sz)
{
return ALIGN(sz, card->align_sz);
}
Signed-off-by: Andres Salomon <dilinger@debian.org>
---
drivers/mmc/core/core.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 3ee5b8c..e306061 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -315,9 +315,7 @@ unsigned int mmc_align_data_size(struct mmc_card *card, unsigned int sz)
* the core about its problems yet, so for now we just 32-bit
* align the size.
*/
- sz = ((sz + 3) / 4) * 4;
-
- return sz;
+ return ALIGN(sz, 4);
}
EXPORT_SYMBOL(mmc_align_data_size);
--
1.5.5.3
next reply other threads:[~2008-07-07 21:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-07 21:26 Andres Salomon [this message]
2008-07-08 19:22 ` [PATCH 2/2] mmc: have mmc_align_data_size use ALIGN() macro 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=20080707172646.79cc214c@fred \
--to=dilinger@queued.net \
--cc=drzeus-sdhci@drzeus.cx \
--cc=linux-kernel@vger.kernel.org \
--cc=sdhci-devel@list.drzeus.cx \
/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