+ prism54-replace-kmallocmemset-with-kzalloc.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     prism54: replace kmalloc+memset with kzalloc
has been added to the -mm tree.  Its filename is
     prism54-replace-kmallocmemset-with-kzalloc.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: prism54: replace kmalloc+memset with kzalloc
From: Yan Burman <burman.yan@xxxxxxxxx>

Replace kmalloc+memset with kzalloc

Signed-off-by: Yan Burman <burman.yan@xxxxxxxxx>
Cc: "John W. Linville" <linville@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/net/wireless/prism54/isl_ioctl.c |    9 +++------
 drivers/net/wireless/prism54/oid_mgt.c   |    4 +---
 2 files changed, 4 insertions(+), 9 deletions(-)

diff -puN drivers/net/wireless/prism54/isl_ioctl.c~prism54-replace-kmallocmemset-with-kzalloc drivers/net/wireless/prism54/isl_ioctl.c
--- a/drivers/net/wireless/prism54/isl_ioctl.c~prism54-replace-kmallocmemset-with-kzalloc
+++ a/drivers/net/wireless/prism54/isl_ioctl.c
@@ -2140,11 +2140,9 @@ prism54_wpa_bss_ie_add(islpci_private *p
 					 struct islpci_bss_wpa_ie, list);
 			list_del(&bss->list);
 		} else {
-			bss = kmalloc(sizeof (*bss), GFP_ATOMIC);
-			if (bss != NULL) {
+			bss = kzalloc(sizeof (*bss), GFP_ATOMIC);
+			if (bss != NULL)
 				priv->num_bss_wpa++;
-				memset(bss, 0, sizeof (*bss));
-			}
 		}
 		if (bss != NULL) {
 			memcpy(bss->bssid, bssid, ETH_ALEN);
@@ -2684,11 +2682,10 @@ prism2_ioctl_set_generic_element(struct 
                return -EINVAL;
 
        alen = sizeof(*attach) + len;
-       attach = kmalloc(alen, GFP_KERNEL);
+       attach = kzalloc(alen, GFP_KERNEL);
        if (attach == NULL)
                return -ENOMEM;
 
-       memset(attach, 0, alen);
 #define WLAN_FC_TYPE_MGMT 0
 #define WLAN_FC_STYPE_ASSOC_REQ 0
 #define WLAN_FC_STYPE_REASSOC_REQ 2
diff -puN drivers/net/wireless/prism54/oid_mgt.c~prism54-replace-kmallocmemset-with-kzalloc drivers/net/wireless/prism54/oid_mgt.c
--- a/drivers/net/wireless/prism54/oid_mgt.c~prism54-replace-kmallocmemset-with-kzalloc
+++ a/drivers/net/wireless/prism54/oid_mgt.c
@@ -235,12 +235,10 @@ mgt_init(islpci_private *priv)
 {
 	int i;
 
-	priv->mib = kmalloc(OID_NUM_LAST * sizeof (void *), GFP_KERNEL);
+	priv->mib = kcalloc(OID_NUM_LAST, sizeof (void *), GFP_KERNEL);
 	if (!priv->mib)
 		return -ENOMEM;
 
-	memset(priv->mib, 0, OID_NUM_LAST * sizeof (void *));
-
 	/* Alloc the cache */
 	for (i = 0; i < OID_NUM_LAST; i++) {
 		if (isl_oid[i].flags & OID_FLAG_CACHED) {
_

Patches currently in -mm which might be from burman.yan@xxxxxxxxx are

reiser-replace-kmallocmemset-with-kzalloc.patch
nfsd-replace-kmallocmemset-with-kcalloc.patch
jffs2-replace-kmallocmemset-with-kzalloc.patch
affs-replace-kmallocmemset-with-kzalloc.patch
ia64-replace-kmallocmemset-with-kzalloc.patch
arm26-replace-kmallocmemset-with-kzalloc.patch
powerpc-replace-kmallocmemset-with-kzalloc.patch
m68k-replace-kmallocmemset-with-kzalloc.patch
jffs-replace-kmallocmemset-with-kzalloc.patch
hostap-replace-kmallocmemset-with-kzalloc.patch
prism54-replace-kmallocmemset-with-kzalloc.patch
ipw2200-replace-kmallocmemset-with-kcalloc.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux