IB/mthca: Replace memset(<addr>, 0, PAGE_SIZE) with clear_page(<addr>)
authorShani Moideen <shani.moideen@wipro.com>
Mon, 18 Jun 2007 03:16:41 +0000 (08:46 +0530)
committerRoland Dreier <rolandd@cisco.com>
Tue, 10 Jul 2007 19:28:05 +0000 (12:28 -0700)
Signed-off-by: Shani Moideen <shani.moideen@wipro.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
----

drivers/infiniband/hw/mthca/mthca_allocator.c
drivers/infiniband/hw/mthca/mthca_eq.c

index f930e55b58fcd45ae947b6b29efc9d6efa87dd1c..a763067096182fe14d9502a2a5fdd6135bd6e580 100644 (file)
@@ -255,7 +255,7 @@ int mthca_buf_alloc(struct mthca_dev *dev, int size, int max_direct,
                        dma_list[i] = t;
                        pci_unmap_addr_set(&buf->page_list[i], mapping, t);
 
-                       memset(buf->page_list[i].buf, 0, PAGE_SIZE);
+                       clear_page(buf->page_list[i].buf);
                }
        }
 
index 8ec9fa1ff9ea10809ac8dac3e32d904559ff7176..8592b26dc4e1b051d5fe7704e285371145c7587e 100644 (file)
@@ -522,7 +522,7 @@ static int mthca_create_eq(struct mthca_dev *dev,
                dma_list[i] = t;
                pci_unmap_addr_set(&eq->page_list[i], mapping, t);
 
-               memset(eq->page_list[i].buf, 0, PAGE_SIZE);
+               clear_page(eq->page_list[i].buf);
        }
 
        for (i = 0; i < eq->nent; ++i)