diff options
author | Robert P. J. Day <rpjday@mindspring.com> | 2007-02-10 04:45:46 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 13:51:31 -0500 |
commit | aa58d61d18b89b98521364550b481fd9bd18c3b6 (patch) | |
tree | 26f6fd9cbaf6bc3c7d940d33069b3b701cc41e72 | |
parent | 78ba2faf71c63990cba9997f18cf1d610e06e3f2 (diff) |
[PATCH] Get rid of "double zeroing" of allocated pages
Simplify the few instances where a call to "get_zeroed_page()" is closely
followed by an unnecessary call to memset() to clear that page.
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Cc: chas williams <chas@cmf.nrl.navy.mil>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/atm/eni.c | 1 | ||||
-rw-r--r-- | drivers/media/video/zoran_driver.c | 1 | ||||
-rw-r--r-- | drivers/scsi/53c7xx.c | 1 |
3 files changed, 0 insertions, 3 deletions
diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c index 5aab7bd473ac..8fccf018f165 100644 --- a/drivers/atm/eni.c +++ b/drivers/atm/eni.c | |||
@@ -912,7 +912,6 @@ static int start_rx(struct atm_dev *dev) | |||
912 | free_page((unsigned long) eni_dev->free_list); | 912 | free_page((unsigned long) eni_dev->free_list); |
913 | return -ENOMEM; | 913 | return -ENOMEM; |
914 | } | 914 | } |
915 | memset(eni_dev->rx_map,0,PAGE_SIZE); | ||
916 | eni_dev->rx_mult = DEFAULT_RX_MULT; | 915 | eni_dev->rx_mult = DEFAULT_RX_MULT; |
917 | eni_dev->fast = eni_dev->last_fast = NULL; | 916 | eni_dev->fast = eni_dev->last_fast = NULL; |
918 | eni_dev->slow = eni_dev->last_slow = NULL; | 917 | eni_dev->slow = eni_dev->last_slow = NULL; |
diff --git a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c index 862a984c2155..e10a9ee25fc5 100644 --- a/drivers/media/video/zoran_driver.c +++ b/drivers/media/video/zoran_driver.c | |||
@@ -562,7 +562,6 @@ jpg_fbuffer_alloc (struct file *file) | |||
562 | jpg_fbuffer_free(file); | 562 | jpg_fbuffer_free(file); |
563 | return -ENOBUFS; | 563 | return -ENOBUFS; |
564 | } | 564 | } |
565 | memset((void *) mem, 0, PAGE_SIZE); | ||
566 | fh->jpg_buffers.buffer[i].frag_tab = (u32 *) mem; | 565 | fh->jpg_buffers.buffer[i].frag_tab = (u32 *) mem; |
567 | fh->jpg_buffers.buffer[i].frag_tab_bus = | 566 | fh->jpg_buffers.buffer[i].frag_tab_bus = |
568 | virt_to_bus((void *) mem); | 567 | virt_to_bus((void *) mem); |
diff --git a/drivers/scsi/53c7xx.c b/drivers/scsi/53c7xx.c index 640536ef77dc..9c3794310879 100644 --- a/drivers/scsi/53c7xx.c +++ b/drivers/scsi/53c7xx.c | |||
@@ -3099,7 +3099,6 @@ allocate_cmd (Scsi_Cmnd *cmd) { | |||
3099 | real = get_zeroed_page(GFP_ATOMIC); | 3099 | real = get_zeroed_page(GFP_ATOMIC); |
3100 | if (real == 0) | 3100 | if (real == 0) |
3101 | return NULL; | 3101 | return NULL; |
3102 | memset((void *)real, 0, 4096); | ||
3103 | cache_push(virt_to_phys((void *)real), 4096); | 3102 | cache_push(virt_to_phys((void *)real), 4096); |
3104 | cache_clear(virt_to_phys((void *)real), 4096); | 3103 | cache_clear(virt_to_phys((void *)real), 4096); |
3105 | kernel_set_cachemode((void *)real, 4096, IOMAP_NOCACHE_SER); | 3104 | kernel_set_cachemode((void *)real, 4096, IOMAP_NOCACHE_SER); |