aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/hp
diff options
context:
space:
mode:
authorYan Burman <burman.yan@gmail.com>2006-12-04 17:58:35 -0500
committerTony Luck <tony.luck@intel.com>2006-12-07 16:46:43 -0500
commit52fd91088bcbaea5ab441d09d39c21eb684e54ea (patch)
treeeb267a56aebd72cad95d388806046137e2a5b577 /arch/ia64/hp
parent66888a6e5ffc756b9a4115fc766ee2258eefb928 (diff)
[IA64] replace kmalloc+memset with kzalloc
Replace kmalloc+memset with kzalloc Signed-off-by: Yan Burman <burman.yan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/hp')
-rw-r--r--arch/ia64/hp/common/sba_iommu.c10
-rw-r--r--arch/ia64/hp/sim/simserial.c3
2 files changed, 4 insertions, 9 deletions
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c
index 14691cda05c3..ce49fe3a3b56 100644
--- a/arch/ia64/hp/common/sba_iommu.c
+++ b/arch/ia64/hp/common/sba_iommu.c
@@ -1672,15 +1672,13 @@ ioc_sac_init(struct ioc *ioc)
1672 * SAC (single address cycle) addressable, so allocate a 1672 * SAC (single address cycle) addressable, so allocate a
1673 * pseudo-device to enforce that. 1673 * pseudo-device to enforce that.
1674 */ 1674 */
1675 sac = kmalloc(sizeof(*sac), GFP_KERNEL); 1675 sac = kzalloc(sizeof(*sac), GFP_KERNEL);
1676 if (!sac) 1676 if (!sac)
1677 panic(PFX "Couldn't allocate struct pci_dev"); 1677 panic(PFX "Couldn't allocate struct pci_dev");
1678 memset(sac, 0, sizeof(*sac));
1679 1678
1680 controller = kmalloc(sizeof(*controller), GFP_KERNEL); 1679 controller = kzalloc(sizeof(*controller), GFP_KERNEL);
1681 if (!controller) 1680 if (!controller)
1682 panic(PFX "Couldn't allocate struct pci_controller"); 1681 panic(PFX "Couldn't allocate struct pci_controller");
1683 memset(controller, 0, sizeof(*controller));
1684 1682
1685 controller->iommu = ioc; 1683 controller->iommu = ioc;
1686 sac->sysdata = controller; 1684 sac->sysdata = controller;
@@ -1737,12 +1735,10 @@ ioc_init(u64 hpa, void *handle)
1737 struct ioc *ioc; 1735 struct ioc *ioc;
1738 struct ioc_iommu *info; 1736 struct ioc_iommu *info;
1739 1737
1740 ioc = kmalloc(sizeof(*ioc), GFP_KERNEL); 1738 ioc = kzalloc(sizeof(*ioc), GFP_KERNEL);
1741 if (!ioc) 1739 if (!ioc)
1742 return NULL; 1740 return NULL;
1743 1741
1744 memset(ioc, 0, sizeof(*ioc));
1745
1746 ioc->next = ioc_list; 1742 ioc->next = ioc_list;
1747 ioc_list = ioc; 1743 ioc_list = ioc;
1748 1744
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c
index b62f0c4d2c7c..1f16ebb9a800 100644
--- a/arch/ia64/hp/sim/simserial.c
+++ b/arch/ia64/hp/sim/simserial.c
@@ -684,12 +684,11 @@ static int get_async_struct(int line, struct async_struct **ret_info)
684 *ret_info = sstate->info; 684 *ret_info = sstate->info;
685 return 0; 685 return 0;
686 } 686 }
687 info = kmalloc(sizeof(struct async_struct), GFP_KERNEL); 687 info = kzalloc(sizeof(struct async_struct), GFP_KERNEL);
688 if (!info) { 688 if (!info) {
689 sstate->count--; 689 sstate->count--;
690 return -ENOMEM; 690 return -ENOMEM;
691 } 691 }
692 memset(info, 0, sizeof(struct async_struct));
693 init_waitqueue_head(&info->open_wait); 692 init_waitqueue_head(&info->open_wait);
694 init_waitqueue_head(&info->close_wait); 693 init_waitqueue_head(&info->close_wait);
695 init_waitqueue_head(&info->delta_msr_wait); 694 init_waitqueue_head(&info->delta_msr_wait);