diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2009-04-04 22:27:10 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2009-04-04 22:27:10 +0000 |
commit | 9f243a11326724221732900b2fb37ebd2ce7b1dd (patch) | |
tree | fbbd3533cfffc734136d17faeeeb1b56ea90cfe3 /src | |
parent | dd0b6ff4dd7886405a3af5f8481cd65a016226eb (diff) |
fix this warning:
coreboot-v2-4067//src/stream/ide_stream.c: In function 'stream_ide_read':
coreboot-v2-4067//src/stream/ide_stream.c:47: warning: declaration of 'offset' shadows a global declaration
coreboot-v2-4067//src/stream/ide_stream.c:13: warning: shadowed declaration is here
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4071 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src')
-rw-r--r-- | src/stream/ide_stream.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/stream/ide_stream.c b/src/stream/ide_stream.c index 0dd9a91258..832f503a95 100644 --- a/src/stream/ide_stream.c +++ b/src/stream/ide_stream.c @@ -11,6 +11,7 @@ #endif static unsigned long offset; + int stream_init(void) { int i,res; @@ -44,7 +45,8 @@ void stream_fini(void) static unsigned char buffer[512]; static unsigned int block_num = 0; static unsigned int first_fill = 1; -static byte_offset_t stream_ide_read(void *vdest, byte_offset_t offset, byte_offset_t count) + +static byte_offset_t stream_ide_read(void *vdest, byte_offset_t offs, byte_offset_t count) { byte_offset_t bytes = 0; unsigned char *dest = vdest; @@ -54,14 +56,14 @@ static byte_offset_t stream_ide_read(void *vdest, byte_offset_t offset, byte_off unsigned int byte_offset, len; /* The block is not cached in memory or frist time called */ - if (block_num != offset / 512 || first_fill) { - block_num = offset / 512; + if (block_num != offs / 512 || first_fill) { + block_num = offs / 512; printk_notice ("."); ide_read(IDE_BOOT_DRIVE, block_num, buffer); first_fill = 0; } - byte_offset = offset % 512; + byte_offset = offs % 512; len = 512 - byte_offset; if (len > (count - bytes)) { len = (count - bytes); @@ -69,7 +71,7 @@ static byte_offset_t stream_ide_read(void *vdest, byte_offset_t offset, byte_off memcpy(dest, buffer + byte_offset, len); - offset += len; + offs += len; bytes += len; dest += len; |