public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] mmc: add boundary check for mmc operation
Date: Mon, 13 Sep 2010 11:47:51 +0200	[thread overview]
Message-ID: <20100913094751.9883015242D@gemini.denx.de> (raw)
In-Reply-To: <1284369459-29997-1-git-send-email-leiwen@marvell.com>

Dear Lei Wen,

when posting new versions of patches, please always

1) make sure the messages are properly threaded, i. e. make sure to
   provide proper references to the previous postings;
   "git send-email" asks for the message ID.
2) show in the Subject that tthios is a new version of the patch (for
   example by using "[PATCH 1/2 v2]", and add (in the comment section,
   i. e. below the "---" line, a description of what was changed
   respective to the previous version(s).

Thanks.

In message <1284369459-29997-1-git-send-email-leiwen@marvell.com> you wrote:
> Signed-off-by: Lei Wen <leiwen@marvell.com>
> ---
>  drivers/mmc/mmc.c |   10 ++++++++++
>  1 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
> index cf4ea16..42638f6 100644
> --- a/drivers/mmc/mmc.c
> +++ b/drivers/mmc/mmc.c
> @@ -92,6 +92,11 @@ mmc_bwrite(int dev_num, ulong start, lbaint_t blkcnt, const void*src)
>  
>  	blklen = mmc->write_bl_len;
>  
> +	if ((start + blkcnt) > mmc->block_dev.lba) {
> +		puts("operation exceed mmc boundary..\n"
> +		     "This devices only have 0x%x blocks\n", mmc->block_dev.lba);

puts() does not perform output formatting. You want printf() here (and
below).

Also, try to use a shorter message, for example:

	printf("MMC: block number 0x%x = %d exceeds max (0x%x = %d)", ...);


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Beauty is transitory." "Beauty survives."
	-- Spock and Kirk, "That Which Survives", stardate unknown

  parent reply	other threads:[~2010-09-13  9:47 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-13  9:17 [U-Boot] [PATCH 1/2] mmc: add boundary check for mmc operation Lei Wen
2010-09-13  9:17 ` [U-Boot] [PATCH 2/2] mmc: print out avaible partition table Lei Wen
2010-09-13  9:47 ` Wolfgang Denk [this message]
2010-09-13 11:54 ` [U-Boot] [PATCH 1/2 V2] mmc: add boundary check for mmc operation Lei Wen
2010-09-13 13:40   ` Sergei Shtylyov
2010-09-13 14:03     ` Lei Wen
2010-09-13 11:54 ` [U-Boot] [PATCH 2/2 V2] mmc: print out avaible partition table Lei Wen
2010-09-13 13:41   ` Sergei Shtylyov
2010-09-13 14:03     ` Lei Wen
2010-09-13 14:07     ` [U-Boot] [PATCH 1/2 V3] mmc: add boundary check for mmc operation Lei Wen
2010-09-17  3:22       ` Lei Wen
2010-09-18 13:01         ` Lei Wen
2010-09-18 21:46       ` Wolfgang Denk
2010-09-20 10:39         ` Ghorai, Sukumar
2010-09-20 12:59           ` Lei Wen
2010-09-20 13:28             ` Ghorai, Sukumar
2010-10-12 19:20               ` Wolfgang Denk
2010-10-12 19:48                 ` Ghorai, Sukumar
2010-09-13 14:07     ` [U-Boot] [PATCH 2/2 V3] mmc: print out avaible partition table Lei Wen
2010-09-18 21:47       ` Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2010-09-13  4:06 [U-Boot] [PATCH 1/2] mmc: add boundary check for mmc operation Lei Wen
2010-09-13  8:52 ` Sergei Shtylyov
2010-09-13  9:08   ` Lei Wen

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=20100913094751.9883015242D@gemini.denx.de \
    --to=wd@denx.de \
    --cc=u-boot@lists.denx.de \
    /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