diff mbox

[U-Boot] UBI: Fix compile error when CONFIG_UBI_SILENCE_MSG defined

Message ID 20160103210503.GA32297@localhost.localdomain
State Awaiting Upstream
Delegated to: Heiko Schocher
Headers show

Commit Message

Ladislav Michl Jan. 3, 2016, 9:05 p.m. UTC
drivers/mtd/ubi/io.c:1354:3: error: 'dump_len' undeclared (first use in
this function)
   dump_len = max_t(int, 128, len - i);

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 drivers/mtd/ubi/io.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Heiko Schocher Jan. 4, 2016, 7:04 a.m. UTC | #1
Hello Ladislav Michl

Am 03.01.2016 um 22:05 schrieb Ladislav Michl:
> drivers/mtd/ubi/io.c:1354:3: error: 'dump_len' undeclared (first use in
> this function)
>     dump_len = max_t(int, 128, len - i);
>
> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
> ---
>   drivers/mtd/ubi/io.c | 1 -
>   1 file changed, 1 deletion(-)

You sended this patch twice? Old version here:

http://patchwork.ozlabs.org/patch/561670/

removed this patch from patchwork.

bye,
Heiko
>
> diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c
> index d1bdec3..0be9c5a 100644
> --- a/drivers/mtd/ubi/io.c
> +++ b/drivers/mtd/ubi/io.c
> @@ -1351,7 +1351,6 @@ static int self_check_write(struct ubi_device *ubi, const void *buf, int pnum,
>   		ubi_err(ubi, "self-check failed for PEB %d:%d, len %d",
>   			pnum, offset, len);
>   		ubi_msg(ubi, "data differ at position %d", i);
> -		dump_len = max_t(int, 128, len - i);
>   		ubi_msg(ubi, "hex dump of the original buffer from %d to %d",
>   			i, i + dump_len);
>   		print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 32, 1,
>
Heiko Schocher Jan. 4, 2016, 8:12 a.m. UTC | #2
Hello Ladislav Michl,

Am 03.01.2016 um 22:05 schrieb Ladislav Michl:
> drivers/mtd/ubi/io.c:1354:3: error: 'dump_len' undeclared (first use in
> this function)
>     dump_len = max_t(int, 128, len - i);
>
> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
> ---
>   drivers/mtd/ubi/io.c | 1 -
>   1 file changed, 1 deletion(-)

Thanks!

Applied to u-boot-ubi.git

bye,
Heiko
>
> diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c
> index d1bdec3..0be9c5a 100644
> --- a/drivers/mtd/ubi/io.c
> +++ b/drivers/mtd/ubi/io.c
> @@ -1351,7 +1351,6 @@ static int self_check_write(struct ubi_device *ubi, const void *buf, int pnum,
>   		ubi_err(ubi, "self-check failed for PEB %d:%d, len %d",
>   			pnum, offset, len);
>   		ubi_msg(ubi, "data differ at position %d", i);
> -		dump_len = max_t(int, 128, len - i);
>   		ubi_msg(ubi, "hex dump of the original buffer from %d to %d",
>   			i, i + dump_len);
>   		print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 32, 1,
>
diff mbox

Patch

diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c
index d1bdec3..0be9c5a 100644
--- a/drivers/mtd/ubi/io.c
+++ b/drivers/mtd/ubi/io.c
@@ -1351,7 +1351,6 @@  static int self_check_write(struct ubi_device *ubi, const void *buf, int pnum,
 		ubi_err(ubi, "self-check failed for PEB %d:%d, len %d",
 			pnum, offset, len);
 		ubi_msg(ubi, "data differ at position %d", i);
-		dump_len = max_t(int, 128, len - i);
 		ubi_msg(ubi, "hex dump of the original buffer from %d to %d",
 			i, i + dump_len);
 		print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 32, 1,