Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131160
b: refs/heads/master
c: 5701c05
h: refs/heads/master
v: v3
  • Loading branch information
Arve Hjønnevåg authored and Greg Kroah-Hartman committed Feb 9, 2009
1 parent 3da1855 commit 61dff9d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 07f269862a2981f1512de5393e2d0ce5b2ee8305
refs/heads/master: 5701c0519b7a357a602fda5c96f26197ecfc4c85
1 change: 1 addition & 0 deletions trunk/drivers/staging/android/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ menuconfig ANDROID_RAM_CONSOLE_ERROR_CORRECTION
bool "Android RAM Console Enable error correction"
default n
depends on ANDROID_RAM_CONSOLE
depends on !ANDROID_RAM_CONSOLE_EARLY_INIT
select REED_SOLOMON
select REED_SOLOMON_ENC8
select REED_SOLOMON_DEC8
Expand Down
14 changes: 14 additions & 0 deletions trunk/drivers/staging/android/ram_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,23 @@ static int __init ram_console_init(struct ram_console_buffer *buffer,
ram_console_buffer_size =
buffer_size - sizeof(struct ram_console_buffer);

if (ram_console_buffer_size > buffer_size) {
pr_err("ram_console: buffer %p, invalid size %d, datasize %d\n",
buffer, buffer_size, ram_console_buffer_size);
return 0;
}

#ifdef CONFIG_ANDROID_RAM_CONSOLE_ERROR_CORRECTION
ram_console_buffer_size -= (DIV_ROUND_UP(ram_console_buffer_size,
ECC_BLOCK_SIZE) + 1) * ECC_SIZE;

if (ram_console_buffer_size > buffer_size) {
pr_err("ram_console: buffer %p, invalid size %d, "
"non-ecc datasize %d\n",
buffer, buffer_size, ram_console_buffer_size);
return 0;
}

ram_console_par_buffer = buffer->data + ram_console_buffer_size;


Expand Down

0 comments on commit 61dff9d

Please sign in to comment.