public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Liam Beguin <liambeguin@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 1/7] spi: spi_flash: do not fail silently on bad user input
Date: Wed, 14 Mar 2018 19:15:10 -0400	[thread overview]
Message-ID: <20180314231516.1647-2-liambeguin@gmail.com> (raw)
In-Reply-To: <20180314231516.1647-1-liambeguin@gmail.com>

Make sure the user is notified instead of silently returning an error.

Signed-off-by: Liam Beguin <liambeguin@gmail.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
---
 drivers/mtd/spi/spi_flash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
index 294d9f9d79c6..2e61685d3ea4 100644
--- a/drivers/mtd/spi/spi_flash.c
+++ b/drivers/mtd/spi/spi_flash.c
@@ -320,7 +320,7 @@ int spi_flash_cmd_erase_ops(struct spi_flash *flash, u32 offset, size_t len)
 
 	erase_size = flash->erase_size;
 	if (offset % erase_size || len % erase_size) {
-		debug("SF: Erase offset/length not multiple of erase size\n");
+		printf("SF: Erase offset/length not multiple of erase size\n");
 		return -1;
 	}
 
-- 
2.16.1.72.g5be1f00a9a70

  reply	other threads:[~2018-03-14 23:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-14 23:15 [U-Boot] [PATCH v4 0/7] add inital SF tests Liam Beguin
2018-03-14 23:15 ` Liam Beguin [this message]
2018-03-22 20:34   ` [U-Boot] [U-Boot, v4, 1/7] spi: spi_flash: do not fail silently on bad user input Tom Rini
2018-03-14 23:15 ` [U-Boot] [PATCH v4 2/7] cmd: sf: fix map_physmem check Liam Beguin
2018-03-22 20:34   ` [U-Boot] [U-Boot,v4,2/7] " Tom Rini
2018-03-14 23:15 ` [U-Boot] [PATCH v4 3/7] test/py: README: fix typo Liam Beguin
2018-03-22 20:34   ` [U-Boot] [U-Boot,v4,3/7] " Tom Rini
2018-03-14 23:15 ` [U-Boot] [PATCH v4 4/7] test/py: README: add HOSTNAME to PYTHONPATH Liam Beguin
2018-03-22 20:34   ` [U-Boot] [U-Boot, v4, " Tom Rini
2018-03-14 23:15 ` [U-Boot] [PATCH v4 5/7] test/py: do not import pytest multiple times Liam Beguin
2018-03-22 20:34   ` [U-Boot] [U-Boot, v4, " Tom Rini
2018-03-14 23:15 ` [U-Boot] [PATCH v4 6/7] test/py: add generic CRC32 function Liam Beguin
2018-03-22 20:34   ` [U-Boot] [U-Boot,v4,6/7] " Tom Rini
2018-03-14 23:15 ` [U-Boot] [PATCH v4 7/7] test/py: add spi_flash tests Liam Beguin
2018-03-14 23:27   ` Stephen Warren
2018-03-14 23:30     ` Liam Beguin
2018-03-22 20:34   ` [U-Boot] [U-Boot,v4,7/7] " Tom Rini

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=20180314231516.1647-2-liambeguin@gmail.com \
    --to=liambeguin@gmail.com \
    --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