diff options
author | Yan Burman <burman.yan@gmail.com> | 2006-12-02 06:26:57 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-12-04 04:42:09 -0500 |
commit | f8485350c22b25f5b9804d89cb8fdf6626d0f5cb (patch) | |
tree | 969b17561afcf17362eebf16e59570bb66272d0b /arch/powerpc/platforms | |
parent | 04d76b937bdf60a8c9ac34e222e3ca977ab9ddc8 (diff) |
[POWERPC] Replace kmalloc+memset with kzalloc
Replace kmalloc+memset with kzalloc.
Signed-off-by: Yan Burman <burman.yan@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/iseries/iommu.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/viopath.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/reconfig.c | 3 |
3 files changed, 3 insertions, 7 deletions
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c index ee0a4e42e4f0..d7a756d5135c 100644 --- a/arch/powerpc/platforms/iseries/iommu.c +++ b/arch/powerpc/platforms/iseries/iommu.c | |||
@@ -115,12 +115,10 @@ void iommu_table_getparms_iSeries(unsigned long busno, | |||
115 | { | 115 | { |
116 | struct iommu_table_cb *parms; | 116 | struct iommu_table_cb *parms; |
117 | 117 | ||
118 | parms = kmalloc(sizeof(*parms), GFP_KERNEL); | 118 | parms = kzalloc(sizeof(*parms), GFP_KERNEL); |
119 | if (parms == NULL) | 119 | if (parms == NULL) |
120 | panic("PCI_DMA: TCE Table Allocation failed."); | 120 | panic("PCI_DMA: TCE Table Allocation failed."); |
121 | 121 | ||
122 | memset(parms, 0, sizeof(*parms)); | ||
123 | |||
124 | parms->itc_busno = busno; | 122 | parms->itc_busno = busno; |
125 | parms->itc_slotno = slotno; | 123 | parms->itc_slotno = slotno; |
126 | parms->itc_virtbus = virtbus; | 124 | parms->itc_virtbus = virtbus; |
diff --git a/arch/powerpc/platforms/iseries/viopath.c b/arch/powerpc/platforms/iseries/viopath.c index 04e07e5da0c1..84e7ee2c086f 100644 --- a/arch/powerpc/platforms/iseries/viopath.c +++ b/arch/powerpc/platforms/iseries/viopath.c | |||
@@ -119,10 +119,9 @@ static int proc_viopath_show(struct seq_file *m, void *v) | |||
119 | struct device_node *node; | 119 | struct device_node *node; |
120 | const char *sysid; | 120 | const char *sysid; |
121 | 121 | ||
122 | buf = kmalloc(HW_PAGE_SIZE, GFP_KERNEL); | 122 | buf = kzalloc(HW_PAGE_SIZE, GFP_KERNEL); |
123 | if (!buf) | 123 | if (!buf) |
124 | return 0; | 124 | return 0; |
125 | memset(buf, 0, HW_PAGE_SIZE); | ||
126 | 125 | ||
127 | handle = dma_map_single(iSeries_vio_dev, buf, HW_PAGE_SIZE, | 126 | handle = dma_map_single(iSeries_vio_dev, buf, HW_PAGE_SIZE, |
128 | DMA_FROM_DEVICE); | 127 | DMA_FROM_DEVICE); |
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c index 1773103354be..4ad33e41b008 100644 --- a/arch/powerpc/platforms/pseries/reconfig.c +++ b/arch/powerpc/platforms/pseries/reconfig.c | |||
@@ -268,11 +268,10 @@ static char * parse_next_property(char *buf, char *end, char **name, int *length | |||
268 | static struct property *new_property(const char *name, const int length, | 268 | static struct property *new_property(const char *name, const int length, |
269 | const unsigned char *value, struct property *last) | 269 | const unsigned char *value, struct property *last) |
270 | { | 270 | { |
271 | struct property *new = kmalloc(sizeof(*new), GFP_KERNEL); | 271 | struct property *new = kzalloc(sizeof(*new), GFP_KERNEL); |
272 | 272 | ||
273 | if (!new) | 273 | if (!new) |
274 | return NULL; | 274 | return NULL; |
275 | memset(new, 0, sizeof(*new)); | ||
276 | 275 | ||
277 | if (!(new->name = kmalloc(strlen(name) + 1, GFP_KERNEL))) | 276 | if (!(new->name = kmalloc(strlen(name) + 1, GFP_KERNEL))) |
278 | goto cleanup; | 277 | goto cleanup; |