diff options
author | Mika Kukkonen <mika@osdl.org> | 2004-06-29 05:20:18 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-06-29 05:20:18 -0700 |
commit | 55be71cfb77dc0a0a59716be3e1ac7946245ef67 (patch) | |
tree | f4ef8f0add1a80b9755c4282cc821543caaac4be /mm | |
parent | 9e1674efe516272452bfaf9639cbeb418c92fac1 (diff) | |
download | history-55be71cfb77dc0a0a59716be3e1ac7946245ef67.tar.gz |
[PATCH] Combined patch for remaining trivial sparse warnings in allnoconfig build
Well, one of these (fs/block_dev.c) is little non-trivial, but i felt
throwing that away would be a shame (and I did add comments ;-).
Also almost all of these have been submitted earlier through other
channels, but have not been picked up (the only controversial is again the
fs/block_dev.c patch, where Linus felt a better job would be done with
__ffs(), but I could not convince myself that is does the same thing as
original code).
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/filemap.c | 2 | ||||
-rw-r--r-- | mm/vmalloc.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 8def05c0a023f5..42a2f6024048bd 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -200,7 +200,7 @@ static int wait_on_page_writeback_range(struct address_space *mapping, index = start; while ((nr_pages = pagevec_lookup_tag(&pvec, mapping, &index, PAGECACHE_TAG_WRITEBACK, - min(end - index, (pgoff_t)PAGEVEC_SIZE-1) + 1))) { + min(end - index, (pgoff_t)PAGEVEC_SIZE-1) + 1)) != 0) { unsigned i; for (i = 0; i < nr_pages; i++) { diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 7e5123fd2e8c21..a4c7c0a17e9617 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -199,7 +199,7 @@ struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, } write_lock(&vmlist_lock); - for (p = &vmlist; (tmp = *p) ;p = &tmp->next) { + for (p = &vmlist; (tmp = *p) != NULL ;p = &tmp->next) { if ((unsigned long)tmp->addr < addr) continue; if ((size + addr) < addr) @@ -260,7 +260,7 @@ struct vm_struct *remove_vm_area(void *addr) struct vm_struct **p, *tmp; write_lock(&vmlist_lock); - for (p = &vmlist ; (tmp = *p) ;p = &tmp->next) { + for (p = &vmlist ; (tmp = *p) != NULL ;p = &tmp->next) { if (tmp->addr == addr) goto found; } |