[PATCH 09/10] filemap: trivial code cleanups



- remove unused local next_index in do_generic_mapping_read()
- wrap a long line
- remove a redudant page_cache_read() declaration

Signed-off-by: Fengguang Wu <wfg@xxxxxxxxxxxxxxxx>
---
mm/filemap.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

--- linux-2.6.22-rc6-mm1.orig/mm/filemap.c
+++ linux-2.6.22-rc6-mm1/mm/filemap.c
@@ -873,13 +873,11 @@ void do_generic_mapping_read(struct addr
unsigned long index;
unsigned long offset;
unsigned long last_index;
- unsigned long next_index;
unsigned long prev_index;
unsigned int prev_offset;
int error;

index = *ppos >> PAGE_CACHE_SHIFT;
- next_index = index;
prev_index = ra->prev_pos >> PAGE_CACHE_SHIFT;
prev_offset = ra->prev_pos & (PAGE_CACHE_SIZE-1);
last_index = (*ppos + desc->count + PAGE_CACHE_SIZE-1) >> PAGE_CACHE_SHIFT;
@@ -1214,7 +1212,8 @@ out:
}
EXPORT_SYMBOL(generic_file_aio_read);

-int file_send_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size)
+int file_send_actor(read_descriptor_t * desc, struct page *page,
+ unsigned long offset, unsigned long size)
{
ssize_t written;
unsigned long count = desc->count;
@@ -1287,7 +1286,6 @@ asmlinkage ssize_t sys_readahead(int fd,
}

#ifdef CONFIG_MMU
-static int FASTCALL(page_cache_read(struct file * file, unsigned long offset));
/**
* page_cache_read - adds requested page to the page cache if not already there
* @file: file to read

--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • [PATCH 3/4] squashfs: (void*)ify squashfs_get_cached_block
    ... unsigned int block, unsigned int offset, ... squashfs_reg_inode_header sinodep; ... &sdire, next_block, next_offset, ...
    (Linux-Kernel)
  • Re: Free C Compiler on Windows
    ... It was a minor problem with a declaration ... A declaration like "long long unsigned int". ... jacob at jacob point remcomp point fr ...
    (comp.lang.c)
  • Total video player 1.3.7 local buffer overflow universal exploit
    ... char scode1= ... unsigned int RET=0x7c85d568; ... printf("Total Video Player local universal buffer overflow exploit\n"); ... offset = OFFSET; ...
    (Bugtraq)
  • [PATCH] drivers/acpi/asus_acpi.c unsigned comparison
    ... The return of parse_arg is an int, but count is declared as an unsigned int, and later checked versus zero, ... This patch fixes the declaration of count in both functions. ... To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • [PATCH 3/7] percpu: clean up percpu variable definitions
    ... Percpu variable definition is about to be updated such that no static ... as,cfq: rename ioc_count uniquely ... volatile DEFINE_PER_CPUfor declaration. ... unsigned int idle_time, wall_time; ...
    (Linux-Kernel)