From: Wolfgang Denk Date: Thu, 09 Sep 2010 16:51:10 +0200 Subject: [U-Boot] [PATCH 2/3] mmc: add boundary check for mmc operation In-Reply-To: References: <1283862729-17045-1-git-send-email-leiwen@marvell.com> <1283862729-17045-2-git-send-email-leiwen@marvell.com> <20100907134931.D82F71506AA@gemini.denx.de> Message-ID: <20100909145110.C1B561506AA@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Lei Wen, In message you wrote: > >> > >> + if (start > mmc->block_dev.lba || (start + blkcnt) mmc->block_dev.lba) { > >> + printf("\noperation excceed mmc boudary..\n"); > > > > No initial newline, please. > > You mean add additional line or just reduce a line here?... I mean change printf("\noperation ..."); into printf("operation ..."); > > Hm... Maybe you could change the message so it is more informatiove, > > i. e. tell the user which boundary was exceeded, and what caused this > > condition - is this a user error or a problem in the code? > > Give error message for each judgment of the two? Not really needed, but you might print the legal range and the current value in the error message. 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 Time is a drug. Too much of it kills you. - Terry Pratchett, _Small Gods_