LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc
@ 2007-07-31 16:45 Mariusz Kozlowski
2007-07-31 16:50 ` [PATCH 01] kmalloc + memset conversion co kzalloc Mariusz Kozlowski
` (82 more replies)
0 siblings, 83 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 16:45 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton
Hello,
This kj patch series does kmalloc + memset conversion to k[cz]alloc. Some
of them also remove redundant argument checks to functions that already do that
internally. Also some minor style things are fixed like redundant k[mcz]alloc casts.
Most of this patches shrink object size by several hundred bytes (you'll find stats
below signed-off line) so this is a good thing. Almost all of them were compile tested.
Please review and apply.
Regards,
Mariusz
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 01] kmalloc + memset conversion co kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
@ 2007-07-31 16:50 ` Mariusz Kozlowski
2007-07-31 16:52 ` [PATCH 02] kmalloc + memset conversion to kzalloc Mariusz Kozlowski
` (81 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 16:50 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, linux-scsi, Kars de Jong
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/scsi/a4000t.c | 3534 -> 3457 (-77 bytes)
drivers/scsi/a4000t.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/scsi/a4000t.c 2007-07-26 13:07:42.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/scsi/a4000t.c 2007-07-31 14:00:37.000000000 +0200
@@ -37,7 +37,7 @@ static struct platform_device *a4000t_sc
static int __devinit a4000t_probe(struct device *dev)
{
- struct Scsi_Host * host = NULL;
+ struct Scsi_Host *host;
struct NCR_700_Host_Parameters *hostdata;
if (!(MACH_IS_AMIGA && AMIGAHW_PRESENT(A4000_SCSI)))
@@ -47,12 +47,11 @@ static int __devinit a4000t_probe(struct
"A4000T builtin SCSI"))
goto out;
- hostdata = kmalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL);
- if (hostdata == NULL) {
+ hostdata = kzalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL);
+ if (!hostdata) {
printk(KERN_ERR "a4000t-scsi: Failed to allocate host data\n");
goto out_release;
}
- memset(hostdata, 0, sizeof(struct NCR_700_Host_Parameters));
/* Fill in the required pieces of hostdata */
hostdata->base = (void __iomem *)ZTWO_VADDR(A4000T_SCSI_ADDR);
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 02] kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
2007-07-31 16:50 ` [PATCH 01] kmalloc + memset conversion co kzalloc Mariusz Kozlowski
@ 2007-07-31 16:52 ` Mariusz Kozlowski
2007-07-31 16:56 ` [PATCH 03] drivers/sbus/char/bbc_envctrl.c: " Mariusz Kozlowski
` (80 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 16:52 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, linux-scsi
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/scsi/aic7xxx_old.c | 367101 -> 366983 (-118 bytes)
drivers/scsi/aic7xxx_old.o | 333892 -> 333192 (-700 bytes)
drivers/scsi/aic7xxx_old.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/scsi/aic7xxx_old.c 2007-07-26 13:07:42.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/scsi/aic7xxx_old.c 2007-07-31 14:03:31.000000000 +0200
@@ -8416,10 +8416,9 @@ aic7xxx_alloc(struct scsi_host_template
*p = *temp;
p->host = host;
- p->scb_data = kmalloc(sizeof(scb_data_type), GFP_ATOMIC);
- if (p->scb_data != NULL)
+ p->scb_data = kzalloc(sizeof(scb_data_type), GFP_ATOMIC);
+ if (!p->scb_data)
{
- memset(p->scb_data, 0, sizeof(scb_data_type));
scbq_init (&p->scb_data->free_scbs);
}
else
@@ -9196,10 +9195,9 @@ aic7xxx_detect(struct scsi_host_template
printk(KERN_INFO " this driver, we are ignoring it.\n");
}
}
- else if ( (temp_p = kmalloc(sizeof(struct aic7xxx_host),
+ else if ( (temp_p = kzalloc(sizeof(struct aic7xxx_host),
GFP_ATOMIC)) != NULL )
{
- memset(temp_p, 0, sizeof(struct aic7xxx_host));
temp_p->chip = aic_pdevs[i].chip | AHC_PCI;
temp_p->flags = aic_pdevs[i].flags;
temp_p->features = aic_pdevs[i].features;
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 03] drivers/sbus/char/bbc_envctrl.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
2007-07-31 16:50 ` [PATCH 01] kmalloc + memset conversion co kzalloc Mariusz Kozlowski
2007-07-31 16:52 ` [PATCH 02] kmalloc + memset conversion to kzalloc Mariusz Kozlowski
@ 2007-07-31 16:56 ` Mariusz Kozlowski
2007-07-31 21:04 ` David Miller
2007-07-31 16:58 ` [PATCH 04] drivers/sbus/char/bbc_i2c.c: " Mariusz Kozlowski
` (79 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 16:56 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, davem
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/sbus/char/bbc_envctrl.c | 16622 -> 16580 (-42 bytes)
drivers/sbus/char/bbc_envctrl.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/sbus/char/bbc_envctrl.c 2007-07-26 13:07:43.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/sbus/char/bbc_envctrl.c 2007-07-31 13:58:44.000000000 +0200
@@ -479,11 +479,12 @@ static int kenvctrld(void *__unused)
static void attach_one_temp(struct linux_ebus_child *echild, int temp_idx)
{
- struct bbc_cpu_temperature *tp = kmalloc(sizeof(*tp), GFP_KERNEL);
-
+ struct bbc_cpu_temperature *tp;
+
+ tp = kzalloc(sizeof(*tp), GFP_KERNEL);
if (!tp)
return;
- memset(tp, 0, sizeof(*tp));
+
tp->client = bbc_i2c_attach(echild);
if (!tp->client) {
kfree(tp);
@@ -525,11 +526,12 @@ static void attach_one_temp(struct linux
static void attach_one_fan(struct linux_ebus_child *echild, int fan_idx)
{
- struct bbc_fan_control *fp = kmalloc(sizeof(*fp), GFP_KERNEL);
-
+ struct bbc_fan_control *fp;
+
+ fp = kzalloc(sizeof(*fp), GFP_KERNEL);
if (!fp)
return;
- memset(fp, 0, sizeof(*fp));
+
fp->client = bbc_i2c_attach(echild);
if (!fp->client) {
kfree(fp);
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 04] drivers/sbus/char/bbc_i2c.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (2 preceding siblings ...)
2007-07-31 16:56 ` [PATCH 03] drivers/sbus/char/bbc_envctrl.c: " Mariusz Kozlowski
@ 2007-07-31 16:58 ` Mariusz Kozlowski
2007-07-31 21:05 ` David Miller
2007-07-31 16:59 ` [PATCH 05] drivers/mmc/core/bus.c: " Mariusz Kozlowski
` (78 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 16:58 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, davem
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/sbus/char/bbc_i2c.c | 10847 -> 10823 (-24 bytes)
drivers/sbus/char/bbc_i2c.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/sbus/char/bbc_i2c.c 2007-07-26 13:07:43.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/sbus/char/bbc_i2c.c 2007-07-31 18:12:13.000000000 +0200
@@ -357,13 +357,13 @@ static void __init reset_one_i2c(struct
static int __init attach_one_i2c(struct linux_ebus_device *edev, int index)
{
- struct bbc_i2c_bus *bp = kmalloc(sizeof(*bp), GFP_KERNEL);
+ struct bbc_i2c_bus *bp;
struct linux_ebus_child *echild;
int entry;
+ bp = kzalloc(sizeof(*bp), GFP_KERNEL);
if (!bp)
return -ENOMEM;
- memset(bp, 0, sizeof(*bp));
bp->i2c_control_regs = ioremap(edev->resource[0].start, 0x2);
if (!bp->i2c_control_regs)
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 05] drivers/mmc/core/bus.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (3 preceding siblings ...)
2007-07-31 16:58 ` [PATCH 04] drivers/sbus/char/bbc_i2c.c: " Mariusz Kozlowski
@ 2007-07-31 16:59 ` Mariusz Kozlowski
2007-08-04 13:01 ` Pierre Ossman
2007-07-31 17:01 ` [PATCH 06] drivers/scsi/bvme6000_scsi.c: " Mariusz Kozlowski
` (77 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 16:59 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, drzeus-mmc
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/mmc/core/bus.c | 5663 -> 5619 (-44 bytes)
drivers/mmc/core/bus.o | 70899 -> 70731 (-168 bytes)
drivers/mmc/core/bus.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/mmc/core/bus.c 2007-07-26 13:07:43.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/mmc/core/bus.c 2007-07-30 00:23:02.000000000 +0200
@@ -206,12 +206,10 @@ struct mmc_card *mmc_alloc_card(struct m
{
struct mmc_card *card;
- card = kmalloc(sizeof(struct mmc_card), GFP_KERNEL);
+ card = kzalloc(sizeof(struct mmc_card), GFP_KERNEL);
if (!card)
return ERR_PTR(-ENOMEM);
- memset(card, 0, sizeof(struct mmc_card));
-
card->host = host;
device_initialize(&card->dev);
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 06] drivers/scsi/bvme6000_scsi.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (4 preceding siblings ...)
2007-07-31 16:59 ` [PATCH 05] drivers/mmc/core/bus.c: " Mariusz Kozlowski
@ 2007-07-31 17:01 ` Mariusz Kozlowski
2007-07-31 17:03 ` [PATCH 07] drivers/block/cciss.c: " Mariusz Kozlowski
` (76 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 17:01 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, linux-scsi, Richard Hirst
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/scsi/bvme6000_scsi.c | 3330 -> 3253 (-77 bytes)
drivers/scsi/bvme6000_scsi.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/scsi/bvme6000_scsi.c 2007-07-26 13:07:42.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/scsi/bvme6000_scsi.c 2007-07-31 14:04:50.000000000 +0200
@@ -36,19 +36,18 @@ static struct platform_device *bvme6000_
static __devinit int
bvme6000_probe(struct device *dev)
{
- struct Scsi_Host * host = NULL;
+ struct Scsi_Host *host;
struct NCR_700_Host_Parameters *hostdata;
if (!MACH_IS_BVME6000)
goto out;
- hostdata = kmalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL);
- if (hostdata == NULL) {
+ hostdata = kzalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL);
+ if (!hostdata) {
printk(KERN_ERR "bvme6000-scsi: "
"Failed to allocate host data\n");
goto out;
}
- memset(hostdata, 0, sizeof(struct NCR_700_Host_Parameters));
/* Fill in the required pieces of hostdata */
hostdata->base = (void __iomem *)BVME_NCR53C710_BASE;
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 07] drivers/block/cciss.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (5 preceding siblings ...)
2007-07-31 17:01 ` [PATCH 06] drivers/scsi/bvme6000_scsi.c: " Mariusz Kozlowski
@ 2007-07-31 17:03 ` Mariusz Kozlowski
2007-07-31 17:14 ` Miller, Mike (OS Dev)
2007-07-31 17:05 ` [PATCH 08] fs/cifs/connect.c: " Mariusz Kozlowski
` (75 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 17:03 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, iss_storagedev, axboe
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/block/cciss.c | 104285 -> 104168 (-117 bytes)
drivers/block/cciss.o | 277400 -> 277124 (-276 bytes)
drivers/block/cciss.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/block/cciss.c 2007-07-26 13:07:41.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/block/cciss.c 2007-07-31 12:57:50.000000000 +0200
@@ -1977,12 +1977,13 @@ cciss_read_capacity(int ctlr, int logvol
{
ReadCapdata_struct *buf;
int return_code;
- buf = kmalloc(sizeof(ReadCapdata_struct), GFP_KERNEL);
- if (buf == NULL) {
+
+ buf = kzalloc(sizeof(ReadCapdata_struct), GFP_KERNEL);
+ if (!buf) {
printk(KERN_WARNING "cciss: out of memory\n");
return;
}
- memset(buf, 0, sizeof(ReadCapdata_struct));
+
if (withirq)
return_code = sendcmd_withirq(CCISS_READ_CAPACITY,
ctlr, buf, sizeof(ReadCapdata_struct),
@@ -2003,7 +2004,6 @@ cciss_read_capacity(int ctlr, int logvol
printk(KERN_INFO " blocks= %llu block_size= %d\n",
(unsigned long long)*total_size+1, *block_size);
kfree(buf);
- return;
}
static void
@@ -2011,12 +2011,13 @@ cciss_read_capacity_16(int ctlr, int log
{
ReadCapdata_struct_16 *buf;
int return_code;
- buf = kmalloc(sizeof(ReadCapdata_struct_16), GFP_KERNEL);
- if (buf == NULL) {
+
+ buf = kzalloc(sizeof(ReadCapdata_struct_16), GFP_KERNEL);
+ if (!buf) {
printk(KERN_WARNING "cciss: out of memory\n");
return;
}
- memset(buf, 0, sizeof(ReadCapdata_struct_16));
+
if (withirq) {
return_code = sendcmd_withirq(CCISS_READ_CAPACITY_16,
ctlr, buf, sizeof(ReadCapdata_struct_16),
@@ -2038,7 +2039,6 @@ cciss_read_capacity_16(int ctlr, int log
printk(KERN_INFO " blocks= %llu block_size= %d\n",
(unsigned long long)*total_size+1, *block_size);
kfree(buf);
- return;
}
static int cciss_revalidate(struct gendisk *disk)
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 08] fs/cifs/connect.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (6 preceding siblings ...)
2007-07-31 17:03 ` [PATCH 07] drivers/block/cciss.c: " Mariusz Kozlowski
@ 2007-07-31 17:05 ` Mariusz Kozlowski
2007-07-31 17:08 ` [PATCH 09] drivers/char/consolemap.c: " Mariusz Kozlowski
` (74 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 17:05 UTC (permalink / raw)
To: linux-kernel
Cc: kernel-janitors, Andrew Morton, sfrench, linux-cifs-client,
samba-technical
This patch does kmalloc + memset conversion to kzalloc and removes some redundant
argument checks.
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
fs/cifs/connect.c | 109282 -> 109078 (-204 bytes)
fs/cifs/connect.o | 211804 -> 211576 (-228 bytes)
fs/cifs/connect.c | 30 +++++++++++-------------------
1 file changed, 11 insertions(+), 19 deletions(-)
--- linux-2.6.23-rc1-mm1-a/fs/cifs/connect.c 2007-07-26 13:07:46.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/fs/cifs/connect.c 2007-07-31 14:51:20.000000000 +0200
@@ -676,10 +676,8 @@ multi_t2_fnd:
server->ssocket = NULL;
}
/* buffer usuallly freed in free_mid - need to free it here on exit */
- if (bigbuf != NULL)
- cifs_buf_release(bigbuf);
- if (smallbuf != NULL)
- cifs_small_buf_release(smallbuf);
+ cifs_buf_release(bigbuf);
+ cifs_small_buf_release(smallbuf);
read_lock(&GlobalSMBSeslock);
if (list_empty(&server->pending_mid_q)) {
@@ -1909,8 +1907,8 @@ cifs_mount(struct super_block *sb, struc
return rc;
}
- srvTcp = kmalloc(sizeof (struct TCP_Server_Info), GFP_KERNEL);
- if (srvTcp == NULL) {
+ srvTcp = kzalloc(sizeof(struct TCP_Server_Info), GFP_KERNEL);
+ if (!srvTcp) {
rc = -ENOMEM;
sock_release(csocket);
kfree(volume_info.UNC);
@@ -1919,7 +1917,6 @@ cifs_mount(struct super_block *sb, struc
FreeXid(xid);
return rc;
} else {
- memset(srvTcp, 0, sizeof (struct TCP_Server_Info));
memcpy(&srvTcp->addr.sockAddr, &sin_server,
sizeof (struct sockaddr_in));
atomic_set(&srvTcp->inFlight, 0);
@@ -2154,8 +2151,8 @@ cifs_mount(struct super_block *sb, struc
}
}
/* If find_unc succeeded then rc == 0 so we can not end */
- if (tcon) /* up accidently freeing someone elses tcon struct */
- tconInfoFree(tcon);
+ /* up accidently freeing someone elses tcon struct */
+ tconInfoFree(tcon);
if (existingCifsSes == NULL) {
if (pSesInfo) {
if ((pSesInfo->server) &&
@@ -2526,8 +2523,7 @@ CIFSSessSetup(unsigned int xid, struct c
sesssetup_nomem: /* do not return an error on nomem for the info strings,
since that could make reconnection harder, and
reconnection might be needed to free memory */
- if (smb_buffer)
- cifs_buf_release(smb_buffer);
+ cifs_buf_release(smb_buffer);
return rc;
}
@@ -2865,8 +2861,7 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned i
rc = -EIO;
}
- if (smb_buffer)
- cifs_buf_release(smb_buffer);
+ cifs_buf_release(smb_buffer);
return rc;
}
@@ -3279,8 +3274,7 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xi
rc = -EIO;
}
- if (smb_buffer)
- cifs_buf_release(smb_buffer);
+ cifs_buf_release(smb_buffer);
return rc;
}
@@ -3433,8 +3427,7 @@ CIFSTCon(unsigned int xid, struct cifsSe
ses->ipc_tid = smb_buffer_response->Tid;
}
- if (smb_buffer)
- cifs_buf_release(smb_buffer);
+ cifs_buf_release(smb_buffer);
return rc;
}
@@ -3485,8 +3478,7 @@ cifs_umount(struct super_block *sb, stru
kfree(tmp);
if (ses)
schedule_timeout_interruptible(msecs_to_jiffies(500));
- if (ses)
- sesInfoFree(ses);
+ sesInfoFree(ses);
FreeXid(xid);
return rc; /* BB check if we should always return zero here */
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 09] drivers/char/consolemap.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (7 preceding siblings ...)
2007-07-31 17:05 ` [PATCH 08] fs/cifs/connect.c: " Mariusz Kozlowski
@ 2007-07-31 17:08 ` Mariusz Kozlowski
2007-08-01 0:19 ` Alan Cox
2007-07-31 17:12 ` [PATCH 10] drivers/block/cpqarray.c: better error handling and kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (73 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 17:08 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/char/consolemap.c | 22678 -> 22650 (-28 bytes)
drivers/char/consolemap.o | 90113 -> 90029 (-84 bytes)
drivers/char/consolemap.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/char/consolemap.c 2007-07-26 13:07:41.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/char/consolemap.c 2007-07-31 11:24:24.000000000 +0200
@@ -494,12 +494,11 @@ int con_clear_unimap(struct vc_data *vc,
p = (struct uni_pagedir *)*vc->vc_uni_pagedir_loc;
if (p && p->readonly) return -EIO;
if (!p || --p->refcount) {
- q = kmalloc(sizeof(*p), GFP_KERNEL);
+ q = kzalloc(sizeof(*p), GFP_KERNEL);
if (!q) {
if (p) p->refcount++;
return -ENOMEM;
}
- memset(q, 0, sizeof(*q));
q->refcount=1;
*vc->vc_uni_pagedir_loc = (unsigned long)q;
} else {
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 10] drivers/block/cpqarray.c: better error handling and kmalloc + memset conversion to k[cz]alloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (8 preceding siblings ...)
2007-07-31 17:08 ` [PATCH 09] drivers/char/consolemap.c: " Mariusz Kozlowski
@ 2007-07-31 17:12 ` Mariusz Kozlowski
2007-07-31 20:16 ` Miller, Mike (OS Dev)
2007-07-31 17:14 ` [PATCH 11] drivers/pci/hotplug/cpqphp_ctrl.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
` (72 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 17:12 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, iss_storagedev, axboe
This patch removes some redundant casts, does the kmalloc + memset to k[cz]alloc conversion
and it changes the error path to use goto (to avoid code duplication).
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/block/cpqarray.c | 49567 -> 48623 (-944 bytes)
drivers/block/cpqarray.o | 178820 -> 178288 (-532 bytes)
drivers/block/cpqarray.c | 78 ++++++++++++-------------------------
1 file changed, 26 insertions(+), 52 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/block/cpqarray.c 2007-07-26 13:07:41.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/block/cpqarray.c 2007-07-31 12:59:54.000000000 +0200
@@ -420,18 +420,17 @@ static int __init cpqarray_register_ctlr
goto Enomem2;
}
- hba[i]->cmd_pool = (cmdlist_t *)pci_alloc_consistent(
+ hba[i]->cmd_pool = pci_alloc_consistent(
hba[i]->pci_dev, NR_CMDS * sizeof(cmdlist_t),
&(hba[i]->cmd_pool_dhandle));
- hba[i]->cmd_pool_bits = kmalloc(
- ((NR_CMDS+BITS_PER_LONG-1)/BITS_PER_LONG)*sizeof(unsigned long),
+ hba[i]->cmd_pool_bits = kcalloc(
+ (NR_CMDS+BITS_PER_LONG-1)/BITS_PER_LONG, sizeof(unsigned long),
GFP_KERNEL);
if (!hba[i]->cmd_pool_bits || !hba[i]->cmd_pool)
goto Enomem1;
memset(hba[i]->cmd_pool, 0, NR_CMDS * sizeof(cmdlist_t));
- memset(hba[i]->cmd_pool_bits, 0, ((NR_CMDS+BITS_PER_LONG-1)/BITS_PER_LONG)*sizeof(unsigned long));
printk(KERN_INFO "cpqarray: Finding drives on %s",
hba[i]->devname);
@@ -1660,45 +1659,30 @@ static void getgeometry(int ctlr)
info_p->log_drv_map = 0;
- id_ldrive = kmalloc(sizeof(id_log_drv_t), GFP_KERNEL);
- if(id_ldrive == NULL)
- {
+ id_ldrive = kzalloc(sizeof(id_log_drv_t), GFP_KERNEL);
+ if (!id_ldrive) {
printk( KERN_ERR "cpqarray: out of memory.\n");
- return;
+ goto err_0;
}
- id_ctlr_buf = kmalloc(sizeof(id_ctlr_t), GFP_KERNEL);
- if(id_ctlr_buf == NULL)
- {
- kfree(id_ldrive);
+ id_ctlr_buf = kzalloc(sizeof(id_ctlr_t), GFP_KERNEL);
+ if (!id_ctlr_buf) {
printk( KERN_ERR "cpqarray: out of memory.\n");
- return;
+ goto err_1;
}
- id_lstatus_buf = kmalloc(sizeof(sense_log_drv_stat_t), GFP_KERNEL);
- if(id_lstatus_buf == NULL)
- {
- kfree(id_ctlr_buf);
- kfree(id_ldrive);
+ id_lstatus_buf = kzalloc(sizeof(sense_log_drv_stat_t), GFP_KERNEL);
+ if (!id_lstatus_buf) {
printk( KERN_ERR "cpqarray: out of memory.\n");
- return;
+ goto err_2;
}
- sense_config_buf = kmalloc(sizeof(config_t), GFP_KERNEL);
- if(sense_config_buf == NULL)
- {
- kfree(id_lstatus_buf);
- kfree(id_ctlr_buf);
- kfree(id_ldrive);
+ sense_config_buf = kzalloc(sizeof(config_t), GFP_KERNEL);
+ if (!sense_config_buf) {
printk( KERN_ERR "cpqarray: out of memory.\n");
- return;
+ goto err_3;
}
- memset(id_ldrive, 0, sizeof(id_log_drv_t));
- memset(id_ctlr_buf, 0, sizeof(id_ctlr_t));
- memset(id_lstatus_buf, 0, sizeof(sense_log_drv_stat_t));
- memset(sense_config_buf, 0, sizeof(config_t));
-
info_p->phys_drives = 0;
info_p->log_drv_map = 0;
info_p->drv_assign_map = 0;
@@ -1712,13 +1696,8 @@ static void getgeometry(int ctlr)
* so the idastubopen will fail on all logical drives
* on the controller.
*/
- /* Free all the buffers and return */
printk(KERN_ERR "cpqarray: error sending ID controller\n");
- kfree(sense_config_buf);
- kfree(id_lstatus_buf);
- kfree(id_ctlr_buf);
- kfree(id_ldrive);
- return;
+ goto err_4;
}
info_p->log_drives = id_ctlr_buf->nr_drvs;
@@ -1764,12 +1743,7 @@ static void getgeometry(int ctlr)
" failed to report status of logical drive %d\n"
"Access to this controller has been disabled\n",
ctlr, log_unit);
- /* Free all the buffers and return */
- kfree(sense_config_buf);
- kfree(id_lstatus_buf);
- kfree(id_ctlr_buf);
- kfree(id_ldrive);
- return;
+ goto err_4;
}
/*
Make sure the logical drive is configured
@@ -1798,14 +1772,8 @@ static void getgeometry(int ctlr)
sizeof(config_t), 0, 0, log_unit);
if (ret_code == IO_ERROR) {
info_p->log_drv_map = 0;
- /* Free all the buffers and return */
printk(KERN_ERR "cpqarray: error sending sense config\n");
- kfree(sense_config_buf);
- kfree(id_lstatus_buf);
- kfree(id_ctlr_buf);
- kfree(id_ldrive);
- return;
-
+ goto err_4;
}
info_p->phys_drives =
@@ -1820,12 +1788,18 @@ static void getgeometry(int ctlr)
log_index = log_index + 1;
} /* end of if logical drive configured */
} /* end of for log_unit */
+
+ /* Free all the buffers and return */
+err_4:
kfree(sense_config_buf);
- kfree(id_ldrive);
+err_3:
kfree(id_lstatus_buf);
+err_2:
kfree(id_ctlr_buf);
+err_1:
+ kfree(id_ldrive);
+err_0:
return;
-
}
static void __exit cpqarray_exit(void)
^ permalink raw reply [flat|nested] 131+ messages in thread
* RE: [PATCH 07] drivers/block/cciss.c: kmalloc + memset conversion to kzalloc
2007-07-31 17:03 ` [PATCH 07] drivers/block/cciss.c: " Mariusz Kozlowski
@ 2007-07-31 17:14 ` Miller, Mike (OS Dev)
0 siblings, 0 replies; 131+ messages in thread
From: Miller, Mike (OS Dev) @ 2007-07-31 17:14 UTC (permalink / raw)
To: Mariusz Kozlowski, linux-kernel
Cc: kernel-janitors, Andrew Morton, ISS StorageDev, axboe
> -----Original Message-----
> From: Mariusz Kozlowski [mailto:m.kozlowski@tuxland.pl]
> Sent: Tuesday, July 31, 2007 12:04 PM
> To: linux-kernel@vger.kernel.org
> Cc: kernel-janitors@vger.kernel.org; Andrew Morton; ISS
> StorageDev; axboe@kernel.dk
> Subject: [PATCH 07] drivers/block/cciss.c: kmalloc + memset
> conversion to kzalloc
>
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Acked-by: Mike Miller <mike.miller@hp.com>
>
> drivers/block/cciss.c | 104285 -> 104168 (-117 bytes)
> drivers/block/cciss.o | 277400 -> 277124 (-276 bytes)
>
> drivers/block/cciss.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> --- linux-2.6.23-rc1-mm1-a/drivers/block/cciss.c
> 2007-07-26 13:07:41.000000000 +0200
> +++ linux-2.6.23-rc1-mm1-b/drivers/block/cciss.c
> 2007-07-31 12:57:50.000000000 +0200
> @@ -1977,12 +1977,13 @@ cciss_read_capacity(int ctlr, int logvol {
> ReadCapdata_struct *buf;
> int return_code;
> - buf = kmalloc(sizeof(ReadCapdata_struct), GFP_KERNEL);
> - if (buf == NULL) {
> +
> + buf = kzalloc(sizeof(ReadCapdata_struct), GFP_KERNEL);
> + if (!buf) {
> printk(KERN_WARNING "cciss: out of memory\n");
> return;
> }
> - memset(buf, 0, sizeof(ReadCapdata_struct));
> +
> if (withirq)
> return_code = sendcmd_withirq(CCISS_READ_CAPACITY,
> ctlr, buf,
> sizeof(ReadCapdata_struct), @@ -2003,7 +2004,6 @@
> cciss_read_capacity(int ctlr, int logvol
> printk(KERN_INFO " blocks= %llu block_size= %d\n",
> (unsigned long long)*total_size+1, *block_size);
> kfree(buf);
> - return;
> }
>
> static void
> @@ -2011,12 +2011,13 @@ cciss_read_capacity_16(int ctlr, int log {
> ReadCapdata_struct_16 *buf;
> int return_code;
> - buf = kmalloc(sizeof(ReadCapdata_struct_16), GFP_KERNEL);
> - if (buf == NULL) {
> +
> + buf = kzalloc(sizeof(ReadCapdata_struct_16), GFP_KERNEL);
> + if (!buf) {
> printk(KERN_WARNING "cciss: out of memory\n");
> return;
> }
> - memset(buf, 0, sizeof(ReadCapdata_struct_16));
> +
> if (withirq) {
> return_code = sendcmd_withirq(CCISS_READ_CAPACITY_16,
> ctlr, buf,
> sizeof(ReadCapdata_struct_16), @@ -2038,7 +2039,6 @@
> cciss_read_capacity_16(int ctlr, int log
> printk(KERN_INFO " blocks= %llu block_size= %d\n",
> (unsigned long long)*total_size+1, *block_size);
> kfree(buf);
> - return;
> }
>
> static int cciss_revalidate(struct gendisk *disk)
>
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 11] drivers/pci/hotplug/cpqphp_ctrl.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (9 preceding siblings ...)
2007-07-31 17:12 ` [PATCH 10] drivers/block/cpqarray.c: better error handling and kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
@ 2007-07-31 17:14 ` Mariusz Kozlowski
2007-07-31 17:16 ` [PATCH 12] fs/reiser4/plugin/file/cryptcompress.c: " Mariusz Kozlowski
` (71 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 17:14 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, greg
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/pci/hotplug/cpqphp_ctrl.c | 79698 -> 79638 (-60 bytes)
drivers/pci/hotplug/cpqphp_ctrl.o | 192896 -> 192736 (-160 bytes)
drivers/pci/hotplug/cpqphp_ctrl.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/pci/hotplug/cpqphp_ctrl.c 2007-07-26 13:07:43.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/pci/hotplug/cpqphp_ctrl.c 2007-07-31 13:56:47.000000000 +0200
@@ -973,16 +973,13 @@ struct pci_func *cpqhp_slot_create(u8 bu
struct pci_func *new_slot;
struct pci_func *next;
- new_slot = kmalloc(sizeof(*new_slot), GFP_KERNEL);
-
- if (new_slot == NULL) {
+ new_slot = kzalloc(sizeof(*new_slot), GFP_KERNEL);
+ if (!new_slot) {
/* I'm not dead yet!
* You will be. */
- return new_slot;
+ return NULL;
}
- memset(new_slot, 0, sizeof(struct pci_func));
-
new_slot->next = NULL;
new_slot->configured = 1;
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 12] fs/reiser4/plugin/file/cryptcompress.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (10 preceding siblings ...)
2007-07-31 17:14 ` [PATCH 11] drivers/pci/hotplug/cpqphp_ctrl.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
@ 2007-07-31 17:16 ` Mariusz Kozlowski
2007-07-31 17:17 ` [PATCH 13] " Mariusz Kozlowski
` (70 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 17:16 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, reiserfs-dev, reiserfs-devel
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
fs/reiser4/plugin/file/cryptcompress.c | 101386 -> 101352 (-34 bytes)
fs/reiser4/plugin/file/cryptcompress.o | 456784 -> 456644 (-140 bytes)
fs/reiser4/plugin/file/cryptcompress.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- linux-2.6.23-rc1-mm1-a/fs/reiser4/plugin/file/cryptcompress.c 2007-07-26 13:07:46.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/fs/reiser4/plugin/file/cryptcompress.c 2007-07-31 15:00:24.000000000 +0200
@@ -74,13 +74,13 @@ static void set_inode_crypto_info (struc
/* allocate a cipher key info */
struct reiser4_crypto_info * reiser4_alloc_crypto_info (struct inode * inode)
{
- struct reiser4_crypto_info * info;
+ struct reiser4_crypto_info *info;
int fipsize;
- info = kmalloc(sizeof(*info), reiser4_ctx_gfp_mask_get());
+ info = kzalloc(sizeof(*info), reiser4_ctx_gfp_mask_get());
if (!info)
return ERR_PTR(-ENOMEM);
- memset(info, 0, sizeof (*info));
+
fipsize = inode_digest_plugin(inode)->fipsize;
info->keyid = kmalloc(fipsize, reiser4_ctx_gfp_mask_get());
if (!info->keyid) {
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 13] kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (11 preceding siblings ...)
2007-07-31 17:16 ` [PATCH 12] fs/reiser4/plugin/file/cryptcompress.c: " Mariusz Kozlowski
@ 2007-07-31 17:17 ` Mariusz Kozlowski
2007-07-31 17:19 ` [PATCH 14] " Mariusz Kozlowski
` (69 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 17:17 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, reiserfs-dev, reiserfs-devel
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
fs/reiser4/plugin/file/cryptcompress.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- linux-2.6.23-rc1-mm1-a/fs/reiser4/plugin/file/cryptcompress.h 2007-07-26 13:07:46.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/fs/reiser4/plugin/file/cryptcompress.h 2007-07-31 15:01:29.000000000 +0200
@@ -83,10 +83,9 @@ static inline int alloc_ts(struct tfm_st
assert("edward-931", stm);
assert("edward-932", *stm == NULL);
- *stm = kmalloc(sizeof **stm, reiser4_ctx_gfp_mask_get());
- if (*stm == NULL)
+ *stm = kzalloc(sizeof(**stm), reiser4_ctx_gfp_mask_get());
+ if (!*stm)
return -ENOMEM;
- memset(*stm, 0, sizeof **stm);
return 0;
}
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 14] kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (12 preceding siblings ...)
2007-07-31 17:17 ` [PATCH 13] " Mariusz Kozlowski
@ 2007-07-31 17:19 ` Mariusz Kozlowski
2007-07-31 17:21 ` [PATCH 15] " Mariusz Kozlowski
` (68 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 17:19 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, reiserfs-dev, reiserfs-devel
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
fs/reiser4/plugin/item/ctail.c | 41897 -> 41859 (-38 bytes)
fs/reiser4/plugin/item/ctail.o | 306180 -> 305904 (-276 bytes)
fs/reiser4/plugin/item/ctail.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- linux-2.6.23-rc1-mm1-a/fs/reiser4/plugin/item/ctail.c 2007-07-26 13:07:46.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/fs/reiser4/plugin/item/ctail.c 2007-07-31 15:03:52.000000000 +0200
@@ -1148,10 +1148,10 @@ static int alloc_convert_data(flush_pos_
assert("edward-821", pos != NULL);
assert("edward-822", pos->sq == NULL);
- pos->sq = kmalloc(sizeof(*pos->sq), reiser4_ctx_gfp_mask_get());
+ pos->sq = kzalloc(sizeof(*pos->sq), reiser4_ctx_gfp_mask_get());
if (!pos->sq)
return RETERR(-ENOMEM);
- memset(pos->sq, 0, sizeof(*pos->sq));
+
cluster_init_write(&pos->sq->clust, NULL);
return 0;
}
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 15] kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (13 preceding siblings ...)
2007-07-31 17:19 ` [PATCH 14] " Mariusz Kozlowski
@ 2007-07-31 17:21 ` Mariusz Kozlowski
2007-07-31 17:23 ` [PATCH 16] drivers/md/dm-hw-handler.c: " Mariusz Kozlowski
` (67 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 17:21 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/md/dm-emc.c | 8547 -> 8518 (-29 bytes)
drivers/md/dm-emc.o | 107484 -> 107416 (-68 bytes)
drivers/md/dm-emc.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/md/dm-emc.c 2007-07-26 13:07:41.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/md/dm-emc.c 2007-07-31 13:16:01.000000000 +0200
@@ -224,12 +224,11 @@ fail_path:
static struct emc_handler *alloc_emc_handler(void)
{
- struct emc_handler *h = kmalloc(sizeof(*h), GFP_KERNEL);
+ struct emc_handler *h;
- if (h) {
- memset(h, 0, sizeof(*h));
+ h = kzalloc(sizeof(*h), GFP_KERNEL);
+ if (h)
spin_lock_init(&h->lock);
- }
return h;
}
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 16] drivers/md/dm-hw-handler.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (14 preceding siblings ...)
2007-07-31 17:21 ` [PATCH 15] " Mariusz Kozlowski
@ 2007-07-31 17:23 ` Mariusz Kozlowski
2007-07-31 17:25 ` [PATCH 17] drivers/md/dm-path-selector.c: " Mariusz Kozlowski
` (66 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 17:23 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/md/dm-hw-handler.c | 4424 -> 4393 (-31 bytes)
drivers/md/dm-hw-handler.o | 101828 -> 101652 (-176 bytes)
drivers/md/dm-hw-handler.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/md/dm-hw-handler.c 2007-07-26 13:07:41.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/md/dm-hw-handler.c 2007-07-31 11:28:10.000000000 +0200
@@ -91,12 +91,11 @@ void dm_put_hw_handler(struct hw_handler
static struct hwh_internal *_alloc_hw_handler(struct hw_handler_type *hwht)
{
- struct hwh_internal *hwhi = kmalloc(sizeof(*hwhi), GFP_KERNEL);
-
- if (hwhi) {
- memset(hwhi, 0, sizeof(*hwhi));
+ struct hwh_internal *hwhi;
+
+ hwhi = kzalloc(sizeof(*hwhi), GFP_KERNEL);
+ if (hwhi)
hwhi->hwht = *hwht;
- }
return hwhi;
}
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 17] drivers/md/dm-path-selector.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (15 preceding siblings ...)
2007-07-31 17:23 ` [PATCH 16] drivers/md/dm-hw-handler.c: " Mariusz Kozlowski
@ 2007-07-31 17:25 ` Mariusz Kozlowski
2007-07-31 17:26 ` [PATCH 18] drivers/md/dm-table.c: " Mariusz Kozlowski
` (65 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 17:25 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/md/dm-path-selector.c | 2666 -> 2636 (-30 bytes)
drivers/md/dm-path-selector.o | 101207 -> 101031 (-176 bytes)
drivers/md/dm-path-selector.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/md/dm-path-selector.c 2007-07-26 13:07:41.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/md/dm-path-selector.c 2007-07-31 11:26:53.000000000 +0200
@@ -94,12 +94,11 @@ out:
static struct ps_internal *_alloc_path_selector(struct path_selector_type *pst)
{
- struct ps_internal *psi = kmalloc(sizeof(*psi), GFP_KERNEL);
-
- if (psi) {
- memset(psi, 0, sizeof(*psi));
+ struct ps_internal *psi;
+
+ psi = kzalloc(sizeof(*psi), GFP_KERNEL);
+ if (psi)
psi->pst = *pst;
- }
return psi;
}
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 18] drivers/md/dm-table.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (16 preceding siblings ...)
2007-07-31 17:25 ` [PATCH 17] drivers/md/dm-path-selector.c: " Mariusz Kozlowski
@ 2007-07-31 17:26 ` Mariusz Kozlowski
2007-07-31 17:29 ` [PATCH 19] drivers/md/dm-target.c: " Mariusz Kozlowski
` (64 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 17:26 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/md/dm-table.c | 21698 -> 21664 (-34 bytes)
drivers/md/dm-table.o | 132153 -> 132093 (-60 bytes)
drivers/md/dm-table.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/md/dm-table.c 2007-07-26 13:07:41.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/md/dm-table.c 2007-07-31 13:19:43.000000000 +0200
@@ -213,12 +213,12 @@ static int alloc_targets(struct dm_table
int dm_table_create(struct dm_table **result, int mode,
unsigned num_targets, struct mapped_device *md)
{
- struct dm_table *t = kmalloc(sizeof(*t), GFP_KERNEL);
-
+ struct dm_table *t;
+
+ t = kzalloc(sizeof(*t), GFP_KERNEL);
if (!t)
return -ENOMEM;
- memset(t, 0, sizeof(*t));
INIT_LIST_HEAD(&t->devices);
atomic_set(&t->holders, 1);
@@ -229,7 +229,6 @@ int dm_table_create(struct dm_table **re
if (alloc_targets(t, num_targets)) {
kfree(t);
- t = NULL;
return -ENOMEM;
}
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 19] drivers/md/dm-target.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (17 preceding siblings ...)
2007-07-31 17:26 ` [PATCH 18] drivers/md/dm-table.c: " Mariusz Kozlowski
@ 2007-07-31 17:29 ` Mariusz Kozlowski
2007-07-31 17:33 ` [PATCH 20] net/decnet/dn_route.c: " Mariusz Kozlowski
` (63 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 17:29 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/md/dm-target.c | 3300 -> 3271 (-29 bytes)
drivers/md/dm-target.o | 105641 -> 105449 (-192 bytes)
drivers/md/dm-target.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/md/dm-target.c 2007-07-26 13:07:41.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/md/dm-target.c 2007-07-31 11:26:04.000000000 +0200
@@ -88,12 +88,11 @@ void dm_put_target_type(struct target_ty
static struct tt_internal *alloc_target(struct target_type *t)
{
- struct tt_internal *ti = kmalloc(sizeof(*ti), GFP_KERNEL);
-
- if (ti) {
- memset(ti, 0, sizeof(*ti));
+ struct tt_internal *ti;
+
+ ti = kzalloc(sizeof(*ti), GFP_KERNEL);
+ if (ti)
ti->tt = *t;
- }
return ti;
}
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 20] net/decnet/dn_route.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (18 preceding siblings ...)
2007-07-31 17:29 ` [PATCH 19] drivers/md/dm-target.c: " Mariusz Kozlowski
@ 2007-07-31 17:33 ` Mariusz Kozlowski
2007-07-31 21:06 ` David Miller
2007-07-31 17:35 ` [PATCH 21] drivers/scsi/dpt_i2o.c: " Mariusz Kozlowski
` (62 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 17:33 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, netdev, patrick
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
net/decnet/dn_route.c | 45013 -> 44991 (-22 bytes)
net/decnet/dn_route.o | 199388 -> 199580 (+192 bytes)
net/decnet/dn_route.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- linux-2.6.23-rc1-mm1-a/net/decnet/dn_route.c 2007-07-26 13:07:44.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/net/decnet/dn_route.c 2007-07-31 15:15:11.000000000 +0200
@@ -1737,8 +1737,9 @@ static int dn_rt_cache_seq_open(struct i
{
struct seq_file *seq;
int rc = -ENOMEM;
- struct dn_rt_cache_iter_state *s = kmalloc(sizeof(*s), GFP_KERNEL);
-
+ struct dn_rt_cache_iter_state *s;
+
+ s = kzalloc(sizeof(*s), GFP_KERNEL);
if (!s)
goto out;
rc = seq_open(file, &dn_rt_cache_seq_ops);
@@ -1746,7 +1747,6 @@ static int dn_rt_cache_seq_open(struct i
goto out_kfree;
seq = file->private_data;
seq->private = s;
- memset(s, 0, sizeof(*s));
out:
return rc;
out_kfree:
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 21] drivers/scsi/dpt_i2o.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (19 preceding siblings ...)
2007-07-31 17:33 ` [PATCH 20] net/decnet/dn_route.c: " Mariusz Kozlowski
@ 2007-07-31 17:35 ` Mariusz Kozlowski
2007-07-31 17:45 ` Salyzyn, Mark
2007-07-31 17:36 ` [PATCH 22] drivers/net/e1000new/ethtool.c: " Mariusz Kozlowski
` (61 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 17:35 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, linux-scsi, aacraid
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/scsi/dpt_i2o.c | 87632 -> 87457 (-175 bytes)
drivers/scsi/dpt_i2o.o | 213064 -> 212324 (-740 bytes)
drivers/scsi/dpt_i2o.c | 27 +++++++++++----------------
1 file changed, 11 insertions(+), 16 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/scsi/dpt_i2o.c 2007-07-26 13:07:42.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/scsi/dpt_i2o.c 2007-07-31 11:17:32.000000000 +0200
@@ -950,16 +950,14 @@ static int adpt_install_hba(struct scsi_
}
// Allocate and zero the data structure
- pHba = kmalloc(sizeof(adpt_hba), GFP_KERNEL);
- if( pHba == NULL) {
- if(msg_addr_virt != base_addr_virt){
+ pHba = kzalloc(sizeof(adpt_hba), GFP_KERNEL);
+ if (!pHba) {
+ if (msg_addr_virt != base_addr_virt)
iounmap(msg_addr_virt);
- }
iounmap(base_addr_virt);
pci_release_regions(pDev);
return -ENOMEM;
}
- memset(pHba, 0, sizeof(adpt_hba));
mutex_lock(&adpt_configuration_lock);
@@ -2667,14 +2665,13 @@ static s32 adpt_i2o_init_outbound_q(adpt
msg=(u32 __iomem *)(pHba->msg_addr_virt+m);
- status = kmalloc(4,GFP_KERNEL|ADDR32);
- if (status==NULL) {
+ status = kzalloc(4, GFP_KERNEL|ADDR32);
+ if (!status) {
adpt_send_nop(pHba, m);
printk(KERN_WARNING"%s: IOP reset failed - no free memory.\n",
pHba->name);
return -ENOMEM;
}
- memset(status, 0, 4);
writel(EIGHT_WORD_MSG_SIZE| SGL_OFFSET_6, &msg[0]);
writel(I2O_CMD_OUTBOUND_INIT<<24 | HOST_TID<<12 | ADAPTER_TID, &msg[1]);
@@ -2713,12 +2710,11 @@ static s32 adpt_i2o_init_outbound_q(adpt
kfree(pHba->reply_pool);
- pHba->reply_pool = kmalloc(pHba->reply_fifo_size * REPLY_FRAME_SIZE * 4, GFP_KERNEL|ADDR32);
- if(!pHba->reply_pool){
- printk(KERN_ERR"%s: Could not allocate reply pool\n",pHba->name);
- return -1;
+ pHba->reply_pool = kzalloc(pHba->reply_fifo_size * REPLY_FRAME_SIZE * 4, GFP_KERNEL|ADDR32);
+ if (!pHba->reply_pool) {
+ printk(KERN_ERR "%s: Could not allocate reply pool\n", pHba->name);
+ return -ENOMEM;
}
- memset(pHba->reply_pool, 0 , pHba->reply_fifo_size * REPLY_FRAME_SIZE * 4);
ptr = pHba->reply_pool;
for(i = 0; i < pHba->reply_fifo_size; i++) {
@@ -2929,12 +2925,11 @@ static int adpt_i2o_build_sys_table(void
kfree(sys_tbl);
- sys_tbl = kmalloc(sys_tbl_len, GFP_KERNEL|ADDR32);
- if(!sys_tbl) {
+ sys_tbl = kzalloc(sys_tbl_len, GFP_KERNEL|ADDR32);
+ if (!sys_tbl) {
printk(KERN_WARNING "SysTab Set failed. Out of memory.\n");
return -ENOMEM;
}
- memset(sys_tbl, 0, sys_tbl_len);
sys_tbl->num_entries = hba_count;
sys_tbl->version = I2OVERSION;
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 22] drivers/net/e1000new/ethtool.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (20 preceding siblings ...)
2007-07-31 17:35 ` [PATCH 21] drivers/scsi/dpt_i2o.c: " Mariusz Kozlowski
@ 2007-07-31 17:36 ` Mariusz Kozlowski
2007-07-31 17:39 ` [PATCH 23] doc firmware_sample_firmware_class.c: " Mariusz Kozlowski
` (60 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 17:36 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, e1000-devel
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/net/e1000new/ethtool.c | 58607 -> 58527 (-80 bytes)
drivers/net/e1000new/ethtool.o | 197636 -> 197312 (-324 bytes)
drivers/net/e1000new/ethtool.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/net/e1000new/ethtool.c 2007-07-26 13:07:43.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/net/e1000new/ethtool.c 2007-07-30 00:31:08.000000000 +0200
@@ -1031,12 +1031,11 @@ static int e1000_setup_desc_rings(struct
tx_ring->count = E1000_DEFAULT_TXD;
size = tx_ring->count * sizeof(struct e1000_buffer);
- tx_ring->buffer_info = kmalloc(size, GFP_KERNEL);
+ tx_ring->buffer_info = kzalloc(size, GFP_KERNEL);
if (!tx_ring->buffer_info) {
ret_val = 1;
goto err_nomem;
}
- memset(tx_ring->buffer_info, 0, size);
tx_ring->size = tx_ring->count * sizeof(struct e1000_tx_desc);
tx_ring->size = ALIGN(tx_ring->size, 4096);
@@ -1092,12 +1091,11 @@ static int e1000_setup_desc_rings(struct
rx_ring->count = E1000_DEFAULT_RXD;
size = rx_ring->count * sizeof(struct e1000_buffer);
- rx_ring->buffer_info = kmalloc(size, GFP_KERNEL);
+ rx_ring->buffer_info = kzalloc(size, GFP_KERNEL);
if (!rx_ring->buffer_info) {
ret_val = 4;
goto err_nomem;
}
- memset(rx_ring->buffer_info, 0, size);
rx_ring->size = rx_ring->count * sizeof(struct e1000_rx_desc);
rx_ring->desc = pci_alloc_consistent(pdev, rx_ring->size,
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 23] doc firmware_sample_firmware_class.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (21 preceding siblings ...)
2007-07-31 17:36 ` [PATCH 22] drivers/net/e1000new/ethtool.c: " Mariusz Kozlowski
@ 2007-07-31 17:39 ` Mariusz Kozlowski
2007-07-31 17:40 ` [PATCH 24] include/asm-frv/thread_info.h: " Mariusz Kozlowski
` (59 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 17:39 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Documentation/firmware_class/firmware_sample_firmware_class.c | 5246 -> 5211 (-35 bytes)
Documentation/firmware_class/firmware_sample_firmware_class.c | 12 +++++-----
1 file changed, 6 insertions(+), 6 deletions(-)
--- linux-2.6.23-rc1-mm1-a/Documentation/firmware_class/firmware_sample_firmware_class.c 2007-07-26 13:07:45.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/Documentation/firmware_class/firmware_sample_firmware_class.c 2007-07-31 12:17:08.000000000 +0200
@@ -109,15 +109,15 @@ static int fw_setup_class_device(struct
const char *fw_name,
struct device *device)
{
- int retval = 0;
- struct firmware_priv *fw_priv = kmalloc(sizeof(struct firmware_priv),
- GFP_KERNEL);
-
- if(!fw_priv){
+ int retval;
+ struct firmware_priv *fw_priv;
+
+ fw_priv = kzalloc(sizeof(struct firmware_priv), GFP_KERNEL);
+ if (!fw_priv) {
retval = -ENOMEM;
goto out;
}
- memset(fw_priv, 0, sizeof(*fw_priv));
+
memset(class_dev, 0, sizeof(*class_dev));
strncpy(fw_priv->fw_id, fw_name, FIRMWARE_NAME_MAX);
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 24] include/asm-frv/thread_info.h: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (22 preceding siblings ...)
2007-07-31 17:39 ` [PATCH 23] doc firmware_sample_firmware_class.c: " Mariusz Kozlowski
@ 2007-07-31 17:40 ` Mariusz Kozlowski
2007-07-31 17:42 ` [PATCH 25] drivers/usb/misc/ftdi-elan.c: " Mariusz Kozlowski
` (58 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 17:40 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, dhowells
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
include/asm-frv/thread_info.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- linux-2.6.23-rc1-mm1-a/include/asm-frv/thread_info.h 2007-07-26 13:07:40.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/include/asm-frv/thread_info.h 2007-07-31 15:06:07.000000000 +0200
@@ -88,9 +88,8 @@ register struct thread_info *__current_t
({ \
struct thread_info *ret; \
\
- ret = kmalloc(THREAD_SIZE, GFP_KERNEL); \
- if (ret) \
- memset(ret, 0, THREAD_SIZE); \
+ ret = kzalloc(THREAD_SIZE, GFP_KERNEL); \
+ \
ret; \
})
#else
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 25] drivers/usb/misc/ftdi-elan.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (23 preceding siblings ...)
2007-07-31 17:40 ` [PATCH 24] include/asm-frv/thread_info.h: " Mariusz Kozlowski
@ 2007-07-31 17:42 ` Mariusz Kozlowski
2007-07-31 23:46 ` Christoph Lameter
2007-07-31 17:46 ` [PATCH 26] drivers/scsi/gdth.c: " Mariusz Kozlowski
` (57 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 17:42 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, tony.olech, linux-usb-devel
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/usb/misc/ftdi-elan.c | 121253 -> 121196 (-57 bytes)
drivers/usb/misc/ftdi-elan.o | 209425 -> 209265 (-160 bytes)
drivers/usb/misc/ftdi-elan.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/usb/misc/ftdi-elan.c 2007-07-26 13:07:41.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/usb/misc/ftdi-elan.c 2007-07-31 14:47:59.000000000 +0200
@@ -2777,12 +2777,14 @@ static int ftdi_elan_probe(struct usb_in
size_t buffer_size;
int i;
int retval = -ENOMEM;
- struct usb_ftdi *ftdi = kmalloc(sizeof(struct usb_ftdi), GFP_KERNEL);
- if (ftdi == NULL) {
+ struct usb_ftdi *ftdi;
+
+ ftdi = kzalloc(sizeof(struct usb_ftdi), GFP_KERNEL);
+ if (!ftdi) {
printk(KERN_ERR "Out of memory\n");
return -ENOMEM;
}
- memset(ftdi, 0x00, sizeof(struct usb_ftdi));
+
mutex_lock(&ftdi_module_lock);
list_add_tail(&ftdi->ftdi_list, &ftdi_static_list);
ftdi->sequence_num = ++ftdi_instances;
^ permalink raw reply [flat|nested] 131+ messages in thread
* RE: [PATCH 21] drivers/scsi/dpt_i2o.c: kmalloc + memset conversion to kzalloc
2007-07-31 17:35 ` [PATCH 21] drivers/scsi/dpt_i2o.c: " Mariusz Kozlowski
@ 2007-07-31 17:45 ` Salyzyn, Mark
0 siblings, 0 replies; 131+ messages in thread
From: Salyzyn, Mark @ 2007-07-31 17:45 UTC (permalink / raw)
To: Mariusz Kozlowski, linux-kernel
Cc: kernel-janitors, Andrew Morton, linux-scsi
ACK
Looks good and ultra-light on side effects!
Sincerely -- Mark Salyzyn
> -----Original Message-----
> From: Mariusz Kozlowski [mailto:m.kozlowski@tuxland.pl]
> Sent: Tuesday, July 31, 2007 1:35 PM
> To: linux-kernel@vger.kernel.org
> Cc: kernel-janitors@vger.kernel.org; Andrew Morton;
> linux-scsi@vger.kernel.org; AACRAID
> Subject: [PATCH 21] drivers/scsi/dpt_i2o.c: kmalloc + memset
> conversion to kzalloc
>
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
>
> drivers/scsi/dpt_i2o.c | 87632 -> 87457 (-175 bytes)
> drivers/scsi/dpt_i2o.o | 213064 -> 212324 (-740 bytes)
>
> drivers/scsi/dpt_i2o.c | 27 +++++++++++----------------
> 1 file changed, 11 insertions(+), 16 deletions(-)
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 26] drivers/scsi/gdth.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (24 preceding siblings ...)
2007-07-31 17:42 ` [PATCH 25] drivers/usb/misc/ftdi-elan.c: " Mariusz Kozlowski
@ 2007-07-31 17:46 ` Mariusz Kozlowski
2007-07-31 17:48 ` [PATCH 27] drivers/input/serio/gscps2.c: " Mariusz Kozlowski
` (56 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 17:46 UTC (permalink / raw)
To: linux-kernel
Cc: kernel-janitors, Andrew Morton, linux-scsi, achim_leubner,
boji.t.kannanthanam, johannes_dinner
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/scsi/gdth.c | 189401 -> 189342 (-59 bytes)
drivers/scsi/gdth.o | 331028 -> 330324 (-704 bytes)
drivers/scsi/gdth.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/scsi/gdth.c 2007-07-26 13:07:42.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/scsi/gdth.c 2007-07-31 14:08:37.000000000 +0200
@@ -458,10 +458,10 @@ int __gdth_execute(struct scsi_device *s
DECLARE_COMPLETION_ONSTACK(wait);
int rval;
- scp = kmalloc(sizeof(*scp), GFP_KERNEL);
+ scp = kzalloc(sizeof(*scp), GFP_KERNEL);
if (!scp)
return -ENOMEM;
- memset(scp, 0, sizeof(*scp));
+
scp->device = sdev;
/* use request field to save the ptr. to completion struct. */
scp->request = (struct request *)&wait;
@@ -5273,10 +5273,10 @@ static int gdth_ioctl(struct inode *inod
hanum = res.ionode;
ha = gdth_find_ha(hanum);
- scp = kmalloc(sizeof(*scp), GFP_KERNEL);
+ scp = kzalloc(sizeof(*scp), GFP_KERNEL);
if (!scp)
return -ENOMEM;
- memset(scp, 0, sizeof(*scp));
+
scp->device = ha->sdev;
scp->cmd_len = 12;
scp->use_sg = 0;
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 27] drivers/input/serio/gscps2.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (25 preceding siblings ...)
2007-07-31 17:46 ` [PATCH 26] drivers/scsi/gdth.c: " Mariusz Kozlowski
@ 2007-07-31 17:48 ` Mariusz Kozlowski
2007-07-31 17:49 ` [PATCH 28] drivers/net/wan/hdlc_fr.c: " Mariusz Kozlowski
` (55 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 17:48 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, Helge Deller, linux-input
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/input/serio/gscps2.c | 11696 -> 11607 (-89 bytes)
drivers/input/serio/gscps2.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/input/serio/gscps2.c 2007-07-26 13:07:44.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/input/serio/gscps2.c 2007-07-30 00:12:31.000000000 +0200
@@ -340,8 +340,8 @@ static int __init gscps2_probe(struct pa
if (dev->id.sversion == 0x96)
hpa += GSC_DINO_OFFSET;
- ps2port = kmalloc(sizeof(struct gscps2port), GFP_KERNEL);
- serio = kmalloc(sizeof(struct serio), GFP_KERNEL);
+ ps2port = kzalloc(sizeof(struct gscps2port), GFP_KERNEL);
+ serio = kzalloc(sizeof(struct serio), GFP_KERNEL);
if (!ps2port || !serio) {
ret = -ENOMEM;
goto fail_nomem;
@@ -349,8 +349,6 @@ static int __init gscps2_probe(struct pa
dev_set_drvdata(&dev->dev, ps2port);
- memset(ps2port, 0, sizeof(struct gscps2port));
- memset(serio, 0, sizeof(struct serio));
ps2port->port = serio;
ps2port->padev = dev;
ps2port->addr = ioremap_nocache(hpa, GSC_STATUS + 4);
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 28] drivers/net/wan/hdlc_fr.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (26 preceding siblings ...)
2007-07-31 17:48 ` [PATCH 27] drivers/input/serio/gscps2.c: " Mariusz Kozlowski
@ 2007-07-31 17:49 ` Mariusz Kozlowski
2007-07-31 19:47 ` Krzysztof Halasa
2007-07-31 17:53 ` [PATCH 29] drivers/mmc/core/host.c: " Mariusz Kozlowski
` (54 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 17:49 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, Krzysztof Halasa
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/net/wan/hdlc_fr.c | 31260 -> 31223 (-37 bytes)
drivers/net/wan/hdlc_fr.o | 144872 -> 144728 (-144 bytes)
drivers/net/wan/hdlc_fr.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/net/wan/hdlc_fr.c 2007-07-26 13:07:43.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/net/wan/hdlc_fr.c 2007-07-30 00:25:40.000000000 +0200
@@ -212,14 +212,13 @@ static pvc_device* add_pvc(struct net_de
pvc_p = &(*pvc_p)->next;
}
- pvc = kmalloc(sizeof(pvc_device), GFP_ATOMIC);
+ pvc = kzalloc(sizeof(pvc_device), GFP_ATOMIC);
#ifdef DEBUG_PVC
printk(KERN_DEBUG "add_pvc: allocated pvc %p, frad %p\n", pvc, dev);
#endif
if (!pvc)
return NULL;
- memset(pvc, 0, sizeof(pvc_device));
pvc->dlci = dlci;
pvc->frad = dev;
pvc->next = *pvc_p; /* Put it in the chain */
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 29] drivers/mmc/core/host.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (27 preceding siblings ...)
2007-07-31 17:49 ` [PATCH 28] drivers/net/wan/hdlc_fr.c: " Mariusz Kozlowski
@ 2007-07-31 17:53 ` Mariusz Kozlowski
2007-08-04 13:01 ` Pierre Ossman
2007-07-31 17:58 ` [PATCH 30] drivers/ide/arm/icside.c: " Mariusz Kozlowski
` (53 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 17:53 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, drzeus-mmc
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/mmc/core/host.c | 3509 -> 3457 (-52 bytes)
drivers/mmc/core/host.o | 92400 -> 92136 (-264 bytes)
drivers/mmc/core/host.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/mmc/core/host.c 2007-07-26 13:07:43.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/mmc/core/host.c 2007-07-30 00:22:12.000000000 +0200
@@ -58,12 +58,10 @@ struct mmc_host *mmc_alloc_host(int extr
{
struct mmc_host *host;
- host = kmalloc(sizeof(struct mmc_host) + extra, GFP_KERNEL);
+ host = kzalloc(sizeof(struct mmc_host) + extra, GFP_KERNEL);
if (!host)
return NULL;
- memset(host, 0, sizeof(struct mmc_host) + extra);
-
host->parent = dev;
host->class_dev.parent = dev;
host->class_dev.class = &mmc_host_class;
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 30] drivers/ide/arm/icside.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (28 preceding siblings ...)
2007-07-31 17:53 ` [PATCH 29] drivers/mmc/core/host.c: " Mariusz Kozlowski
@ 2007-07-31 17:58 ` Mariusz Kozlowski
2007-08-01 21:01 ` Bartlomiej Zolnierkiewicz
2007-07-31 18:01 ` [PATCH 31] drivers/scsi/ide-scsi.c: " Mariusz Kozlowski
` (52 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 17:58 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, rmk
Is this a bug? In original verison memset cleared sizeof(state) bytes
instead of sizeof(*state). If it was intentional then this patch is invalid.
If not intentional -> valid :) Please review.
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/ide/arm/icside.c | 18883 -> 18849 (-34 bytes)
drivers/ide/arm/icside.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/ide/arm/icside.c 2007-07-26 13:07:41.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/ide/arm/icside.c 2007-07-31 11:32:27.000000000 +0200
@@ -682,13 +682,12 @@ icside_probe(struct expansion_card *ec,
if (ret)
goto out;
- state = kmalloc(sizeof(struct icside_state), GFP_KERNEL);
+ state = kzalloc(sizeof(struct icside_state), GFP_KERNEL);
if (!state) {
ret = -ENOMEM;
goto release;
}
- memset(state, 0, sizeof(state));
state->type = ICS_TYPE_NOTYPE;
state->dev = &ec->dev;
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 31] drivers/scsi/ide-scsi.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (29 preceding siblings ...)
2007-07-31 17:58 ` [PATCH 30] drivers/ide/arm/icside.c: " Mariusz Kozlowski
@ 2007-07-31 18:01 ` Mariusz Kozlowski
2007-08-01 21:02 ` Bartlomiej Zolnierkiewicz
2007-07-31 18:03 ` PATCH 32] drivers/mtd/inftlmount.c: kmalloc + memset conversion to kcalloc Mariusz Kozlowski
` (51 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 18:01 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, linux-scsi
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/scsi/ide-scsi.c | 34642 -> 34536 (-106 bytes)
drivers/scsi/ide-scsi.o | 171728 -> 171524 (-204 bytes)
drivers/scsi/ide-scsi.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/scsi/ide-scsi.c 2007-07-26 13:07:42.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/scsi/ide-scsi.c 2007-07-31 14:09:51.000000000 +0200
@@ -328,17 +328,15 @@ static int idescsi_check_condition(ide_d
u8 *buf;
/* stuff a sense request in front of our current request */
- pc = kmalloc (sizeof (idescsi_pc_t), GFP_ATOMIC);
- rq = kmalloc (sizeof (struct request), GFP_ATOMIC);
- buf = kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_ATOMIC);
- if (pc == NULL || rq == NULL || buf == NULL) {
+ pc = kzalloc(sizeof(idescsi_pc_t), GFP_ATOMIC);
+ rq = kmalloc(sizeof(struct request), GFP_ATOMIC);
+ buf = kzalloc(SCSI_SENSE_BUFFERSIZE, GFP_ATOMIC);
+ if (!pc || !rq || !buf) {
kfree(buf);
kfree(rq);
kfree(pc);
return -ENOMEM;
}
- memset (pc, 0, sizeof (idescsi_pc_t));
- memset (buf, 0, SCSI_SENSE_BUFFERSIZE);
ide_init_drive_cmd(rq);
rq->special = (char *) pc;
pc->rq = rq;
^ permalink raw reply [flat|nested] 131+ messages in thread
* PATCH 32] drivers/mtd/inftlmount.c: kmalloc + memset conversion to kcalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (30 preceding siblings ...)
2007-07-31 18:01 ` [PATCH 31] drivers/scsi/ide-scsi.c: " Mariusz Kozlowski
@ 2007-07-31 18:03 ` Mariusz Kozlowski
2007-07-31 18:04 ` [PATCH 33] fs/reiser4/init_super.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
` (50 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 18:03 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, dwmw2, linux-mtd
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/mtd/inftlmount.c | 23841 -> 23803 (-38 bytes)
drivers/mtd/inftlmount.o | 47196 -> 46956 (-240 bytes)
drivers/mtd/inftlmount.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/mtd/inftlmount.c 2007-07-26 13:07:41.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/mtd/inftlmount.c 2007-07-31 11:40:20.000000000 +0200
@@ -580,14 +580,13 @@ int INFTL_mount(struct INFTLrecord *s)
logical_block = block = BLOCK_NIL;
/* Temporary buffer to store ANAC numbers. */
- ANACtable = kmalloc(s->nb_blocks * sizeof(u8), GFP_KERNEL);
+ ANACtable = kcalloc(s->nb_blocks, sizeof(u8), GFP_KERNEL);
if (!ANACtable) {
printk(KERN_WARNING "INFTL: allocation of ANACtable "
"failed (%zd bytes)\n",
s->nb_blocks * sizeof(u8));
return -ENOMEM;
}
- memset(ANACtable, 0, s->nb_blocks);
/*
* First pass is to explore each physical unit, and construct the
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 33] fs/reiser4/init_super.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (31 preceding siblings ...)
2007-07-31 18:03 ` PATCH 32] drivers/mtd/inftlmount.c: kmalloc + memset conversion to kcalloc Mariusz Kozlowski
@ 2007-07-31 18:04 ` Mariusz Kozlowski
2007-07-31 18:05 ` [PATCH 34] fs/autofs4/inode.c: " Mariusz Kozlowski
` (49 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 18:04 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, reiserfs-dev, reiserfs-devel
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
fs/reiser4/init_super.c | 19283 -> 19246 (-37 bytes)
fs/reiser4/init_super.o | 155348 -> 155152 (-196 bytes)
fs/reiser4/init_super.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- linux-2.6.23-rc1-mm1-a/fs/reiser4/init_super.c 2007-07-26 13:07:46.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/fs/reiser4/init_super.c 2007-07-30 00:00:32.000000000 +0200
@@ -17,14 +17,13 @@ int reiser4_init_fs_info(struct super_bl
{
reiser4_super_info_data *sbinfo;
- sbinfo = kmalloc(sizeof(reiser4_super_info_data),
+ sbinfo = kzalloc(sizeof(reiser4_super_info_data),
reiser4_ctx_gfp_mask_get());
if (!sbinfo)
return RETERR(-ENOMEM);
super->s_fs_info = sbinfo;
super->s_op = NULL;
- memset(sbinfo, 0, sizeof(*sbinfo));
ON_DEBUG(INIT_LIST_HEAD(&sbinfo->all_jnodes));
ON_DEBUG(spin_lock_init(&sbinfo->all_guard));
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 34] fs/autofs4/inode.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (32 preceding siblings ...)
2007-07-31 18:04 ` [PATCH 33] fs/reiser4/init_super.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
@ 2007-07-31 18:05 ` Mariusz Kozlowski
2007-08-01 4:02 ` Ian Kent
2007-07-31 18:06 ` [PATCH 35] fs/reiser4/plugin/inode_ops_rename.c: " Mariusz Kozlowski
` (48 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 18:05 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, raven, autofs
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
fs/autofs4/inode.c | 10467 -> 10435 (-32 bytes)
fs/autofs4/inode.o | 98576 -> 98552 (-24 bytes)
fs/autofs4/inode.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- linux-2.6.23-rc1-mm1-a/fs/autofs4/inode.c 2007-07-26 13:07:46.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/fs/autofs4/inode.c 2007-07-29 23:56:08.000000000 +0200
@@ -312,13 +312,11 @@ int autofs4_fill_super(struct super_bloc
struct autofs_sb_info *sbi;
struct autofs_info *ino;
- sbi = kmalloc(sizeof(*sbi), GFP_KERNEL);
+ sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
if (!sbi)
goto fail_unlock;
DPRINTK("starting up, sbi = %p",sbi);
- memset(sbi, 0, sizeof(*sbi));
-
s->s_fs_info = sbi;
sbi->magic = AUTOFS_SBI_MAGIC;
sbi->pipefd = -1;
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 35] fs/reiser4/plugin/inode_ops_rename.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (33 preceding siblings ...)
2007-07-31 18:05 ` [PATCH 34] fs/autofs4/inode.c: " Mariusz Kozlowski
@ 2007-07-31 18:06 ` Mariusz Kozlowski
2007-07-31 18:08 ` [PATCH 36] arch/x86_64/kernel/io_apic.c: " Mariusz Kozlowski
` (47 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 18:06 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, reiserfs-dev, reiserfs-devel
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
fs/reiser4/plugin/inode_ops_rename.c | 28474 -> 28344 (-130 bytes)
fs/reiser4/plugin/inode_ops_rename.o | 142600 -> 142476 (-124 bytes)
fs/reiser4/plugin/inode_ops_rename.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
--- linux-2.6.23-rc1-mm1-a/fs/reiser4/plugin/inode_ops_rename.c 2007-07-26 13:07:46.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/fs/reiser4/plugin/inode_ops_rename.c 2007-07-31 15:02:58.000000000 +0200
@@ -392,16 +392,14 @@ int reiser4_rename_common(struct inode *
if (IS_ERR(ctx))
return PTR_ERR(ctx);
- old_entry = kmalloc(3 * sizeof(*old_entry) + 2 * sizeof(*new_lh) +
+ old_entry = kzalloc(3 * sizeof(*old_entry) + 2 * sizeof(*new_lh) +
sizeof(*dotdot_name) + sizeof(*dataonstack),
reiser4_ctx_gfp_mask_get());
- if (old_entry == NULL) {
+ if (!old_entry) {
context_set_commit_async(ctx);
reiser4_exit_context(ctx);
return RETERR(-ENOMEM);
}
- memset(old_entry, 0, 3 * sizeof(*old_entry) + 2 * sizeof(*new_lh) +
- sizeof(*dotdot_name) + sizeof(*dataonstack));
new_entry = old_entry + 1;
dotdot_entry = old_entry + 2;
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 36] arch/x86_64/kernel/io_apic.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (34 preceding siblings ...)
2007-07-31 18:06 ` [PATCH 35] fs/reiser4/plugin/inode_ops_rename.c: " Mariusz Kozlowski
@ 2007-07-31 18:08 ` Mariusz Kozlowski
2007-07-31 18:09 ` [PATCH 37] arch/i386/kernel/io_apic.c: kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (46 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 18:08 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, mingo
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
arch/x86_64/kernel/io_apic.c | 56080 -> 56038 (-42 bytes)
arch/x86_64/kernel/io_apic.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- linux-2.6.23-rc1-mm1-a/arch/x86_64/kernel/io_apic.c 2007-07-26 13:07:47.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/arch/x86_64/kernel/io_apic.c 2007-07-29 23:33:32.000000000 +0200
@@ -1845,7 +1845,7 @@ static struct sysdev_class ioapic_sysdev
static int __init ioapic_init_sysfs(void)
{
struct sys_device * dev;
- int i, size, error = 0;
+ int i, size, error;
error = sysdev_class_register(&ioapic_sysdev_class);
if (error)
@@ -1854,12 +1854,11 @@ static int __init ioapic_init_sysfs(void
for (i = 0; i < nr_ioapics; i++ ) {
size = sizeof(struct sys_device) + nr_ioapic_registers[i]
* sizeof(struct IO_APIC_route_entry);
- mp_ioapic_data[i] = kmalloc(size, GFP_KERNEL);
+ mp_ioapic_data[i] = kzalloc(size, GFP_KERNEL);
if (!mp_ioapic_data[i]) {
printk(KERN_ERR "Can't suspend/resume IOAPIC %d\n", i);
continue;
}
- memset(mp_ioapic_data[i], 0, size);
dev = &mp_ioapic_data[i]->dev;
dev->id = i;
dev->cls = &ioapic_sysdev_class;
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 37] arch/i386/kernel/io_apic.c: kmalloc + memset conversion to k[cz]alloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (35 preceding siblings ...)
2007-07-31 18:08 ` [PATCH 36] arch/x86_64/kernel/io_apic.c: " Mariusz Kozlowski
@ 2007-07-31 18:09 ` Mariusz Kozlowski
2007-07-31 18:13 ` [PATCH 38] drivers/char/ip2/ip2main.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
` (45 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 18:09 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, mingo
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
arch/i386/kernel/io_apic.c | 70761 -> 70562 (-199 bytes)
arch/i386/kernel/io_apic.o | 197654 -> 197030 (-624 bytes)
arch/i386/kernel/io_apic.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
--- linux-2.6.23-rc1-mm1-a/arch/i386/kernel/io_apic.c 2007-07-26 13:07:46.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/arch/i386/kernel/io_apic.c 2007-07-31 12:53:55.000000000 +0200
@@ -690,14 +690,12 @@ static int __init balanced_irq_init(void
physical_balance = 1;
for_each_online_cpu(i) {
- irq_cpu_data[i].irq_delta = kmalloc(sizeof(unsigned long) * NR_IRQS, GFP_KERNEL);
- irq_cpu_data[i].last_irq = kmalloc(sizeof(unsigned long) * NR_IRQS, GFP_KERNEL);
- if (irq_cpu_data[i].irq_delta == NULL || irq_cpu_data[i].last_irq == NULL) {
+ irq_cpu_data[i].irq_delta = kcalloc(NR_IRQS, sizeof(unsigned long), GFP_KERNEL);
+ irq_cpu_data[i].last_irq = kcalloc(NR_IRQS, sizeof(unsigned long), GFP_KERNEL);
+ if (!irq_cpu_data[i].irq_delta || !irq_cpu_data[i].last_irq) {
printk(KERN_ERR "balanced_irq_init: out of memory");
goto failed;
}
- memset(irq_cpu_data[i].irq_delta,0,sizeof(unsigned long) * NR_IRQS);
- memset(irq_cpu_data[i].last_irq,0,sizeof(unsigned long) * NR_IRQS);
}
printk(KERN_INFO "Starting balanced_irq\n");
@@ -2398,7 +2396,7 @@ static struct sysdev_class ioapic_sysdev
static int __init ioapic_init_sysfs(void)
{
struct sys_device * dev;
- int i, size, error = 0;
+ int i, size, error;
error = sysdev_class_register(&ioapic_sysdev_class);
if (error)
@@ -2407,12 +2405,11 @@ static int __init ioapic_init_sysfs(void
for (i = 0; i < nr_ioapics; i++ ) {
size = sizeof(struct sys_device) + nr_ioapic_registers[i]
* sizeof(struct IO_APIC_route_entry);
- mp_ioapic_data[i] = kmalloc(size, GFP_KERNEL);
+ mp_ioapic_data[i] = kzalloc(size, GFP_KERNEL);
if (!mp_ioapic_data[i]) {
printk(KERN_ERR "Can't suspend/resume IOAPIC %d\n", i);
continue;
}
- memset(mp_ioapic_data[i], 0, size);
dev = &mp_ioapic_data[i]->dev;
dev->id = i;
dev->cls = &ioapic_sysdev_class;
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 38] drivers/char/ip2/ip2main.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (36 preceding siblings ...)
2007-07-31 18:09 ` [PATCH 37] arch/i386/kernel/io_apic.c: kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
@ 2007-07-31 18:13 ` Mariusz Kozlowski
2007-08-01 16:04 ` Alan Cox
2007-07-31 18:16 ` [PATCH 39] net/ipv4/ip_options.c: " Mariusz Kozlowski
` (44 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 18:13 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/char/ip2/ip2main.c | 104398 -> 104346 (-52 bytes)
drivers/char/ip2/ip2main.o | 210710 -> 210702 (-8 bytes)
drivers/char/ip2/ip2main.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/char/ip2/ip2main.c 2007-07-26 13:07:41.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/char/ip2/ip2main.c 2007-07-31 20:04:19.000000000 +0200
@@ -646,10 +646,9 @@ ip2_loadmain(int *iop, int *irqp, unsign
for ( i = 0; i < IP2_MAX_BOARDS; ++i ) {
if ( ip2config.addr[i] ) {
- pB = kmalloc( sizeof(i2eBordStr), GFP_KERNEL);
- if ( pB != NULL ) {
+ pB = kzalloc(sizeof(i2eBordStr), GFP_KERNEL);
+ if (pB) {
i2BoardPtrTable[i] = pB;
- memset( pB, 0, sizeof(i2eBordStr) );
iiSetAddress( pB, ip2config.addr[i], ii2DelayTimer );
iiReset( pB );
} else {
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 39] net/ipv4/ip_options.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (37 preceding siblings ...)
2007-07-31 18:13 ` [PATCH 38] drivers/char/ip2/ip2main.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
@ 2007-07-31 18:16 ` Mariusz Kozlowski
2007-07-31 21:07 ` David Miller
2007-07-31 18:18 ` [PATCH 40] drivers/atm/iphase.c: mostly " Mariusz Kozlowski
` (43 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 18:16 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, netdev, davem
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
net/ipv4/ip_options.c | 15425 -> 15368 (-57 bytes)
net/ipv4/ip_options.o | 133668 -> 133588 (-80 bytes)
net/ipv4/ip_options.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
--- linux-2.6.23-rc1-mm1-a/net/ipv4/ip_options.c 2007-07-26 13:07:44.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/net/ipv4/ip_options.c 2007-07-31 15:17:22.000000000 +0200
@@ -513,11 +513,8 @@ void ip_options_undo(struct ip_options *
static struct ip_options *ip_options_get_alloc(const int optlen)
{
- struct ip_options *opt = kmalloc(sizeof(*opt) + ((optlen + 3) & ~3),
- GFP_KERNEL);
- if (opt)
- memset(opt, 0, sizeof(*opt));
- return opt;
+ return kzalloc(sizeof(struct ip_options) + ((optlen + 3) & ~3),
+ GFP_KERNEL);
}
static int ip_options_get_finish(struct ip_options **optp,
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 40] drivers/atm/iphase.c: mostly kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (38 preceding siblings ...)
2007-07-31 18:16 ` [PATCH 39] net/ipv4/ip_options.c: " Mariusz Kozlowski
@ 2007-07-31 18:18 ` Mariusz Kozlowski
2007-07-31 21:08 ` David Miller
2007-07-31 18:20 ` [PATCH 41] drivers/net/irda/irda-usb.c: mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (42 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 18:18 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, chas, pwang
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/atm/iphase.c | 111508 -> 111431 (-77 bytes)
drivers/atm/iphase.o | 254740 -> 254260 (-480 bytes)
drivers/atm/iphase.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/atm/iphase.c 2007-07-26 13:07:41.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/atm/iphase.c 2007-07-31 11:55:17.000000000 +0200
@@ -1601,14 +1601,14 @@ static int rx_init(struct atm_dev *dev)
skb_queue_head_init(&iadev->rx_dma_q);
iadev->rx_free_desc_qhead = NULL;
- iadev->rx_open = kmalloc(4*iadev->num_vc,GFP_KERNEL);
- if (!iadev->rx_open)
- {
+
+ iadev->rx_open = kzalloc(4 * iadev->num_vc, GFP_KERNEL);
+ if (!iadev->rx_open) {
printk(KERN_ERR DEV_LABEL "itf %d couldn't get free page\n",
dev->number);
goto err_free_dle;
}
- memset(iadev->rx_open, 0, 4*iadev->num_vc);
+
iadev->rxing = 1;
iadev->rx_pkt_cnt = 0;
/* Mode Register */
@@ -3171,12 +3171,12 @@ static int __devinit ia_init_one(struct
unsigned long flags;
int ret;
- iadev = kmalloc(sizeof(*iadev), GFP_KERNEL);
+ iadev = kzalloc(sizeof(*iadev), GFP_KERNEL);
if (!iadev) {
ret = -ENOMEM;
goto err_out;
}
- memset(iadev, 0, sizeof(*iadev));
+
iadev->pci = pdev;
IF_INIT(printk("ia detected at bus:%d dev: %d function:%d\n",
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 41] drivers/net/irda/irda-usb.c: mostly kmalloc + memset conversion to k[cz]alloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (39 preceding siblings ...)
2007-07-31 18:18 ` [PATCH 40] drivers/atm/iphase.c: mostly " Mariusz Kozlowski
@ 2007-07-31 18:20 ` Mariusz Kozlowski
2007-07-31 21:09 ` David Miller
2007-07-31 18:22 ` [PATCH 42] fs/jbd2/journal.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
` (41 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 18:20 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, samuel, Nick Fedchik
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/net/irda/irda-usb.c | 59694 -> 59541 (-153 bytes)
drivers/net/irda/irda-usb.o | 170588 -> 169256 (-1332 bytes)
drivers/net/irda/irda-usb.c | 24 ++++++++++--------------
1 file changed, 10 insertions(+), 14 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/net/irda/irda-usb.c 2007-07-26 13:07:42.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/net/irda/irda-usb.c 2007-07-31 18:07:03.000000000 +0200
@@ -1561,10 +1561,9 @@ static inline struct irda_class_desc *ir
struct irda_class_desc *desc;
int ret;
- desc = kmalloc(sizeof (*desc), GFP_KERNEL);
- if (desc == NULL)
+ desc = kzalloc(sizeof(*desc), GFP_KERNEL);
+ if (!desc)
return NULL;
- memset(desc, 0, sizeof(*desc));
/* USB-IrDA class spec 1.0:
* 6.1.3: Standard "Get Descriptor" Device Request is not
@@ -1617,7 +1616,7 @@ static int irda_usb_probe(struct usb_int
{
struct net_device *net;
struct usb_device *dev = interface_to_usbdev(intf);
- struct irda_usb_cb *self = NULL;
+ struct irda_usb_cb *self;
struct usb_host_interface *interface;
struct irda_class_desc *irda_desc;
int ret = -ENOMEM;
@@ -1655,7 +1654,7 @@ static int irda_usb_probe(struct usb_int
self->header_length = USB_IRDA_HEADER;
}
- self->rx_urb = kzalloc(self->max_rx_urb * sizeof(struct urb *),
+ self->rx_urb = kcalloc(self->max_rx_urb, sizeof(struct urb *),
GFP_KERNEL);
for (i = 0; i < self->max_rx_urb; i++) {
@@ -1715,7 +1714,7 @@ static int irda_usb_probe(struct usb_int
/* Find IrDA class descriptor */
irda_desc = irda_usb_find_class_desc(intf);
ret = -ENODEV;
- if (irda_desc == NULL)
+ if (!irda_desc)
goto err_out_3;
if (self->needspatch) {
@@ -1738,15 +1737,13 @@ static int irda_usb_probe(struct usb_int
/* Don't change this buffer size and allocation without doing
* some heavy and complete testing. Don't ask why :-(
* Jean II */
- self->speed_buff = kmalloc(IRDA_USB_SPEED_MTU, GFP_KERNEL);
- if (self->speed_buff == NULL)
+ self->speed_buff = kzalloc(IRDA_USB_SPEED_MTU, GFP_KERNEL);
+ if (!self->speed_buff)
goto err_out_3;
- memset(self->speed_buff, 0, IRDA_USB_SPEED_MTU);
-
self->tx_buff = kzalloc(IRDA_SKB_MAX_MTU + self->header_length,
GFP_KERNEL);
- if (self->tx_buff == NULL)
+ if (!self->tx_buff)
goto err_out_4;
ret = irda_usb_open(self);
@@ -1767,12 +1764,11 @@ static int irda_usb_probe(struct usb_int
/* replace IrDA class descriptor with what patched device is now reporting */
irda_desc = irda_usb_find_class_desc (self->usbintf);
- if (irda_desc == NULL) {
+ if (!irda_desc) {
ret = -ENODEV;
goto err_out_6;
}
- if (self->irda_desc)
- kfree (self->irda_desc);
+ kfree(self->irda_desc);
self->irda_desc = irda_desc;
irda_usb_init_qos(self);
}
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 42] fs/jbd2/journal.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (40 preceding siblings ...)
2007-07-31 18:20 ` [PATCH 41] drivers/net/irda/irda-usb.c: mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
@ 2007-07-31 18:22 ` Mariusz Kozlowski
2007-07-31 18:24 ` [PATCH 43] fs/reiser4/ktxnmgrd.c: " Mariusz Kozlowski
` (40 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 18:22 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, sct
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
fs/jbd2/journal.c | 66771 -> 66719 (-52 bytes)
fs/jbd2/journal.o | 199193 -> 199049 (-144 bytes)
fs/jbd2/journal.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- linux-2.6.23-rc1-mm1-a/fs/jbd2/journal.c 2007-07-26 13:07:46.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/fs/jbd2/journal.c 2007-07-31 14:55:12.000000000 +0200
@@ -929,17 +929,16 @@ static void journal_init_stats(journal_t
{
int size;
- if (proc_jbd2_stats == NULL)
+ if (!proc_jbd2_stats)
return;
journal->j_history_max = 100;
size = sizeof(struct transaction_stats_s) * journal->j_history_max;
- journal->j_history = kmalloc(size, GFP_KERNEL);
- if (journal->j_history == NULL) {
+ journal->j_history = kzalloc(size, GFP_KERNEL);
+ if (!journal->j_history) {
journal->j_history_max = 0;
return;
}
- memset(journal->j_history, 0, size);
spin_lock_init(&journal->j_history_lock);
}
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 43] fs/reiser4/ktxnmgrd.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (41 preceding siblings ...)
2007-07-31 18:22 ` [PATCH 42] fs/jbd2/journal.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
@ 2007-07-31 18:24 ` Mariusz Kozlowski
2007-07-31 18:25 ` [PATCH 44] drivers/scsi/lpfc/lpfc_debugfs.c: kmalloc + memset conversion to kcalloc Mariusz Kozlowski
` (39 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 18:24 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, reiserfs-dev, reiserfs-devel
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
fs/reiser4/ktxnmgrd.c | 5314 -> 5277 (-37 bytes)
fs/reiser4/ktxnmgrd.o | 131624 -> 131496 (-128 bytes)
fs/reiser4/ktxnmgrd.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- linux-2.6.23-rc1-mm1-a/fs/reiser4/ktxnmgrd.c 2007-07-26 13:07:46.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/fs/reiser4/ktxnmgrd.c 2007-07-31 14:58:09.000000000 +0200
@@ -130,13 +130,12 @@ int reiser4_init_ktxnmgrd(struct super_b
assert("zam-1014", mgr->daemon == NULL);
- ctx = kmalloc(sizeof(ktxnmgrd_context), reiser4_ctx_gfp_mask_get());
- if (ctx == NULL)
+ ctx = kzalloc(sizeof(ktxnmgrd_context), reiser4_ctx_gfp_mask_get());
+ if (!ctx)
return RETERR(-ENOMEM);
assert("nikita-2442", ctx != NULL);
- memset(ctx, 0, sizeof *ctx);
init_waitqueue_head(&ctx->wait);
/*kcond_init(&ctx->startup);*/
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 44] drivers/scsi/lpfc/lpfc_debugfs.c: kmalloc + memset conversion to kcalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (42 preceding siblings ...)
2007-07-31 18:24 ` [PATCH 43] fs/reiser4/ktxnmgrd.c: " Mariusz Kozlowski
@ 2007-07-31 18:25 ` Mariusz Kozlowski
2007-08-03 15:42 ` James Smart
2007-07-31 18:26 ` [PATCH 45] drivers/scsi/lpfc/lpfc_init.c: " Mariusz Kozlowski
` (38 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 18:25 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, james.smart, linux-scsi
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/scsi/lpfc/lpfc_debugfs.c | 13809 -> 13716 (-93 bytes)
drivers/scsi/lpfc/lpfc_debugfs.o | 146124 -> 146124 (0 bytes)
drivers/scsi/lpfc/lpfc_debugfs.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/scsi/lpfc/lpfc_debugfs.c 2007-07-26 13:07:42.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/scsi/lpfc/lpfc_debugfs.c 2007-07-31 14:11:24.000000000 +0200
@@ -432,14 +432,11 @@ lpfc_debugfs_initialize(struct lpfc_vpor
if (!lpfc_debugfs_start_time)
lpfc_debugfs_start_time = jiffies;
- vport->disc_trc = kmalloc(
- (sizeof(struct lpfc_disc_trc) * lpfc_debugfs_max_disc_trc),
- GFP_KERNEL);
+ vport->disc_trc = kcalloc(lpfc_debugfs_max_disc_trc,
+ sizeof(struct lpfc_disc_trc), GFP_KERNEL);
if (!vport->disc_trc)
goto debug_failed;
- memset(vport->disc_trc, 0,
- (sizeof(struct lpfc_disc_trc) * lpfc_debugfs_max_disc_trc));
snprintf(name, sizeof(name), "discovery_trace");
vport->debug_disc_trc =
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 45] drivers/scsi/lpfc/lpfc_init.c: kmalloc + memset conversion to kcalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (43 preceding siblings ...)
2007-07-31 18:25 ` [PATCH 44] drivers/scsi/lpfc/lpfc_debugfs.c: kmalloc + memset conversion to kcalloc Mariusz Kozlowski
@ 2007-07-31 18:26 ` Mariusz Kozlowski
2007-08-03 15:41 ` James Smart
2007-07-31 18:27 ` [PATCH 46] drivers/scsi/lpfc/lpfc_scsi.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
` (37 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 18:26 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, james.smart, linux-scsi
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/scsi/lpfc/lpfc_init.c | 65932 -> 65881 (-51 bytes)
drivers/scsi/lpfc/lpfc_init.o | 219760 -> 219616 (-144 bytes)
drivers/scsi/lpfc/lpfc_init.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/scsi/lpfc/lpfc_init.c 2007-07-26 13:07:42.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/scsi/lpfc/lpfc_init.c 2007-07-31 11:07:59.000000000 +0200
@@ -1280,11 +1280,10 @@ lpfc_hba_init(struct lpfc_hba *phba, uin
uint32_t *HashWorking;
uint32_t *pwwnn = (uint32_t *) phba->wwnn;
- HashWorking = kmalloc(80 * sizeof(uint32_t), GFP_KERNEL);
+ HashWorking = kcalloc(80, sizeof(uint32_t), GFP_KERNEL);
if (!HashWorking)
return;
- memset(HashWorking, 0, (80 * sizeof(uint32_t)));
HashWorking[0] = HashWorking[78] = *pwwnn++;
HashWorking[1] = HashWorking[79] = *pwwnn;
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 46] drivers/scsi/lpfc/lpfc_scsi.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (44 preceding siblings ...)
2007-07-31 18:26 ` [PATCH 45] drivers/scsi/lpfc/lpfc_init.c: " Mariusz Kozlowski
@ 2007-07-31 18:27 ` Mariusz Kozlowski
2007-08-03 15:41 ` James Smart
2007-07-31 18:34 ` [PATCH 47] drivers/scsi/megaraid.c: " Mariusz Kozlowski
` (36 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 18:27 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, james.smart, linux-scsi
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/scsi/lpfc/lpfc_scsi.c | 42769 -> 42721 (-48 bytes)
drivers/scsi/lpfc/lpfc_scsi.o | 191332 -> 191240 (-92 bytes)
drivers/scsi/lpfc/lpfc_scsi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/scsi/lpfc/lpfc_scsi.c 2007-07-26 13:07:42.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/scsi/lpfc/lpfc_scsi.c 2007-07-31 11:08:46.000000000 +0200
@@ -208,10 +208,9 @@ lpfc_new_scsi_buf(struct lpfc_vport *vpo
dma_addr_t pdma_phys;
uint16_t iotag;
- psb = kmalloc(sizeof(struct lpfc_scsi_buf), GFP_KERNEL);
+ psb = kzalloc(sizeof(struct lpfc_scsi_buf), GFP_KERNEL);
if (!psb)
return NULL;
- memset(psb, 0, sizeof (struct lpfc_scsi_buf));
/*
* Get memory from the pci pool to map the virt space to pci bus space
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 47] drivers/scsi/megaraid.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (45 preceding siblings ...)
2007-07-31 18:27 ` [PATCH 46] drivers/scsi/lpfc/lpfc_scsi.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
@ 2007-07-31 18:34 ` Mariusz Kozlowski
2007-07-31 18:35 ` [PATCH 24] include/asm-frv/thread_info.h: " David Howells
` (35 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 18:34 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, linux-scsi, megaraidlinux
This patch does kmalloc + memset conversion to kzalloc and adds missing check for
kzaloc return value.
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/scsi/megaraid.c | 116109 -> 116094 (-15 bytes)
drivers/scsi/megaraid.o | 257872 -> 257772 (-100 bytes)
drivers/scsi/megaraid.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/scsi/megaraid.c 2007-07-26 13:07:42.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/scsi/megaraid.c 2007-07-31 11:11:58.000000000 +0200
@@ -4408,8 +4408,10 @@ mega_internal_command(adapter_t *adapter
scmd = &adapter->int_scmd;
memset(scmd, 0, sizeof(Scsi_Cmnd));
- sdev = kmalloc(sizeof(struct scsi_device), GFP_KERNEL);
- memset(sdev, 0, sizeof(struct scsi_device));
+ sdev = kzalloc(sizeof(struct scsi_device), GFP_KERNEL);
+ if (!sdev)
+ return -ENOMEM;
+
scmd->device = sdev;
scmd->device->host = adapter->host;
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 24] include/asm-frv/thread_info.h: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (46 preceding siblings ...)
2007-07-31 18:34 ` [PATCH 47] drivers/scsi/megaraid.c: " Mariusz Kozlowski
@ 2007-07-31 18:35 ` David Howells
2007-07-31 18:48 ` [PATCH 48] include/asm-mips/thread_info.h: " Mariusz Kozlowski
` (34 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: David Howells @ 2007-07-31 18:35 UTC (permalink / raw)
To: Mariusz Kozlowski; +Cc: linux-kernel, kernel-janitors, Andrew Morton
Acked-By: David Howells <dhowells@redhat.com>
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 48] include/asm-mips/thread_info.h: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (47 preceding siblings ...)
2007-07-31 18:35 ` [PATCH 24] include/asm-frv/thread_info.h: " David Howells
@ 2007-07-31 18:48 ` Mariusz Kozlowski
2007-07-31 18:53 ` Ralf Baechle
2007-07-31 18:50 ` [PATCH 49] drivers/mmc/core/mmc_ops.c: " Mariusz Kozlowski
` (33 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 18:48 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, ralf, linux-mips
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
include/asm-mips/thread_info.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- linux-2.6.23-rc1-mm1-a/include/asm-mips/thread_info.h 2007-07-26 13:07:40.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/include/asm-mips/thread_info.h 2007-07-31 15:09:01.000000000 +0200
@@ -87,9 +87,8 @@ register struct thread_info *__current_t
({ \
struct thread_info *ret; \
\
- ret = kmalloc(THREAD_SIZE, GFP_KERNEL); \
- if (ret) \
- memset(ret, 0, THREAD_SIZE); \
+ ret = kzalloc(THREAD_SIZE, GFP_KERNEL); \
+ \
ret; \
})
#else
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 49] drivers/mmc/core/mmc_ops.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (48 preceding siblings ...)
2007-07-31 18:48 ` [PATCH 48] include/asm-mips/thread_info.h: " Mariusz Kozlowski
@ 2007-07-31 18:50 ` Mariusz Kozlowski
2007-08-04 13:02 ` Pierre Ossman
2007-07-31 18:54 ` [PATCH 50] drivers/message/fusion/mptctl.c: mostly " Mariusz Kozlowski
` (32 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 18:50 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, drzeus-mmc
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/mmc/core/mmc_ops.c | 7957 -> 7924 (-33 bytes)
drivers/mmc/core/mmc_ops.o | 101732 -> 101744 (+12 bytes)
drivers/mmc/core/mmc_ops.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/mmc/core/mmc_ops.c 2007-07-26 13:07:43.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/mmc/core/mmc_ops.c 2007-07-30 00:20:54.000000000 +0200
@@ -298,10 +298,9 @@ int mmc_lock_unlock(struct mmc_card *car
data_size = 2 + mpayload->datalen;
}
- data_buf = kmalloc(data_size, GFP_KERNEL);
+ data_buf = kzalloc(data_size, GFP_KERNEL);
if (!data_buf)
return -ENOMEM;
- memset(data_buf, 0, data_size);
data_buf[0] |= mode;
if (mode & MMC_LOCK_MODE_UNLOCK)
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 48] include/asm-mips/thread_info.h: kmalloc + memset conversion to kzalloc
2007-07-31 18:48 ` [PATCH 48] include/asm-mips/thread_info.h: " Mariusz Kozlowski
@ 2007-07-31 18:53 ` Ralf Baechle
0 siblings, 0 replies; 131+ messages in thread
From: Ralf Baechle @ 2007-07-31 18:53 UTC (permalink / raw)
To: Mariusz Kozlowski
Cc: linux-kernel, kernel-janitors, Andrew Morton, linux-mips
On Tue, Jul 31, 2007 at 08:48:41PM +0200, Mariusz Kozlowski wrote:
Thanks, applied.
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 50] drivers/message/fusion/mptctl.c: mostly kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (49 preceding siblings ...)
2007-07-31 18:50 ` [PATCH 49] drivers/mmc/core/mmc_ops.c: " Mariusz Kozlowski
@ 2007-07-31 18:54 ` Mariusz Kozlowski
2007-07-31 19:14 ` [PATCH 51] drivers/media/video/msp3400-driver.c: " Mariusz Kozlowski
` (31 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 18:54 UTC (permalink / raw)
To: linux-kernel
Cc: kernel-janitors, Andrew Morton, support, mpt_linux_developer, linux-scsi
This patch does kmalloc + memset conversion to kzalloc and simplifies mptctl_probe().
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/message/fusion/mptctl.c | 82092 -> 81884 (-208 bytes)
drivers/message/fusion/mptctl.o | 201784 -> 200648 (-1136 bytes)
drivers/message/fusion/mptctl.c | 36 ++++++++++--------------------
1 file changed, 12 insertions(+), 24 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/message/fusion/mptctl.c 2007-07-26 13:07:44.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/message/fusion/mptctl.c 2007-07-31 18:02:38.000000000 +0200
@@ -963,10 +963,9 @@ kbuf_alloc_2_sgl(int bytes, u32 sgdir, i
* structures for the SG elements.
*/
i = MAX_SGL_BYTES / 8;
- buflist = kmalloc(i, GFP_USER);
- if (buflist == NULL)
+ buflist = kzalloc(i, GFP_USER);
+ if (!buflist)
return NULL;
- memset(buflist, 0, i);
buflist_ent = 0;
/* Allocate a single block of memory to store the sg elements and
@@ -1363,13 +1362,12 @@ mptctl_gettargetinfo (unsigned long arg)
* 15- 8: Bus Number
* 7- 0: Target ID
*/
- pmem = kmalloc(numBytes, GFP_KERNEL);
- if (pmem == NULL) {
+ pmem = kzalloc(numBytes, GFP_KERNEL);
+ if (!pmem) {
printk(KERN_ERR "%s::mptctl_gettargetinfo() @%d - no memory available!\n",
__FILE__, __LINE__);
return -ENOMEM;
}
- memset(pmem, 0, numBytes);
pdata = (int *) pmem;
/* Get number of devices
@@ -1551,12 +1549,11 @@ mptctl_eventenable (unsigned long arg)
/* Have not yet allocated memory - do so now.
*/
int sz = MPTCTL_EVENT_LOG_SIZE * sizeof(MPT_IOCTL_EVENTS);
- ioc->events = kmalloc(sz, GFP_KERNEL);
- if (ioc->events == NULL) {
+ ioc->events = kzalloc(sz, GFP_KERNEL);
+ if (!ioc->events) {
printk(KERN_ERR MYNAM ": ERROR - Insufficient memory to add adapter!\n");
return -ENOMEM;
}
- memset(ioc->events, 0, sz);
ioc->alloc_total += sz;
ioc->eventContext = 0;
@@ -2823,31 +2820,22 @@ static long compat_mpctl_ioctl(struct fi
static int
mptctl_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{
- int err;
- int sz;
- u8 *mem;
+ MPT_IOCTL *mem;
MPT_ADAPTER *ioc = pci_get_drvdata(pdev);
/*
* Allocate and inite a MPT_IOCTL structure
*/
- sz = sizeof (MPT_IOCTL);
- mem = kmalloc(sz, GFP_KERNEL);
- if (mem == NULL) {
- err = -ENOMEM;
- goto out_fail;
+ mem = kzalloc(sizeof(MPT_IOCTL), GFP_KERNEL);
+ if (!mem) {
+ mptctl_remove(pdev);
+ return -ENOMEM;
}
- memset(mem, 0, sz);
- ioc->ioctl = (MPT_IOCTL *) mem;
+ ioc->ioctl = mem;
ioc->ioctl->ioc = ioc;
mutex_init(&ioc->ioctl->ioctl_mutex);
return 0;
-
-out_fail:
-
- mptctl_remove(pdev);
- return err;
}
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 51] drivers/media/video/msp3400-driver.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (50 preceding siblings ...)
2007-07-31 18:54 ` [PATCH 50] drivers/message/fusion/mptctl.c: mostly " Mariusz Kozlowski
@ 2007-07-31 19:14 ` Mariusz Kozlowski
2007-07-31 19:18 ` [PATCH 52] include/asm-m32r/thread_info.h: " Mariusz Kozlowski
` (30 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 19:14 UTC (permalink / raw)
To: linux-kernel
Cc: kernel-janitors, Andrew Morton, mchehab, v4l-dvb-maintainer,
video4linux-list
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/media/video/msp3400-driver.c | 28945 -> 28898 (-47 bytes)
drivers/media/video/msp3400-driver.o | 125620 -> 125320 (-300 bytes)
drivers/media/video/msp3400-driver.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/media/video/msp3400-driver.c 2007-07-26 13:07:43.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/media/video/msp3400-driver.c 2007-07-31 13:22:34.000000000 +0200
@@ -813,8 +813,9 @@ static int msp_attach(struct i2c_adapter
int msp_rom;
client = kzalloc(sizeof(*client), GFP_KERNEL);
- if (client == NULL)
+ if (!client)
return -ENOMEM;
+
client->addr = address;
client->adapter = adapter;
client->driver = &i2c_driver;
@@ -826,14 +827,14 @@ static int msp_attach(struct i2c_adapter
return 0;
}
- state = kmalloc(sizeof(*state), GFP_KERNEL);
- if (state == NULL) {
+ state = kzalloc(sizeof(*state), GFP_KERNEL);
+ if (!state) {
kfree(client);
return -ENOMEM;
}
+
i2c_set_clientdata(client, state);
- memset(state, 0, sizeof(*state));
state->v4l2_std = V4L2_STD_NTSC;
state->audmode = V4L2_TUNER_MODE_STEREO;
state->volume = 58880; /* 0db gain */
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 52] include/asm-m32r/thread_info.h: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (51 preceding siblings ...)
2007-07-31 19:14 ` [PATCH 51] drivers/media/video/msp3400-driver.c: " Mariusz Kozlowski
@ 2007-07-31 19:18 ` Mariusz Kozlowski
2007-08-01 5:12 ` Hirokazu Takata
2007-07-31 21:22 ` [PATCH 53] Documentation/DocBook/mtdnand.tmpl: " Mariusz Kozlowski
` (29 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 19:18 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, takata, linux-m32r
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
include/asm-m32r/thread_info.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- linux-2.6.23-rc1-mm1-a/include/asm-m32r/thread_info.h 2007-07-26 13:07:41.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/include/asm-m32r/thread_info.h 2007-07-31 15:08:17.000000000 +0200
@@ -100,9 +100,8 @@ static inline struct thread_info *curren
({ \
struct thread_info *ret; \
\
- ret = kmalloc(THREAD_SIZE, GFP_KERNEL); \
- if (ret) \
- memset(ret, 0, THREAD_SIZE); \
+ ret = kzalloc(THREAD_SIZE, GFP_KERNEL); \
+ \
ret; \
})
#else
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 28] drivers/net/wan/hdlc_fr.c: kmalloc + memset conversion to kzalloc
2007-07-31 17:49 ` [PATCH 28] drivers/net/wan/hdlc_fr.c: " Mariusz Kozlowski
@ 2007-07-31 19:47 ` Krzysztof Halasa
0 siblings, 0 replies; 131+ messages in thread
From: Krzysztof Halasa @ 2007-07-31 19:47 UTC (permalink / raw)
To: Mariusz Kozlowski; +Cc: linux-kernel, kernel-janitors, Andrew Morton
Mariusz Kozlowski <m.kozlowski@tuxland.pl> writes:
> +++ linux-2.6.23-rc1-mm1-b/drivers/net/wan/hdlc_fr.c 2007-07-30 00:25:40.000000000 +0200
> @@ -212,14 +212,13 @@ static pvc_device* add_pvc(struct net_de
> pvc_p = &(*pvc_p)->next;
> }
>
> - pvc = kmalloc(sizeof(pvc_device), GFP_ATOMIC);
> + pvc = kzalloc(sizeof(pvc_device), GFP_ATOMIC);
> #ifdef DEBUG_PVC
> printk(KERN_DEBUG "add_pvc: allocated pvc %p, frad %p\n", pvc, dev);
> #endif
> if (!pvc)
> return NULL;
>
> - memset(pvc, 0, sizeof(pvc_device));
Looks good, thanks.
--
Krzysztof Halasa
^ permalink raw reply [flat|nested] 131+ messages in thread
* RE: [PATCH 10] drivers/block/cpqarray.c: better error handling and kmalloc + memset conversion to k[cz]alloc
2007-07-31 17:12 ` [PATCH 10] drivers/block/cpqarray.c: better error handling and kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
@ 2007-07-31 20:16 ` Miller, Mike (OS Dev)
0 siblings, 0 replies; 131+ messages in thread
From: Miller, Mike (OS Dev) @ 2007-07-31 20:16 UTC (permalink / raw)
To: Mariusz Kozlowski, linux-kernel
Cc: kernel-janitors, Andrew Morton, ISS StorageDev, axboe
> -----Original Message-----
> From: Mariusz Kozlowski [mailto:m.kozlowski@tuxland.pl]
> Sent: Tuesday, July 31, 2007 12:12 PM
> To: linux-kernel@vger.kernel.org
> Cc: kernel-janitors@vger.kernel.org; Andrew Morton; ISS
> StorageDev; axboe@kernel.dk
> Subject: [PATCH 10] drivers/block/cpqarray.c: better error
> handling and kmalloc + memset conversion to k[cz]alloc
>
> This patch removes some redundant casts, does the kmalloc +
> memset to k[cz]alloc conversion and it changes the error path
> to use goto (to avoid code duplication).
>
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Acked-by: Mike Miller <mike.miller@hp.com>
>
> drivers/block/cpqarray.c | 49567 -> 48623 (-944 bytes)
> drivers/block/cpqarray.o | 178820 -> 178288 (-532 bytes)
>
> drivers/block/cpqarray.c | 78 ++++++++++++-------------------------
> 1 file changed, 26 insertions(+), 52 deletions(-)
>
> --- linux-2.6.23-rc1-mm1-a/drivers/block/cpqarray.c
> 2007-07-26 13:07:41.000000000 +0200
> +++ linux-2.6.23-rc1-mm1-b/drivers/block/cpqarray.c
> 2007-07-31 12:59:54.000000000 +0200
> @@ -420,18 +420,17 @@ static int __init cpqarray_register_ctlr
> goto Enomem2;
> }
>
> - hba[i]->cmd_pool = (cmdlist_t *)pci_alloc_consistent(
> + hba[i]->cmd_pool = pci_alloc_consistent(
> hba[i]->pci_dev, NR_CMDS * sizeof(cmdlist_t),
> &(hba[i]->cmd_pool_dhandle));
> - hba[i]->cmd_pool_bits = kmalloc(
> -
> ((NR_CMDS+BITS_PER_LONG-1)/BITS_PER_LONG)*sizeof(unsigned long),
> + hba[i]->cmd_pool_bits = kcalloc(
> + (NR_CMDS+BITS_PER_LONG-1)/BITS_PER_LONG,
> sizeof(unsigned long),
> GFP_KERNEL);
>
> if (!hba[i]->cmd_pool_bits || !hba[i]->cmd_pool)
> goto Enomem1;
>
> memset(hba[i]->cmd_pool, 0, NR_CMDS * sizeof(cmdlist_t));
> - memset(hba[i]->cmd_pool_bits, 0,
> ((NR_CMDS+BITS_PER_LONG-1)/BITS_PER_LONG)*sizeof(unsigned long));
> printk(KERN_INFO "cpqarray: Finding drives on %s",
> hba[i]->devname);
>
> @@ -1660,45 +1659,30 @@ static void getgeometry(int ctlr)
>
> info_p->log_drv_map = 0;
>
> - id_ldrive = kmalloc(sizeof(id_log_drv_t), GFP_KERNEL);
> - if(id_ldrive == NULL)
> - {
> + id_ldrive = kzalloc(sizeof(id_log_drv_t), GFP_KERNEL);
> + if (!id_ldrive) {
> printk( KERN_ERR "cpqarray: out of memory.\n");
> - return;
> + goto err_0;
> }
>
> - id_ctlr_buf = kmalloc(sizeof(id_ctlr_t), GFP_KERNEL);
> - if(id_ctlr_buf == NULL)
> - {
> - kfree(id_ldrive);
> + id_ctlr_buf = kzalloc(sizeof(id_ctlr_t), GFP_KERNEL);
> + if (!id_ctlr_buf) {
> printk( KERN_ERR "cpqarray: out of memory.\n");
> - return;
> + goto err_1;
> }
>
> - id_lstatus_buf = kmalloc(sizeof(sense_log_drv_stat_t),
> GFP_KERNEL);
> - if(id_lstatus_buf == NULL)
> - {
> - kfree(id_ctlr_buf);
> - kfree(id_ldrive);
> + id_lstatus_buf = kzalloc(sizeof(sense_log_drv_stat_t),
> GFP_KERNEL);
> + if (!id_lstatus_buf) {
> printk( KERN_ERR "cpqarray: out of memory.\n");
> - return;
> + goto err_2;
> }
>
> - sense_config_buf = kmalloc(sizeof(config_t), GFP_KERNEL);
> - if(sense_config_buf == NULL)
> - {
> - kfree(id_lstatus_buf);
> - kfree(id_ctlr_buf);
> - kfree(id_ldrive);
> + sense_config_buf = kzalloc(sizeof(config_t), GFP_KERNEL);
> + if (!sense_config_buf) {
> printk( KERN_ERR "cpqarray: out of memory.\n");
> - return;
> + goto err_3;
> }
>
> - memset(id_ldrive, 0, sizeof(id_log_drv_t));
> - memset(id_ctlr_buf, 0, sizeof(id_ctlr_t));
> - memset(id_lstatus_buf, 0, sizeof(sense_log_drv_stat_t));
> - memset(sense_config_buf, 0, sizeof(config_t));
> -
> info_p->phys_drives = 0;
> info_p->log_drv_map = 0;
> info_p->drv_assign_map = 0;
> @@ -1712,13 +1696,8 @@ static void getgeometry(int ctlr)
> * so the idastubopen will fail on all logical drives
> * on the controller.
> */
> - /* Free all the buffers and return */
> printk(KERN_ERR "cpqarray: error sending ID
> controller\n");
> - kfree(sense_config_buf);
> - kfree(id_lstatus_buf);
> - kfree(id_ctlr_buf);
> - kfree(id_ldrive);
> - return;
> + goto err_4;
> }
>
> info_p->log_drives = id_ctlr_buf->nr_drvs; @@ -1764,12
> +1743,7 @@ static void getgeometry(int ctlr)
> " failed to report status of
> logical drive %d\n"
> "Access to this controller has been
> disabled\n",
> ctlr, log_unit);
> - /* Free all the buffers and return */
> - kfree(sense_config_buf);
> - kfree(id_lstatus_buf);
> - kfree(id_ctlr_buf);
> - kfree(id_ldrive);
> - return;
> + goto err_4;
> }
> /*
> Make sure the logical drive is configured @@
> -1798,14 +1772,8 @@ static void getgeometry(int ctlr)
> sizeof(config_t), 0, 0, log_unit);
> if (ret_code == IO_ERROR) {
> info_p->log_drv_map = 0;
> - /* Free all the buffers
> and return */
> printk(KERN_ERR
> "cpqarray: error sending sense config\n");
> - kfree(sense_config_buf);
> - kfree(id_lstatus_buf);
> - kfree(id_ctlr_buf);
> - kfree(id_ldrive);
> - return;
> -
> + goto err_4;
> }
>
> info_p->phys_drives =
> @@ -1820,12 +1788,18 @@ static void getgeometry(int ctlr)
> log_index = log_index + 1;
> } /* end of if logical drive configured */
> } /* end of for log_unit */
> +
> + /* Free all the buffers and return */
> +err_4:
> kfree(sense_config_buf);
> - kfree(id_ldrive);
> +err_3:
> kfree(id_lstatus_buf);
> +err_2:
> kfree(id_ctlr_buf);
> +err_1:
> + kfree(id_ldrive);
> +err_0:
> return;
> -
> }
>
> static void __exit cpqarray_exit(void)
>
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 03] drivers/sbus/char/bbc_envctrl.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:56 ` [PATCH 03] drivers/sbus/char/bbc_envctrl.c: " Mariusz Kozlowski
@ 2007-07-31 21:04 ` David Miller
0 siblings, 0 replies; 131+ messages in thread
From: David Miller @ 2007-07-31 21:04 UTC (permalink / raw)
To: m.kozlowski; +Cc: linux-kernel, kernel-janitors, akpm
From: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Date: Tue, 31 Jul 2007 18:56:07 +0200
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Patch applied.
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 04] drivers/sbus/char/bbc_i2c.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:58 ` [PATCH 04] drivers/sbus/char/bbc_i2c.c: " Mariusz Kozlowski
@ 2007-07-31 21:05 ` David Miller
0 siblings, 0 replies; 131+ messages in thread
From: David Miller @ 2007-07-31 21:05 UTC (permalink / raw)
To: m.kozlowski; +Cc: linux-kernel, kernel-janitors, akpm
From: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Date: Tue, 31 Jul 2007 18:58:05 +0200
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Patch applied, thanks.
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 20] net/decnet/dn_route.c: kmalloc + memset conversion to kzalloc
2007-07-31 17:33 ` [PATCH 20] net/decnet/dn_route.c: " Mariusz Kozlowski
@ 2007-07-31 21:06 ` David Miller
0 siblings, 0 replies; 131+ messages in thread
From: David Miller @ 2007-07-31 21:06 UTC (permalink / raw)
To: m.kozlowski; +Cc: linux-kernel, kernel-janitors, akpm, netdev, patrick
From: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Date: Tue, 31 Jul 2007 19:33:33 +0200
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Patch applied, thanks.
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 39] net/ipv4/ip_options.c: kmalloc + memset conversion to kzalloc
2007-07-31 18:16 ` [PATCH 39] net/ipv4/ip_options.c: " Mariusz Kozlowski
@ 2007-07-31 21:07 ` David Miller
2007-07-31 21:15 ` Mariusz Kozlowski
0 siblings, 1 reply; 131+ messages in thread
From: David Miller @ 2007-07-31 21:07 UTC (permalink / raw)
To: m.kozlowski; +Cc: linux-kernel, kernel-janitors, akpm, netdev
From: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Date: Tue, 31 Jul 2007 20:16:59 +0200
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Applied, but note that this patch changes behavior, previously
only the ip_options structure base was cleared out, but now
the whole memory region is cleared.
I think it's OK for this case, but I'm just making note of it.
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 40] drivers/atm/iphase.c: mostly kmalloc + memset conversion to kzalloc
2007-07-31 18:18 ` [PATCH 40] drivers/atm/iphase.c: mostly " Mariusz Kozlowski
@ 2007-07-31 21:08 ` David Miller
0 siblings, 0 replies; 131+ messages in thread
From: David Miller @ 2007-07-31 21:08 UTC (permalink / raw)
To: m.kozlowski; +Cc: linux-kernel, kernel-janitors, akpm, chas, pwang
From: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Date: Tue, 31 Jul 2007 20:18:55 +0200
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Patch doesn't apply, perhaps there are some changes to this
driver in the -mm tree.
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 41] drivers/net/irda/irda-usb.c: mostly kmalloc + memset conversion to k[cz]alloc
2007-07-31 18:20 ` [PATCH 41] drivers/net/irda/irda-usb.c: mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
@ 2007-07-31 21:09 ` David Miller
2007-07-31 21:17 ` Mariusz Kozlowski
0 siblings, 1 reply; 131+ messages in thread
From: David Miller @ 2007-07-31 21:09 UTC (permalink / raw)
To: m.kozlowski; +Cc: linux-kernel, kernel-janitors, akpm, samuel, nick
From: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Date: Tue, 31 Jul 2007 20:20:37 +0200
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Like the ATM patch, this one doesn't apply cleanly.
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 39] net/ipv4/ip_options.c: kmalloc + memset conversion to kzalloc
2007-07-31 21:07 ` David Miller
@ 2007-07-31 21:15 ` Mariusz Kozlowski
0 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 21:15 UTC (permalink / raw)
To: David Miller; +Cc: linux-kernel, kernel-janitors, akpm, netdev
> Applied, but note that this patch changes behavior, previously
> only the ip_options structure base was cleared out, but now
> the whole memory region is cleared.
>
> I think it's OK for this case, but I'm just making note of it.
Agrh. Sorry. I must have overlook this. Feel free to drop it if
you think its not worth it :-)
Thanks,
Mariusz
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 41] drivers/net/irda/irda-usb.c: mostly kmalloc + memset conversion to k[cz]alloc
2007-07-31 21:09 ` David Miller
@ 2007-07-31 21:17 ` Mariusz Kozlowski
0 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 21:17 UTC (permalink / raw)
To: David Miller; +Cc: linux-kernel, kernel-janitors, akpm, samuel, nick
> > Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
>
> Like the ATM patch, this one doesn't apply cleanly.
Ok I'll give another k[czm]alloc run right after -mm2 shows up.
Thanks,
Mariusz
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 53] Documentation/DocBook/mtdnand.tmpl: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (52 preceding siblings ...)
2007-07-31 19:18 ` [PATCH 52] include/asm-m32r/thread_info.h: " Mariusz Kozlowski
@ 2007-07-31 21:22 ` Mariusz Kozlowski
2007-07-31 21:23 ` [PATCH 54] drivers/scsi/mvme16x_scsi.c: " Mariusz Kozlowski
` (28 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 21:22 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, dwmw2, linux-mtd
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Documentation/DocBook/mtdnand.tmpl | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- linux-2.6.23-rc1-mm1-a/Documentation/DocBook/mtdnand.tmpl 2007-07-26 13:07:45.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/Documentation/DocBook/mtdnand.tmpl 2007-07-31 12:16:02.000000000 +0200
@@ -275,16 +275,13 @@ int __init board_init (void)
int err = 0;
/* Allocate memory for MTD device structure and private data */
- board_mtd = kmalloc (sizeof(struct mtd_info) + sizeof (struct nand_chip), GFP_KERNEL);
+ board_mtd = kzalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), GFP_KERNEL);
if (!board_mtd) {
printk ("Unable to allocate NAND MTD device structure.\n");
err = -ENOMEM;
goto out;
}
- /* Initialize structures */
- memset ((char *) board_mtd, 0, sizeof(struct mtd_info) + sizeof(struct nand_chip));
-
/* map physical adress */
baseaddr = (unsigned long)ioremap(CHIP_PHYSICAL_ADDRESS, 1024);
if(!baseaddr){
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 54] drivers/scsi/mvme16x_scsi.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (53 preceding siblings ...)
2007-07-31 21:22 ` [PATCH 53] Documentation/DocBook/mtdnand.tmpl: " Mariusz Kozlowski
@ 2007-07-31 21:23 ` Mariusz Kozlowski
2007-07-31 21:27 ` [PATCH 55] drivers/char/n_hdlc.c: " Mariusz Kozlowski
` (27 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 21:23 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, linux-scsi, jongk
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/scsi/mvme16x_scsi.c | 3740 -> 3678 (-62 bytes)
drivers/scsi/mvme16x_scsi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/scsi/mvme16x_scsi.c 2007-07-26 13:07:42.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/scsi/mvme16x_scsi.c 2007-07-31 11:02:11.000000000 +0200
@@ -48,13 +48,12 @@ mvme16x_probe(struct device *dev)
goto out;
}
- hostdata = kmalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL);
+ hostdata = kzalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL);
if (hostdata == NULL) {
printk(KERN_ERR "mvme16x-scsi: "
"Failed to allocate host data\n");
goto out;
}
- memset(hostdata, 0, sizeof(struct NCR_700_Host_Parameters));
/* Fill in the required pieces of hostdata */
hostdata->base = (void __iomem *)0xfff47000UL;
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 55] drivers/char/n_hdlc.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (54 preceding siblings ...)
2007-07-31 21:23 ` [PATCH 54] drivers/scsi/mvme16x_scsi.c: " Mariusz Kozlowski
@ 2007-07-31 21:27 ` Mariusz Kozlowski
2007-08-01 0:16 ` Alan Cox
2007-07-31 21:29 ` [PATCH 56] drivers/scsi/NCR_D700.c: " Mariusz Kozlowski
` (26 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 21:27 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, khc
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/char/n_hdlc.c | 27451 -> 27423 (-28 bytes)
drivers/char/n_hdlc.o | 112528 -> 112516 (-12 bytes)
drivers/char/n_hdlc.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/char/n_hdlc.c 2007-07-26 13:07:41.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/char/n_hdlc.c 2007-07-31 23:19:40.000000000 +0200
@@ -807,13 +807,12 @@ static struct n_hdlc *n_hdlc_alloc(void)
{
struct n_hdlc_buf *buf;
int i;
- struct n_hdlc *n_hdlc = kmalloc(sizeof(*n_hdlc), GFP_KERNEL);
-
+ struct n_hdlc *n_hdlc;
+
+ n_hdlc = kzalloc(sizeof(*n_hdlc), GFP_KERNEL);
if (!n_hdlc)
return NULL;
- memset(n_hdlc, 0, sizeof(*n_hdlc));
-
n_hdlc_buf_list_init(&n_hdlc->rx_free_buf_list);
n_hdlc_buf_list_init(&n_hdlc->tx_free_buf_list);
n_hdlc_buf_list_init(&n_hdlc->rx_buf_list);
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 56] drivers/scsi/NCR_D700.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (55 preceding siblings ...)
2007-07-31 21:27 ` [PATCH 55] drivers/char/n_hdlc.c: " Mariusz Kozlowski
@ 2007-07-31 21:29 ` Mariusz Kozlowski
2007-07-31 21:31 ` [PATCH 57] net/netfilter/nf_conntrack_expect.c: " Mariusz Kozlowski
` (25 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 21:29 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, linux-scsi, James.Bottomley
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/scsi/NCR_D700.c | 10643 -> 10615 (-28 bytes)
drivers/scsi/NCR_D700.o | 118400 -> 118196 (-204 bytes)
drivers/scsi/NCR_D700.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/scsi/NCR_D700.c 2007-07-26 13:07:42.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/scsi/NCR_D700.c 2007-07-31 11:13:37.000000000 +0200
@@ -313,10 +313,10 @@ NCR_D700_probe(struct device *dev)
break;
}
- p = kmalloc(sizeof(*p), GFP_KERNEL);
+ p = kzalloc(sizeof(*p), GFP_KERNEL);
if (!p)
return -ENOMEM;
- memset(p, '\0', sizeof(*p));
+
p->dev = dev;
snprintf(p->name, sizeof(p->name), "D700(%s)", dev->bus_id);
if (request_irq(irq, NCR_D700_intr, IRQF_SHARED, p->name, p)) {
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 57] net/netfilter/nf_conntrack_expect.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (56 preceding siblings ...)
2007-07-31 21:29 ` [PATCH 56] drivers/scsi/NCR_D700.c: " Mariusz Kozlowski
@ 2007-07-31 21:31 ` Mariusz Kozlowski
2007-08-02 4:52 ` David Miller
2007-07-31 21:32 ` [PATCH 58] net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c: " Mariusz Kozlowski
` (24 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 21:31 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, netfilter-devel, coreteam
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
net/netfilter/nf_conntrack_expect.c | 14786 -> 14726 (-60 bytes)
net/netfilter/nf_conntrack_expect.o | 137990 -> 138154 (+164 bytes)
net/netfilter/nf_conntrack_expect.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- linux-2.6.23-rc1-mm1-a/net/netfilter/nf_conntrack_expect.c 2007-07-26 13:07:44.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/net/netfilter/nf_conntrack_expect.c 2007-07-31 15:22:45.000000000 +0200
@@ -477,15 +477,14 @@ static int exp_open(struct inode *inode,
struct ct_expect_iter_state *st;
int ret;
- st = kmalloc(sizeof(struct ct_expect_iter_state), GFP_KERNEL);
- if (st == NULL)
+ st = kzalloc(sizeof(struct ct_expect_iter_state), GFP_KERNEL);
+ if (!st)
return -ENOMEM;
ret = seq_open(file, &exp_seq_ops);
if (ret)
goto out_free;
seq = file->private_data;
seq->private = st;
- memset(st, 0, sizeof(struct ct_expect_iter_state));
return ret;
out_free:
kfree(st);
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 58] net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (57 preceding siblings ...)
2007-07-31 21:31 ` [PATCH 57] net/netfilter/nf_conntrack_expect.c: " Mariusz Kozlowski
@ 2007-07-31 21:32 ` Mariusz Kozlowski
2007-08-02 4:53 ` David Miller
2007-07-31 21:33 ` [PATCH 59] drivers/video/offb.c: " Mariusz Kozlowski
` (23 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 21:32 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, netfilter-devel, coreteam
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c | 10333 -> 10273 (-60 bytes)
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.o | 116092 -> 115996 (-96 bytes)
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- linux-2.6.23-rc1-mm1-a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c 2007-07-26 13:07:44.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c 2007-07-31 15:18:28.000000000 +0200
@@ -294,15 +294,14 @@ static int exp_open(struct inode *inode,
struct ct_expect_iter_state *st;
int ret;
- st = kmalloc(sizeof(struct ct_expect_iter_state), GFP_KERNEL);
- if (st == NULL)
+ st = kzalloc(sizeof(struct ct_expect_iter_state), GFP_KERNEL);
+ if (!st)
return -ENOMEM;
ret = seq_open(file, &exp_seq_ops);
if (ret)
goto out_free;
seq = file->private_data;
seq->private = st;
- memset(st, 0, sizeof(struct ct_expect_iter_state));
return ret;
out_free:
kfree(st);
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 59] drivers/video/offb.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (58 preceding siblings ...)
2007-07-31 21:32 ` [PATCH 58] net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c: " Mariusz Kozlowski
@ 2007-07-31 21:33 ` Mariusz Kozlowski
2007-07-31 21:34 ` [PATCH 60] drivers/net/wireless/prism54/oid_mgt.c: " Mariusz Kozlowski
` (22 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 21:33 UTC (permalink / raw)
To: linux-kernel
Cc: kernel-janitors, Andrew Morton, mchehab, v4l-dvb-maintainer,
video4linux-list
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/video/offb.c | 14535 -> 14505 (-30 bytes)
drivers/video/offb.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/video/offb.c 2007-07-26 13:07:41.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/video/offb.c 2007-07-31 11:22:32.000000000 +0200
@@ -273,13 +273,11 @@ static void __init offb_init_fb(const ch
size = sizeof(struct fb_info) + sizeof(u32) * 16;
- info = kmalloc(size, GFP_ATOMIC);
-
- if (info == 0) {
+ info = kzalloc(size, GFP_ATOMIC);
+ if (!info) {
release_mem_region(res_start, res_size);
return;
}
- memset(info, 0, size);
fix = &info->fix;
var = &info->var;
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 60] drivers/net/wireless/prism54/oid_mgt.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (59 preceding siblings ...)
2007-07-31 21:33 ` [PATCH 59] drivers/video/offb.c: " Mariusz Kozlowski
@ 2007-07-31 21:34 ` Mariusz Kozlowski
2007-08-01 1:12 ` Luis R. Rodriguez
2007-07-31 21:37 ` [PATCH 61] drivers/scsi/osst.c: " Mariusz Kozlowski
` (21 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 21:34 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, mcgrof, linux-wireless
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/net/wireless/prism54/oid_mgt.c | 25377 -> 25297 (-80 bytes)
drivers/net/wireless/prism54/oid_mgt.o | 128460 -> 128284 (-176 bytes)
drivers/net/wireless/prism54/oid_mgt.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/net/wireless/prism54/oid_mgt.c 2007-07-26 13:07:43.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/net/wireless/prism54/oid_mgt.c 2007-07-30 00:27:44.000000000 +0200
@@ -244,13 +244,11 @@ mgt_init(islpci_private *priv)
/* Alloc the cache */
for (i = 0; i < OID_NUM_LAST; i++) {
if (isl_oid[i].flags & OID_FLAG_CACHED) {
- priv->mib[i] = kmalloc(isl_oid[i].size *
+ priv->mib[i] = kzalloc(isl_oid[i].size *
(isl_oid[i].range + 1),
GFP_KERNEL);
if (!priv->mib[i])
return -ENOMEM;
- memset(priv->mib[i], 0,
- isl_oid[i].size * (isl_oid[i].range + 1));
} else
priv->mib[i] = NULL;
}
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 61] drivers/scsi/osst.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (60 preceding siblings ...)
2007-07-31 21:34 ` [PATCH 60] drivers/net/wireless/prism54/oid_mgt.c: " Mariusz Kozlowski
@ 2007-07-31 21:37 ` Mariusz Kozlowski
2007-07-31 21:41 ` [PATCH 62] include/asm-avr32/pgalloc.h: kmalloc + memset conversion to kcalloc Mariusz Kozlowski
` (20 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 21:37 UTC (permalink / raw)
To: linux-kernel
Cc: kernel-janitors, Andrew Morton, James.Bottomley, linux-scsi, osst
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/scsi/osst.c | 185412 -> 185361 (-51 bytes)
drivers/scsi/osst.o | 272432 -> 272344 (-88 bytes)
drivers/scsi/osst.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/scsi/osst.c 2007-07-26 13:07:42.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/scsi/osst.c 2007-07-31 14:14:52.000000000 +0200
@@ -5778,13 +5778,12 @@ static int osst_probe(struct device *dev
dev_num = i;
/* allocate a struct osst_tape for this device */
- tpnt = kmalloc(sizeof(struct osst_tape), GFP_ATOMIC);
- if (tpnt == NULL) {
+ tpnt = kzalloc(sizeof(struct osst_tape), GFP_ATOMIC);
+ if (!tpnt) {
write_unlock(&os_scsi_tapes_lock);
printk(KERN_ERR "osst :E: Can't allocate device descriptor, device not attached.\n");
goto out_put_disk;
}
- memset(tpnt, 0, sizeof(struct osst_tape));
/* allocate a buffer for this device */
i = SDp->host->sg_tablesize;
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 62] include/asm-avr32/pgalloc.h: kmalloc + memset conversion to kcalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (61 preceding siblings ...)
2007-07-31 21:37 ` [PATCH 61] drivers/scsi/osst.c: " Mariusz Kozlowski
@ 2007-07-31 21:41 ` Mariusz Kozlowski
2007-08-03 11:42 ` Haavard Skinnemoen
2007-07-31 21:46 ` [PATCH 63] drivers/scsi/pluto.c: mostly " Mariusz Kozlowski
` (19 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 21:41 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, hskinnemoen
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
include/asm-avr32/pgalloc.h | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
--- linux-2.6.23-rc1-mm1-a/include/asm-avr32/pgalloc.h 2007-07-26 13:07:41.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/include/asm-avr32/pgalloc.h 2007-07-31 15:05:25.000000000 +0200
@@ -27,13 +27,7 @@ static __inline__ void pmd_populate(stru
*/
static __inline__ pgd_t *pgd_alloc(struct mm_struct *mm)
{
- unsigned int pgd_size = (USER_PTRS_PER_PGD * sizeof(pgd_t));
- pgd_t *pgd = kmalloc(pgd_size, GFP_KERNEL);
-
- if (pgd)
- memset(pgd, 0, pgd_size);
-
- return pgd;
+ return kcalloc(USER_PTRS_PER_PGD, sizeof(pgd_t), GFP_KERNEL);
}
static inline void pgd_free(pgd_t *pgd)
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 63] drivers/scsi/pluto.c: mostly kmalloc + memset conversion to kcalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (62 preceding siblings ...)
2007-07-31 21:41 ` [PATCH 62] include/asm-avr32/pgalloc.h: kmalloc + memset conversion to kcalloc Mariusz Kozlowski
@ 2007-07-31 21:46 ` Mariusz Kozlowski
2007-07-31 21:49 ` [PATCH 65] drivers/mtd/maps/pmcmsp-flash.c: kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (18 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 21:46 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, James.Bottomley, linux-scsi
This patch does kmalloc + memset conversion to kcalloc. Also the following warning is fixed.
CC drivers/scsi/pluto.o
drivers/scsi/pluto.c: In function 'pluto_info':
drivers/scsi/pluto.c:283: warning: unused variable 'p'
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/scsi/pluto.c | 8787 -> 8657 (-130 bytes)
drivers/scsi/pluto.o | 125264 -> 124648 (-616 bytes)
drivers/scsi/pluto.c | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/scsi/pluto.c 2007-07-26 13:07:42.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/scsi/pluto.c 2007-07-31 18:18:38.000000000 +0200
@@ -111,13 +111,12 @@ int __init pluto_detect(struct scsi_host
#endif
return 0;
}
- fcs = kmalloc(sizeof (struct ctrl_inquiry) * fcscount, GFP_DMA);
+ fcs = kcalloc(fcscount, sizeof(struct ctrl_inquiry), GFP_DMA);
if (!fcs) {
printk ("PLUTO: Not enough memory to probe\n");
return 0;
}
- memset (fcs, 0, sizeof (struct ctrl_inquiry) * fcscount);
memset (&dev, 0, sizeof(dev));
atomic_set (&fcss, fcscount);
@@ -211,12 +210,12 @@ int __init pluto_detect(struct scsi_host
char *p;
long *ages;
- ages = kmalloc (((inq->channels + 1) * inq->targets) * sizeof(long), GFP_KERNEL);
- if (!ages) continue;
+ ages = kcalloc((inq->channels + 1) * inq->targets, sizeof(long), GFP_KERNEL);
+ if (!ages)
+ continue;
host = scsi_register (tpnt, sizeof (struct pluto));
- if(!host)
- {
+ if (!host) {
kfree(ages);
continue;
}
@@ -238,7 +237,6 @@ int __init pluto_detect(struct scsi_host
fc->channels = inq->channels + 1;
fc->targets = inq->targets;
fc->ages = ages;
- memset (ages, 0, ((inq->channels + 1) * inq->targets) * sizeof(long));
pluto->fc = fc;
memcpy (pluto->rev_str, inq->revision, 4);
@@ -260,7 +258,7 @@ int __init pluto_detect(struct scsi_host
} else
fc->fcp_register(fc, TYPE_SCSI_FCP, 1);
}
- kfree((char *)fcs);
+ kfree(fcs);
if (nplutos)
printk ("PLUTO: Total of %d SparcSTORAGE Arrays found\n", nplutos);
return nplutos;
@@ -282,15 +280,19 @@ int pluto_release(struct Scsi_Host *host
const char *pluto_info(struct Scsi_Host *host)
{
- static char buf[128], *p;
+ static char buf[128];
struct pluto *pluto = (struct pluto *) host->hostdata;
sprintf(buf, "SUN SparcSTORAGE Array %s fw %s serial %s %dx%d on %s",
pluto->rev_str, pluto->fw_rev_str, pluto->serial_str,
host->max_channel, host->max_id, pluto->fc->name);
#ifdef __sparc__
- p = strchr(buf, 0);
- sprintf(p, " PROM node %x", pluto->fc->dev->prom_node);
+ {
+ char *p;
+
+ p = strchr(buf, 0);
+ sprintf(p, " PROM node %x", pluto->fc->dev->prom_node);
+ }
#endif
return buf;
}
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 65] drivers/mtd/maps/pmcmsp-flash.c: kmalloc + memset conversion to k[cz]alloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (63 preceding siblings ...)
2007-07-31 21:46 ` [PATCH 63] drivers/scsi/pluto.c: mostly " Mariusz Kozlowski
@ 2007-07-31 21:49 ` Mariusz Kozlowski
2007-07-31 21:51 ` [PATCH 64] drivers/scsi/qla2xxx/qla_init.c: mostly " Mariusz Kozlowski
` (17 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 21:49 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, dwmw2, linux-mtd
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/mtd/maps/pmcmsp-flash.c | 5540 -> 5454 (-86 bytes)
drivers/mtd/maps/pmcmsp-flash.c | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/mtd/maps/pmcmsp-flash.c 2007-07-26 13:07:41.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/mtd/maps/pmcmsp-flash.c 2007-07-31 11:37:49.000000000 +0200
@@ -73,13 +73,16 @@ int __init init_msp_flash(void)
return -ENXIO;
printk(KERN_NOTICE "Found %d PMC flash devices\n", fcnt);
- msp_flash = (struct mtd_info **)kmalloc(
- fcnt * sizeof(struct map_info *), GFP_KERNEL);
- msp_parts = (struct mtd_partition **)kmalloc(
- fcnt * sizeof(struct mtd_partition *), GFP_KERNEL);
- msp_maps = (struct map_info *)kmalloc(
- fcnt * sizeof(struct mtd_info), GFP_KERNEL);
- memset(msp_maps, 0, fcnt * sizeof(struct mtd_info));
+
+ msp_flash = kmalloc(fcnt * sizeof(struct map_info *), GFP_KERNEL);
+ msp_parts = kmalloc(fcnt * sizeof(struct mtd_partition *), GFP_KERNEL);
+ msp_maps = kcalloc(fcnt, sizeof(struct mtd_info), GFP_KERNEL);
+ if (!msp_flash || !msp_parts || !msp_maps) {
+ kfree(msp_maps);
+ kfree(msp_parts);
+ kfree(msp_flash);
+ return -ENOMEM;
+ }
/* loop over the flash devices, initializing each */
for (i = 0; i < fcnt; i++) {
@@ -95,9 +98,8 @@ int __init init_msp_flash(void)
continue;
}
- msp_parts[i] = (struct mtd_partition *)kmalloc(
- pcnt * sizeof(struct mtd_partition), GFP_KERNEL);
- memset(msp_parts[i], 0, pcnt * sizeof(struct mtd_partition));
+ msp_parts[i] = kcalloc(pcnt, sizeof(struct mtd_partition),
+ GFP_KERNEL);
/* now initialize the devices proper */
flash_name[5] = '0' + i;
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 64] drivers/scsi/qla2xxx/qla_init.c: mostly kmalloc + memset conversion to k[cz]alloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (64 preceding siblings ...)
2007-07-31 21:49 ` [PATCH 65] drivers/mtd/maps/pmcmsp-flash.c: kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
@ 2007-07-31 21:51 ` Mariusz Kozlowski
2007-07-31 22:00 ` Andrew Vasquez
2007-07-31 21:54 ` [PATCH 66] net/ipv4/raw.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
` (16 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 21:51 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, linux-driver, linux-scsi
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/scsi/qla2xxx/qla_init.c | 107445 -> 107327 (-118 bytes)
drivers/scsi/qla2xxx/qla_init.o | 237540 -> 237424 (-116 bytes)
drivers/scsi/qla2xxx/qla_init.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/scsi/qla2xxx/qla_init.c 2007-07-26 13:07:42.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/scsi/qla2xxx/qla_init.c 2007-07-31 14:24:51.000000000 +0200
@@ -1787,12 +1787,11 @@ qla2x00_alloc_fcport(scsi_qla_host_t *ha
{
fc_port_t *fcport;
- fcport = kmalloc(sizeof(fc_port_t), flags);
- if (fcport == NULL)
- return (fcport);
+ fcport = kzalloc(sizeof(fc_port_t), flags);
+ if (!fcport)
+ return NULL;
/* Setup fcport template structure. */
- memset(fcport, 0, sizeof (fc_port_t));
fcport->ha = ha;
fcport->vp_idx = ha->vp_idx;
fcport->port_type = FCT_UNKNOWN;
@@ -1802,7 +1801,7 @@ qla2x00_alloc_fcport(scsi_qla_host_t *ha
fcport->supported_classes = FC_COS_UNSPECIFIED;
spin_lock_init(&fcport->rport_lock);
- return (fcport);
+ return fcport;
}
/*
@@ -2497,13 +2496,12 @@ qla2x00_find_all_fabric_devs(scsi_qla_ho
rval = QLA_SUCCESS;
/* Try GID_PT to get device list, else GAN. */
- swl = kmalloc(sizeof(sw_info_t) * MAX_FIBRE_DEVICES, GFP_ATOMIC);
- if (swl == NULL) {
+ swl = kcalloc(MAX_FIBRE_DEVICES, sizeof(sw_info_t), GFP_ATOMIC);
+ if (!swl) {
/*EMPTY*/
DEBUG2(printk("scsi(%ld): GID_PT allocations failed, fallback "
"on GA_NXT\n", ha->host_no));
} else {
- memset(swl, 0, sizeof(sw_info_t) * MAX_FIBRE_DEVICES);
if (qla2x00_gid_pt(ha, swl) != QLA_SUCCESS) {
kfree(swl);
swl = NULL;
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 66] net/ipv4/raw.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (65 preceding siblings ...)
2007-07-31 21:51 ` [PATCH 64] drivers/scsi/qla2xxx/qla_init.c: mostly " Mariusz Kozlowski
@ 2007-07-31 21:54 ` Mariusz Kozlowski
2007-08-02 4:54 ` David Miller
2007-07-31 21:55 ` [PATCH 67] net/ipv4/route.c: mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (15 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 21:54 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, netdev, davem
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
net/ipv4/raw.c | 21650 -> 21628 (-22 bytes)
net/ipv4/raw.o | 179112 -> 179272 (+160 bytes)
net/ipv4/raw.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- linux-2.6.23-rc1-mm1-a/net/ipv4/raw.c 2007-07-26 13:07:44.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/net/ipv4/raw.c 2007-07-31 15:20:27.000000000 +0200
@@ -900,8 +900,9 @@ static int raw_seq_open(struct inode *in
{
struct seq_file *seq;
int rc = -ENOMEM;
- struct raw_iter_state *s = kmalloc(sizeof(*s), GFP_KERNEL);
-
+ struct raw_iter_state *s;
+
+ s = kzalloc(sizeof(*s), GFP_KERNEL);
if (!s)
goto out;
rc = seq_open(file, &raw_seq_ops);
@@ -910,7 +911,6 @@ static int raw_seq_open(struct inode *in
seq = file->private_data;
seq->private = s;
- memset(s, 0, sizeof(*s));
out:
return rc;
out_kfree:
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 67] net/ipv4/route.c: mostly kmalloc + memset conversion to k[cz]alloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (66 preceding siblings ...)
2007-07-31 21:54 ` [PATCH 66] net/ipv4/raw.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
@ 2007-07-31 21:55 ` Mariusz Kozlowski
2007-08-02 4:54 ` David Miller
2007-07-31 21:56 ` [PATCH 68] drivers/net/s2io.c: " Mariusz Kozlowski
` (14 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 21:55 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, davem, netdev
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
net/ipv4/route.c | 75650 -> 75628 (-22 bytes)
net/ipv4/route.o | 256303 -> 256467 (+164 bytes)
net/ipv4/route.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- linux-2.6.23-rc1-mm1-a/net/ipv4/route.c 2007-07-26 13:07:44.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/net/ipv4/route.c 2007-07-31 15:21:41.000000000 +0200
@@ -374,8 +374,9 @@ static int rt_cache_seq_open(struct inod
{
struct seq_file *seq;
int rc = -ENOMEM;
- struct rt_cache_iter_state *s = kmalloc(sizeof(*s), GFP_KERNEL);
-
+ struct rt_cache_iter_state *s;
+
+ s = kzalloc(sizeof(*s), GFP_KERNEL);
if (!s)
goto out;
rc = seq_open(file, &rt_cache_seq_ops);
@@ -383,7 +384,6 @@ static int rt_cache_seq_open(struct inod
goto out_kfree;
seq = file->private_data;
seq->private = s;
- memset(s, 0, sizeof(*s));
out:
return rc;
out_kfree:
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 68] drivers/net/s2io.c: kmalloc + memset conversion to k[cz]alloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (67 preceding siblings ...)
2007-07-31 21:55 ` [PATCH 67] net/ipv4/route.c: mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
@ 2007-07-31 21:56 ` Mariusz Kozlowski
2007-08-07 21:57 ` Jeff Garzik
2007-07-31 21:58 ` [PATCH 69] drivers/net/sb1250-mac.c: kmalloc + memset conversion to kcalloc Mariusz Kozlowski
` (13 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 21:56 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, netdev, jgarzik
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/net/s2io.c | 235587 -> 235340 (-247 bytes)
drivers/net/s2io.o | 460768 -> 460120 (-648 bytes)
drivers/net/s2io.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/net/s2io.c 2007-07-26 13:07:42.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/net/s2io.c 2007-07-31 13:44:02.000000000 +0200
@@ -531,7 +531,7 @@ static int init_shared_mem(struct s2io_n
for (i = 0; i < config->tx_fifo_num; i++) {
int fifo_len = config->tx_cfg[i].fifo_len;
int list_holder_size = fifo_len * sizeof(struct list_info_hold);
- mac_control->fifos[i].list_info = kmalloc(list_holder_size,
+ mac_control->fifos[i].list_info = kzalloc(list_holder_size,
GFP_KERNEL);
if (!mac_control->fifos[i].list_info) {
DBG_PRINT(INFO_DBG,
@@ -539,7 +539,6 @@ static int init_shared_mem(struct s2io_n
return -ENOMEM;
}
mem_allocated += list_holder_size;
- memset(mac_control->fifos[i].list_info, 0, list_holder_size);
}
for (i = 0; i < config->tx_fifo_num; i++) {
int page_num = TXD_MEM_PAGE_CNT(config->tx_cfg[i].fifo_len,
@@ -3788,9 +3787,9 @@ static int s2io_enable_msi_x(struct s2io
u16 msi_control; /* Temp variable */
int ret, i, j, msix_indx = 1;
- nic->entries = kmalloc(MAX_REQUESTED_MSI_X * sizeof(struct msix_entry),
+ nic->entries = kcalloc(MAX_REQUESTED_MSI_X, sizeof(struct msix_entry),
GFP_KERNEL);
- if (nic->entries == NULL) {
+ if (!nic->entries) {
DBG_PRINT(INFO_DBG, "%s: Memory allocation failed\n", \
__FUNCTION__);
nic->mac_control.stats_info->sw_stat.mem_alloc_fail_cnt++;
@@ -3798,12 +3797,11 @@ static int s2io_enable_msi_x(struct s2io
}
nic->mac_control.stats_info->sw_stat.mem_allocated
+= (MAX_REQUESTED_MSI_X * sizeof(struct msix_entry));
- memset(nic->entries, 0,MAX_REQUESTED_MSI_X * sizeof(struct msix_entry));
nic->s2io_entries =
- kmalloc(MAX_REQUESTED_MSI_X * sizeof(struct s2io_msix_entry),
+ kcalloc(MAX_REQUESTED_MSI_X, sizeof(struct s2io_msix_entry),
GFP_KERNEL);
- if (nic->s2io_entries == NULL) {
+ if (!nic->s2io_entries) {
DBG_PRINT(INFO_DBG, "%s: Memory allocation failed\n",
__FUNCTION__);
nic->mac_control.stats_info->sw_stat.mem_alloc_fail_cnt++;
@@ -3814,8 +3812,6 @@ static int s2io_enable_msi_x(struct s2io
}
nic->mac_control.stats_info->sw_stat.mem_allocated
+= (MAX_REQUESTED_MSI_X * sizeof(struct s2io_msix_entry));
- memset(nic->s2io_entries, 0,
- MAX_REQUESTED_MSI_X * sizeof(struct s2io_msix_entry));
for (i=0; i< MAX_REQUESTED_MSI_X; i++) {
nic->entries[i].entry = i;
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 69] drivers/net/sb1250-mac.c: kmalloc + memset conversion to kcalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (68 preceding siblings ...)
2007-07-31 21:56 ` [PATCH 68] drivers/net/s2io.c: " Mariusz Kozlowski
@ 2007-07-31 21:58 ` Mariusz Kozlowski
2007-08-07 21:57 ` Jeff Garzik
2007-07-31 22:02 ` [PATCH 70] drivers/mtd/ubi/scan.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
` (12 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 21:58 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, jgarzik, netdev
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/net/sb1250-mac.c | 76286 -> 76199 (-87 bytes)
drivers/net/sb1250-mac.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/net/sb1250-mac.c 2007-07-26 13:07:43.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/net/sb1250-mac.c 2007-07-31 13:46:10.000000000 +0200
@@ -779,10 +779,8 @@ static void sbdma_initctx(sbmacdma_t *d,
* And context table
*/
- d->sbdma_ctxtable = (struct sk_buff **)
- kmalloc(d->sbdma_maxdescr*sizeof(struct sk_buff *), GFP_KERNEL);
-
- memset(d->sbdma_ctxtable,0,d->sbdma_maxdescr*sizeof(struct sk_buff *));
+ d->sbdma_ctxtable = kcalloc(d->sbdma_maxdescr,
+ sizeof(struct sk_buff *), GFP_KERNEL);
#ifdef CONFIG_SBMAC_COALESCE
/*
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 64] drivers/scsi/qla2xxx/qla_init.c: mostly kmalloc + memset conversion to k[cz]alloc
2007-07-31 21:51 ` [PATCH 64] drivers/scsi/qla2xxx/qla_init.c: mostly " Mariusz Kozlowski
@ 2007-07-31 22:00 ` Andrew Vasquez
0 siblings, 0 replies; 131+ messages in thread
From: Andrew Vasquez @ 2007-07-31 22:00 UTC (permalink / raw)
To: Mariusz Kozlowski
Cc: linux-kernel, kernel-janitors, Andrew Morton, linux-driver, linux-scsi
On Tue, 31 Jul 2007, Mariusz Kozlowski wrote:
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
>
> drivers/scsi/qla2xxx/qla_init.c | 107445 -> 107327 (-118 bytes)
> drivers/scsi/qla2xxx/qla_init.o | 237540 -> 237424 (-116 bytes)
>
> drivers/scsi/qla2xxx/qla_init.c | 14 ++++++--------
> 1 file changed, 6 insertions(+), 8 deletions(-)
Acked-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 70] drivers/mtd/ubi/scan.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (69 preceding siblings ...)
2007-07-31 21:58 ` [PATCH 69] drivers/net/sb1250-mac.c: kmalloc + memset conversion to kcalloc Mariusz Kozlowski
@ 2007-07-31 22:02 ` Mariusz Kozlowski
2007-07-31 22:03 ` [PATCH 71] kernel/sched.c: kmalloc + memset conversion to kcalloc Mariusz Kozlowski
` (11 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 22:02 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, dwmw2, linux-mtd, dedekind
To be able to convert kmalloc + memset(..., 1, ...) to kzalloc this patch
reverses the logic around 'buf'.
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/mtd/ubi/scan.c | 35563 -> 35531 (-32 bytes)
drivers/mtd/ubi/scan.o | 125124 -> 124564 (-560 bytes)
drivers/mtd/ubi/scan.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/mtd/ubi/scan.c 2007-07-26 13:07:41.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/mtd/ubi/scan.c 2007-07-31 11:42:42.000000000 +0200
@@ -1314,11 +1314,10 @@ static int paranoid_check_si(const struc
* Make sure that all the physical eraseblocks are in one of the lists
* or trees.
*/
- buf = kmalloc(ubi->peb_count, GFP_KERNEL);
+ buf = kzalloc(ubi->peb_count, GFP_KERNEL);
if (!buf)
return -ENOMEM;
- memset(buf, 1, ubi->peb_count);
for (pnum = 0; pnum < ubi->peb_count; pnum++) {
err = ubi_io_is_bad(ubi, pnum);
if (err < 0) {
@@ -1326,28 +1325,28 @@ static int paranoid_check_si(const struc
return err;
}
else if (err)
- buf[pnum] = 0;
+ buf[pnum] = 1;
}
ubi_rb_for_each_entry(rb1, sv, &si->volumes, rb)
ubi_rb_for_each_entry(rb2, seb, &sv->root, u.rb)
- buf[seb->pnum] = 0;
+ buf[seb->pnum] = 1;
list_for_each_entry(seb, &si->free, u.list)
- buf[seb->pnum] = 0;
+ buf[seb->pnum] = 1;
list_for_each_entry(seb, &si->corr, u.list)
- buf[seb->pnum] = 0;
+ buf[seb->pnum] = 1;
list_for_each_entry(seb, &si->erase, u.list)
- buf[seb->pnum] = 0;
+ buf[seb->pnum] = 1;
list_for_each_entry(seb, &si->alien, u.list)
- buf[seb->pnum] = 0;
+ buf[seb->pnum] = 1;
err = 0;
for (pnum = 0; pnum < ubi->peb_count; pnum++)
- if (buf[pnum]) {
+ if (!buf[pnum]) {
ubi_err("PEB %d is not referred", pnum);
err = 1;
}
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 71] kernel/sched.c: kmalloc + memset conversion to kcalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (70 preceding siblings ...)
2007-07-31 22:02 ` [PATCH 70] drivers/mtd/ubi/scan.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
@ 2007-07-31 22:03 ` Mariusz Kozlowski
2007-07-31 22:05 ` [PATCH 72] drivers/mmc/core/sdio_bus.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
` (10 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 22:03 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, gregkh
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
kernel/sched.c | 166559 -> 166517 (-42 bytes)
kernel/sched.o | 445965 -> 445941 (-24 bytes)
kernel/sched.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- linux-2.6.23-rc1-mm1-a/kernel/sched.c 2007-07-26 13:07:44.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/kernel/sched.c 2007-07-31 15:10:55.000000000 +0200
@@ -5167,10 +5167,10 @@ static struct ctl_table sd_ctl_root[] =
static struct ctl_table *sd_alloc_ctl_entry(int n)
{
- struct ctl_table *entry =
- kmalloc(n * sizeof(struct ctl_table), GFP_KERNEL);
+ struct ctl_table *entry;
+
+ entry = kcalloc(n, sizeof(struct ctl_table), GFP_KERNEL);
BUG_ON(!entry);
- memset(entry, 0, n * sizeof(struct ctl_table));
return entry;
}
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 72] drivers/mmc/core/sdio_bus.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (71 preceding siblings ...)
2007-07-31 22:03 ` [PATCH 71] kernel/sched.c: kmalloc + memset conversion to kcalloc Mariusz Kozlowski
@ 2007-07-31 22:05 ` Mariusz Kozlowski
2007-08-04 13:03 ` Pierre Ossman
2007-07-31 22:07 ` [PATCH 73] drivers/parport/share.c: " Mariusz Kozlowski
` (9 subsequent siblings)
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 22:05 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, drzeus-mmc
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/mmc/core/sdio_bus.c | 5528 -> 5483 (-45 bytes)
drivers/mmc/core/sdio_bus.o | 70044 -> 69876 (-168 bytes)
drivers/mmc/core/sdio_bus.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/mmc/core/sdio_bus.c 2007-07-26 13:07:43.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/mmc/core/sdio_bus.c 2007-07-30 00:22:42.000000000 +0200
@@ -203,12 +203,10 @@ struct sdio_func *sdio_alloc_func(struct
{
struct sdio_func *func;
- func = kmalloc(sizeof(struct sdio_func), GFP_KERNEL);
+ func = kzalloc(sizeof(struct sdio_func), GFP_KERNEL);
if (!func)
return ERR_PTR(-ENOMEM);
- memset(func, 0, sizeof(struct sdio_func));
-
func->card = card;
device_initialize(&func->dev);
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 73] drivers/parport/share.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (72 preceding siblings ...)
2007-07-31 22:05 ` [PATCH 72] drivers/mmc/core/sdio_bus.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
@ 2007-07-31 22:07 ` Mariusz Kozlowski
2007-07-31 22:08 ` [PATCH 74] include/linux/textsearch.h: " Mariusz Kozlowski
` (8 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 22:07 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/parport/share.c | 29584 -> 29542 (-42 bytes)
drivers/parport/share.o | 117775 -> 117795 (+20 bytes)
drivers/parport/share.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/parport/share.c 2007-07-26 13:07:44.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/parport/share.c 2007-07-30 00:14:05.000000000 +0200
@@ -282,14 +282,13 @@ struct parport *parport_register_port(un
int device;
char *name;
- tmp = kmalloc(sizeof(struct parport), GFP_KERNEL);
+ tmp = kzalloc(sizeof(struct parport), GFP_KERNEL);
if (!tmp) {
printk(KERN_WARNING "parport: memory squeeze\n");
return NULL;
}
/* Init our structure */
- memset(tmp, 0, sizeof(struct parport));
tmp->base = base;
tmp->irq = irq;
tmp->dma = dma;
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 74] include/linux/textsearch.h: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (73 preceding siblings ...)
2007-07-31 22:07 ` [PATCH 73] drivers/parport/share.c: " Mariusz Kozlowski
@ 2007-07-31 22:08 ` Mariusz Kozlowski
2007-07-31 22:10 ` [PATCH 75] drivers/macintosh/therm_adt746x.c: " Mariusz Kozlowski
` (7 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 22:08 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
include/linux/textsearch.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- linux-2.6.23-rc1-mm1-a/include/linux/textsearch.h 2007-07-26 13:07:40.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/include/linux/textsearch.h 2007-07-31 11:58:29.000000000 +0200
@@ -164,11 +164,10 @@ static inline struct ts_config *alloc_ts
{
struct ts_config *conf;
- conf = kmalloc(TS_PRIV_ALIGN(sizeof(*conf)) + payload, gfp_mask);
- if (conf == NULL)
+ conf = kzalloc(TS_PRIV_ALIGN(sizeof(*conf)) + payload, gfp_mask);
+ if (!conf)
return ERR_PTR(-ENOMEM);
- memset(conf, 0, TS_PRIV_ALIGN(sizeof(*conf)) + payload);
return conf;
}
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 75] drivers/macintosh/therm_adt746x.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (74 preceding siblings ...)
2007-07-31 22:08 ` [PATCH 74] include/linux/textsearch.h: " Mariusz Kozlowski
@ 2007-07-31 22:10 ` Mariusz Kozlowski
2007-07-31 22:11 ` [PATCH 76] drivers/net/via-velocity.c: mostly kmalloc + memset conversion to kcalloc Mariusz Kozlowski
` (6 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 22:10 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, linuxppc-dev, benh
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/macintosh/therm_adt746x.c | 17298 -> 17244 (-54 bytes)
drivers/macintosh/therm_adt746x.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/macintosh/therm_adt746x.c 2007-07-26 13:07:42.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/macintosh/therm_adt746x.c 2007-07-31 11:18:55.000000000 +0200
@@ -379,13 +379,10 @@ static int attach_one_thermostat(struct
if (thermostat)
return 0;
- th = (struct thermostat *)
- kmalloc(sizeof(struct thermostat), GFP_KERNEL);
-
+ th = kzalloc(sizeof(struct thermostat), GFP_KERNEL);
if (!th)
return -ENOMEM;
- memset(th, 0, sizeof(*th));
th->clt.addr = addr;
th->clt.adapter = adapter;
th->clt.driver = &thermostat_driver;
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 76] drivers/net/via-velocity.c: mostly kmalloc + memset conversion to kcalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (75 preceding siblings ...)
2007-07-31 22:10 ` [PATCH 75] drivers/macintosh/therm_adt746x.c: " Mariusz Kozlowski
@ 2007-07-31 22:11 ` Mariusz Kozlowski
2007-07-31 22:32 ` Francois Romieu
2007-08-07 21:57 ` Jeff Garzik
2007-07-31 22:13 ` [PATCH 77] sound/oss/via82cxxx_audio.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
` (5 subsequent siblings)
82 siblings, 2 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 22:11 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, romieu, netdev
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/net/via-velocity.c | 88263 -> 88120 (-143 bytes)
drivers/net/via-velocity.o | 254264 -> 253828 (-436 bytes)
drivers/net/via-velocity.c | 24 ++++++++++--------------
1 file changed, 10 insertions(+), 14 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/net/via-velocity.c 2007-07-26 13:07:43.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/net/via-velocity.c 2007-07-31 13:50:28.000000000 +0200
@@ -1071,14 +1071,12 @@ static int velocity_rx_refill(struct vel
static int velocity_init_rd_ring(struct velocity_info *vptr)
{
- int ret = -ENOMEM;
- unsigned int rsize = sizeof(struct velocity_rd_info) *
- vptr->options.numrx;
+ int ret;
- vptr->rd_info = kmalloc(rsize, GFP_KERNEL);
- if(vptr->rd_info == NULL)
- goto out;
- memset(vptr->rd_info, 0, rsize);
+ vptr->rd_info = kcalloc(vptr->options.numrx,
+ sizeof(struct velocity_rd_info), GFP_KERNEL);
+ if (!vptr->rd_info)
+ return -ENOMEM;
vptr->rd_filled = vptr->rd_dirty = vptr->rd_curr = 0;
@@ -1088,7 +1086,7 @@ static int velocity_init_rd_ring(struct
"%s: failed to allocate RX buffer.\n", vptr->dev->name);
velocity_free_rd_ring(vptr);
}
-out:
+
return ret;
}
@@ -1142,21 +1140,19 @@ static int velocity_init_td_ring(struct
dma_addr_t curr;
struct tx_desc *td;
struct velocity_td_info *td_info;
- unsigned int tsize = sizeof(struct velocity_td_info) *
- vptr->options.numtx;
/* Init the TD ring entries */
for (j = 0; j < vptr->num_txq; j++) {
curr = vptr->td_pool_dma[j];
- vptr->td_infos[j] = kmalloc(tsize, GFP_KERNEL);
- if(vptr->td_infos[j] == NULL)
- {
+ vptr->td_infos[j] = kcalloc(vptr->options.numtx,
+ sizeof(struct velocity_td_info),
+ GFP_KERNEL);
+ if (!vptr->td_infos[j]) {
while(--j >= 0)
kfree(vptr->td_infos[j]);
return -ENOMEM;
}
- memset(vptr->td_infos[j], 0, tsize);
for (i = 0; i < vptr->options.numtx; i++, curr += sizeof(struct tx_desc)) {
td = &(vptr->td_rings[j][i]);
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 77] sound/oss/via82cxxx_audio.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (76 preceding siblings ...)
2007-07-31 22:11 ` [PATCH 76] drivers/net/via-velocity.c: mostly kmalloc + memset conversion to kcalloc Mariusz Kozlowski
@ 2007-07-31 22:13 ` Mariusz Kozlowski
2007-07-31 22:14 ` [PATCH 78] fs/proc/vmcore.c: " Mariusz Kozlowski
` (4 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 22:13 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, jgarzik
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
sound/oss/via82cxxx_audio.c | 91182 -> 91145 (-37 bytes)
sound/oss/via82cxxx_audio.o | 180104 -> 179984 (-120 bytes)
sound/oss/via82cxxx_audio.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- linux-2.6.23-rc1-mm1-a/sound/oss/via82cxxx_audio.c 2007-07-26 13:07:39.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/sound/oss/via82cxxx_audio.c 2007-07-31 15:23:27.000000000 +0200
@@ -3401,7 +3401,7 @@ static int __devinit via_init_one (struc
if (rc)
goto err_out_res;
- card = kmalloc (sizeof (*card), GFP_KERNEL);
+ card = kzalloc(sizeof(*card), GFP_KERNEL);
if (!card) {
printk (KERN_ERR PFX "out of memory, aborting\n");
rc = -ENOMEM;
@@ -3410,7 +3410,6 @@ static int __devinit via_init_one (struc
pci_set_drvdata (pdev, card);
- memset (card, 0, sizeof (*card));
card->pdev = pdev;
card->baseaddr = pci_resource_start (pdev, 0);
card->card_num = via_num_cards++;
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 78] fs/proc/vmcore.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (77 preceding siblings ...)
2007-07-31 22:13 ` [PATCH 77] sound/oss/via82cxxx_audio.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
@ 2007-07-31 22:14 ` Mariusz Kozlowski
2007-07-31 22:16 ` [PATCH 79] arch/i386/mach-voyager/voyager_cat.c: " Mariusz Kozlowski
` (3 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 22:14 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, gregkh
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
fs/proc/vmcore.c | 16780 -> 16727 (-53 bytes)
fs/proc/vmcore.o | 113032 -> 112744 (-288 bytes)
fs/proc/vmcore.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
--- linux-2.6.23-rc1-mm1-a/fs/proc/vmcore.c 2007-07-26 13:07:46.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/fs/proc/vmcore.c 2007-07-31 15:51:05.000000000 +0200
@@ -178,12 +178,7 @@ const struct file_operations proc_vmcore
static struct vmcore* __init get_new_element(void)
{
- struct vmcore *p;
-
- p = kmalloc(sizeof(*p), GFP_KERNEL);
- if (p)
- memset(p, 0, sizeof(*p));
- return p;
+ return kzalloc(sizeof(struct vmcore), GFP_KERNEL);
}
static u64 __init get_vmcore_size_elf64(char *elfptr)
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 79] arch/i386/mach-voyager/voyager_cat.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (78 preceding siblings ...)
2007-07-31 22:14 ` [PATCH 78] fs/proc/vmcore.c: " Mariusz Kozlowski
@ 2007-07-31 22:16 ` Mariusz Kozlowski
2007-07-31 22:18 ` [PATCH 80] fs/ext4/xattr.c: " Mariusz Kozlowski
` (2 subsequent siblings)
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 22:16 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, J.E.J.Bottomley
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
arch/i386/mach-voyager/voyager_cat.c | 35688 -> 35576 (-112 bytes)
arch/i386/mach-voyager/voyager_cat.o | 151452 -> 150992 (-460 bytes)
arch/i386/mach-voyager/voyager_cat.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
--- linux-2.6.23-rc1-mm1-a/arch/i386/mach-voyager/voyager_cat.c 2007-07-26 13:07:46.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/arch/i386/mach-voyager/voyager_cat.c 2007-07-31 12:51:54.000000000 +0200
@@ -648,20 +648,18 @@ voyager_cat_init(void)
}
CDEBUG(("VOYAGER DEBUG: found module id 0x%x, %s\n", i,
cat_module_name(i)));
- *modpp = kmalloc(sizeof(voyager_module_t), GFP_KERNEL); /*&voyager_module_storage[cat_count++];*/
- if(*modpp == NULL) {
+ *modpp = kzalloc(sizeof(voyager_module_t), GFP_KERNEL); /*&voyager_module_storage[cat_count++];*/
+ if (!*modpp) {
printk("**WARNING** kmalloc failure in cat_init\n");
continue;
}
- memset(*modpp, 0, sizeof(voyager_module_t));
/* need temporary asic for cat_subread. It will be
* filled in correctly later */
- (*modpp)->asic = kmalloc(sizeof(voyager_asic_t), GFP_KERNEL); /*&voyager_asic_storage[asic_count];*/
- if((*modpp)->asic == NULL) {
+ (*modpp)->asic = kzalloc(sizeof(voyager_asic_t), GFP_KERNEL); /*&voyager_asic_storage[asic_count];*/
+ if (!(*modpp)->asic) {
printk("**WARNING** kmalloc failure in cat_init\n");
continue;
}
- memset((*modpp)->asic, 0, sizeof(voyager_asic_t));
(*modpp)->asic->asic_id = VOYAGER_CAT_ID;
(*modpp)->asic->subaddr = VOYAGER_SUBADDR_HI;
(*modpp)->module_addr = i;
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 80] fs/ext4/xattr.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (79 preceding siblings ...)
2007-07-31 22:16 ` [PATCH 79] arch/i386/mach-voyager/voyager_cat.c: " Mariusz Kozlowski
@ 2007-07-31 22:18 ` Mariusz Kozlowski
2007-07-31 22:19 ` [PATCH 81] drivers/net/wireless/zd1201.c: " Mariusz Kozlowski
2007-07-31 22:21 ` [PATCH 82] drivers/scsi/zorro7xx.c: " Mariusz Kozlowski
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 22:18 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, linux-ext4
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
fs/ext4/xattr.c | 42421 -> 42382 (-39 bytes)
fs/ext4/xattr.o | 166152 -> 165720 (-432 bytes)
fs/ext4/xattr.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- linux-2.6.23-rc1-mm1-a/fs/ext4/xattr.c 2007-07-26 13:07:46.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/fs/ext4/xattr.c 2007-07-29 23:55:37.000000000 +0200
@@ -750,12 +750,11 @@ ext4_xattr_block_set(handle_t *handle, s
}
} else {
/* Allocate a buffer where we construct the new block. */
- s->base = kmalloc(sb->s_blocksize, GFP_KERNEL);
+ s->base = kzalloc(sb->s_blocksize, GFP_KERNEL);
/* assert(header == s->base) */
error = -ENOMEM;
if (s->base == NULL)
goto cleanup;
- memset(s->base, 0, sb->s_blocksize);
header(s->base)->h_magic = cpu_to_le32(EXT4_XATTR_MAGIC);
header(s->base)->h_blocks = cpu_to_le32(1);
header(s->base)->h_refcount = cpu_to_le32(1);
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 81] drivers/net/wireless/zd1201.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (80 preceding siblings ...)
2007-07-31 22:18 ` [PATCH 80] fs/ext4/xattr.c: " Mariusz Kozlowski
@ 2007-07-31 22:19 ` Mariusz Kozlowski
2007-07-31 22:21 ` [PATCH 82] drivers/scsi/zorro7xx.c: " Mariusz Kozlowski
82 siblings, 0 replies; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 22:19 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, linux-usb-devel, pe1rxq
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/net/wireless/zd1201.c | 47231 -> 47205 (-26 bytes)
drivers/net/wireless/zd1201.o | 216884 -> 216984 (+100 bytes)
drivers/net/wireless/zd1201.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/net/wireless/zd1201.c 2007-07-26 13:07:43.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/net/wireless/zd1201.c 2007-07-30 00:29:07.000000000 +0200
@@ -522,7 +522,7 @@ static int zd1201_setconfig(struct zd120
zd->rxdatas = 0;
zd->rxlen = 0;
for (seq=0; len > 0; seq++) {
- request = kmalloc(16, gfp_mask);
+ request = kzalloc(16, gfp_mask);
if (!request)
return -ENOMEM;
urb = usb_alloc_urb(0, gfp_mask);
@@ -530,7 +530,6 @@ static int zd1201_setconfig(struct zd120
kfree(request);
return -ENOMEM;
}
- memset(request, 0, 16);
reqlen = len>12 ? 12 : len;
request[0] = ZD1201_USB_RESREQ;
request[1] = seq;
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH 82] drivers/scsi/zorro7xx.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
` (81 preceding siblings ...)
2007-07-31 22:19 ` [PATCH 81] drivers/net/wireless/zd1201.c: " Mariusz Kozlowski
@ 2007-07-31 22:21 ` Mariusz Kozlowski
2007-08-01 16:11 ` James Bottomley
82 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-07-31 22:21 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel-janitors, Andrew Morton, James.Bottomley, linux-scsi
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/scsi/zorro7xx.c | 4579 -> 4501 (-78 bytes)
drivers/scsi/zorro7xx.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
--- linux-2.6.23-rc1-mm1-a/drivers/scsi/zorro7xx.c 2007-07-26 13:07:42.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/scsi/zorro7xx.c 2007-07-31 14:25:58.000000000 +0200
@@ -69,7 +69,7 @@ static struct zorro_device_id zorro7xx_z
static int __devinit zorro7xx_init_one(struct zorro_dev *z,
const struct zorro_device_id *ent)
{
- struct Scsi_Host * host = NULL;
+ struct Scsi_Host *host;
struct NCR_700_Host_Parameters *hostdata;
struct zorro_driver_data *zdd;
unsigned long board, ioaddr;
@@ -89,14 +89,12 @@ static int __devinit zorro7xx_init_one(s
return -EBUSY;
}
- hostdata = kmalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL);
- if (hostdata == NULL) {
+ hostdata = kzalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL);
+ if (!hostdata) {
printk(KERN_ERR "zorro7xx: Failed to allocate host data\n");
goto out_release;
}
- memset(hostdata, 0, sizeof(struct NCR_700_Host_Parameters));
-
/* Fill in the required pieces of hostdata */
if (ioaddr > 0x01000000)
hostdata->base = ioremap(ioaddr, zorro_resource_len(z));
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 76] drivers/net/via-velocity.c: mostly kmalloc + memset conversion to kcalloc
2007-07-31 22:11 ` [PATCH 76] drivers/net/via-velocity.c: mostly kmalloc + memset conversion to kcalloc Mariusz Kozlowski
@ 2007-07-31 22:32 ` Francois Romieu
2007-08-07 21:57 ` Jeff Garzik
1 sibling, 0 replies; 131+ messages in thread
From: Francois Romieu @ 2007-07-31 22:32 UTC (permalink / raw)
To: Mariusz Kozlowski; +Cc: linux-kernel, kernel-janitors, Andrew Morton, netdev
Mariusz Kozlowski <m.kozlowski@tuxland.pl> :
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
>
> drivers/net/via-velocity.c | 88263 -> 88120 (-143 bytes)
> drivers/net/via-velocity.o | 254264 -> 253828 (-436 bytes)
>
> drivers/net/via-velocity.c | 24 ++++++++++--------------
> 1 file changed, 10 insertions(+), 14 deletions(-)
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
--
Ueimor
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 25] drivers/usb/misc/ftdi-elan.c: kmalloc + memset conversion to kzalloc
2007-07-31 17:42 ` [PATCH 25] drivers/usb/misc/ftdi-elan.c: " Mariusz Kozlowski
@ 2007-07-31 23:46 ` Christoph Lameter
0 siblings, 0 replies; 131+ messages in thread
From: Christoph Lameter @ 2007-07-31 23:46 UTC (permalink / raw)
To: Mariusz Kozlowski
Cc: linux-kernel, kernel-janitors, Andrew Morton, tony.olech,
linux-usb-devel
On Tue, 31 Jul 2007, Mariusz Kozlowski wrote:
> @@ -2777,12 +2777,14 @@ static int ftdi_elan_probe(struct usb_in
> size_t buffer_size;
> int i;
> int retval = -ENOMEM;
> - struct usb_ftdi *ftdi = kmalloc(sizeof(struct usb_ftdi), GFP_KERNEL);
> - if (ftdi == NULL) {
> + struct usb_ftdi *ftdi;
> +
> + ftdi = kzalloc(sizeof(struct usb_ftdi), GFP_KERNEL);
> + if (!ftdi) {
Whitespace damage soewhere?
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 55] drivers/char/n_hdlc.c: kmalloc + memset conversion to kzalloc
2007-07-31 21:27 ` [PATCH 55] drivers/char/n_hdlc.c: " Mariusz Kozlowski
@ 2007-08-01 0:16 ` Alan Cox
2007-08-08 6:02 ` Mariusz Kozlowski
0 siblings, 1 reply; 131+ messages in thread
From: Alan Cox @ 2007-08-01 0:16 UTC (permalink / raw)
To: Mariusz Kozlowski; +Cc: linux-kernel, kernel-janitors, Andrew Morton, khc
On Tue, 31 Jul 2007 23:27:30 +0200
Mariusz Kozlowski <m.kozlowski@tuxland.pl> wrote:
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
NAK
> - struct n_hdlc *n_hdlc = kmalloc(sizeof(*n_hdlc), GFP_KERNEL);
> -
> + struct n_hdlc *n_hdlc;
> +
> + n_hdlc = kzalloc(sizeof(*n_hdlc), GFP_KERNEL);
Change looks fine but please keep the original formatting style
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 09] drivers/char/consolemap.c: kmalloc + memset conversion to kzalloc
2007-07-31 17:08 ` [PATCH 09] drivers/char/consolemap.c: " Mariusz Kozlowski
@ 2007-08-01 0:19 ` Alan Cox
0 siblings, 0 replies; 131+ messages in thread
From: Alan Cox @ 2007-08-01 0:19 UTC (permalink / raw)
To: Mariusz Kozlowski; +Cc: linux-kernel, kernel-janitors, Andrew Morton
On Tue, 31 Jul 2007 19:08:28 +0200
Mariusz Kozlowski <m.kozlowski@tuxland.pl> wrote:
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Acked-by: Alan Cox <alan@redhat.com>
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 60] drivers/net/wireless/prism54/oid_mgt.c: kmalloc + memset conversion to kzalloc
2007-07-31 21:34 ` [PATCH 60] drivers/net/wireless/prism54/oid_mgt.c: " Mariusz Kozlowski
@ 2007-08-01 1:12 ` Luis R. Rodriguez
0 siblings, 0 replies; 131+ messages in thread
From: Luis R. Rodriguez @ 2007-08-01 1:12 UTC (permalink / raw)
To: Mariusz Kozlowski
Cc: linux-kernel, kernel-janitors, Andrew Morton, linux-wireless
On 7/31/07, Mariusz Kozlowski <m.kozlowski@tuxland.pl> wrote:
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Acked-by: Luis R. Rodriguez <mcgrof@gmail.com>
> drivers/net/wireless/prism54/oid_mgt.c | 25377 -> 25297 (-80 bytes)
> drivers/net/wireless/prism54/oid_mgt.o | 128460 -> 128284 (-176 bytes)
>
> drivers/net/wireless/prism54/oid_mgt.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> --- linux-2.6.23-rc1-mm1-a/drivers/net/wireless/prism54/oid_mgt.c 2007-07-26 13:07:43.000000000 +0200
> +++ linux-2.6.23-rc1-mm1-b/drivers/net/wireless/prism54/oid_mgt.c 2007-07-30 00:27:44.000000000 +0200
> @@ -244,13 +244,11 @@ mgt_init(islpci_private *priv)
> /* Alloc the cache */
> for (i = 0; i < OID_NUM_LAST; i++) {
> if (isl_oid[i].flags & OID_FLAG_CACHED) {
> - priv->mib[i] = kmalloc(isl_oid[i].size *
> + priv->mib[i] = kzalloc(isl_oid[i].size *
> (isl_oid[i].range + 1),
> GFP_KERNEL);
> if (!priv->mib[i])
> return -ENOMEM;
> - memset(priv->mib[i], 0,
> - isl_oid[i].size * (isl_oid[i].range + 1));
> } else
> priv->mib[i] = NULL;
> }
>
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 34] fs/autofs4/inode.c: kmalloc + memset conversion to kzalloc
2007-07-31 18:05 ` [PATCH 34] fs/autofs4/inode.c: " Mariusz Kozlowski
@ 2007-08-01 4:02 ` Ian Kent
0 siblings, 0 replies; 131+ messages in thread
From: Ian Kent @ 2007-08-01 4:02 UTC (permalink / raw)
To: Mariusz Kozlowski; +Cc: linux-kernel, kernel-janitors, Andrew Morton, autofs
On Tue, 2007-07-31 at 20:05 +0200, Mariusz Kozlowski wrote:
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
ACK.
>
> fs/autofs4/inode.c | 10467 -> 10435 (-32 bytes)
> fs/autofs4/inode.o | 98576 -> 98552 (-24 bytes)
>
> fs/autofs4/inode.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> --- linux-2.6.23-rc1-mm1-a/fs/autofs4/inode.c 2007-07-26 13:07:46.000000000 +0200
> +++ linux-2.6.23-rc1-mm1-b/fs/autofs4/inode.c 2007-07-29 23:56:08.000000000 +0200
> @@ -312,13 +312,11 @@ int autofs4_fill_super(struct super_bloc
> struct autofs_sb_info *sbi;
> struct autofs_info *ino;
>
> - sbi = kmalloc(sizeof(*sbi), GFP_KERNEL);
> + sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
> if (!sbi)
> goto fail_unlock;
> DPRINTK("starting up, sbi = %p",sbi);
>
> - memset(sbi, 0, sizeof(*sbi));
> -
> s->s_fs_info = sbi;
> sbi->magic = AUTOFS_SBI_MAGIC;
> sbi->pipefd = -1;
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 52] include/asm-m32r/thread_info.h: kmalloc + memset conversion to kzalloc
2007-07-31 19:18 ` [PATCH 52] include/asm-m32r/thread_info.h: " Mariusz Kozlowski
@ 2007-08-01 5:12 ` Hirokazu Takata
0 siblings, 0 replies; 131+ messages in thread
From: Hirokazu Takata @ 2007-08-01 5:12 UTC (permalink / raw)
To: Mariusz Kozlowski
Cc: linux-kernel, kernel-janitors, Andrew Morton, takata, linux-m32r
From: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Date: Tue, 31 Jul 2007 21:18:33 +0200
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
>
> include/asm-m32r/thread_info.h | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
Acked-by: Hirokazu Takata <takata@linux-m32r.org>
Thank you.
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 38] drivers/char/ip2/ip2main.c: kmalloc + memset conversion to kzalloc
2007-07-31 18:13 ` [PATCH 38] drivers/char/ip2/ip2main.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
@ 2007-08-01 16:04 ` Alan Cox
0 siblings, 0 replies; 131+ messages in thread
From: Alan Cox @ 2007-08-01 16:04 UTC (permalink / raw)
To: Mariusz Kozlowski; +Cc: linux-kernel, kernel-janitors, Andrew Morton
On Tue, 31 Jul 2007 20:13:50 +0200
Mariusz Kozlowski <m.kozlowski@tuxland.pl> wrote:
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Acked-by: Alan Cox <alan@redhat.com>
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 82] drivers/scsi/zorro7xx.c: kmalloc + memset conversion to kzalloc
2007-07-31 22:21 ` [PATCH 82] drivers/scsi/zorro7xx.c: " Mariusz Kozlowski
@ 2007-08-01 16:11 ` James Bottomley
0 siblings, 0 replies; 131+ messages in thread
From: James Bottomley @ 2007-08-01 16:11 UTC (permalink / raw)
To: Mariusz Kozlowski
Cc: linux-kernel, kernel-janitors, Andrew Morton, linux-scsi
On Wed, 2007-08-01 at 00:21 +0200, Mariusz Kozlowski wrote:
> [PATCH 82] ...
Please no. This should be a simple mechanical substitution. I don't
need to collect acks from everyone. This is a nice point to do a
conversion like this, so I'll sort out the mismerges.
Please assure me you have a good methodology for doing the replacement
and a reasonable one for testing and then send either one patch for the
entirety of SCSI to me, or one patch for the entirety of the kernel to
Andrew and we'll see if we can get it through the process.
James
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 30] drivers/ide/arm/icside.c: kmalloc + memset conversion to kzalloc
2007-07-31 17:58 ` [PATCH 30] drivers/ide/arm/icside.c: " Mariusz Kozlowski
@ 2007-08-01 21:01 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 131+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-08-01 21:01 UTC (permalink / raw)
To: Mariusz Kozlowski; +Cc: linux-kernel, kernel-janitors, Andrew Morton, rmk
On Tuesday 31 July 2007, Mariusz Kozlowski wrote:
> Is this a bug? In original verison memset cleared sizeof(state) bytes
> instead of sizeof(*state). If it was intentional then this patch is invalid.
> If not intentional -> valid :) Please review.
Yes, it is a bug so this patch is a valid bugfix. :-)
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
> drivers/ide/arm/icside.c | 18883 -> 18849 (-34 bytes)
>
> drivers/ide/arm/icside.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
applied
> --- linux-2.6.23-rc1-mm1-a/drivers/ide/arm/icside.c 2007-07-26 13:07:41.000000000 +0200
> +++ linux-2.6.23-rc1-mm1-b/drivers/ide/arm/icside.c 2007-07-31 11:32:27.000000000 +0200
> @@ -682,13 +682,12 @@ icside_probe(struct expansion_card *ec,
> if (ret)
> goto out;
>
> - state = kmalloc(sizeof(struct icside_state), GFP_KERNEL);
> + state = kzalloc(sizeof(struct icside_state), GFP_KERNEL);
> if (!state) {
> ret = -ENOMEM;
> goto release;
> }
>
> - memset(state, 0, sizeof(state));
> state->type = ICS_TYPE_NOTYPE;
> state->dev = &ec->dev;
>
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 31] drivers/scsi/ide-scsi.c: kmalloc + memset conversion to kzalloc
2007-07-31 18:01 ` [PATCH 31] drivers/scsi/ide-scsi.c: " Mariusz Kozlowski
@ 2007-08-01 21:02 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 131+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-08-01 21:02 UTC (permalink / raw)
To: Mariusz Kozlowski
Cc: linux-kernel, kernel-janitors, Andrew Morton, linux-scsi
On Tuesday 31 July 2007, Mariusz Kozlowski wrote:
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
>
> drivers/scsi/ide-scsi.c | 34642 -> 34536 (-106 bytes)
> drivers/scsi/ide-scsi.o | 171728 -> 171524 (-204 bytes)
>
> drivers/scsi/ide-scsi.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
applied
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 57] net/netfilter/nf_conntrack_expect.c: kmalloc + memset conversion to kzalloc
2007-07-31 21:31 ` [PATCH 57] net/netfilter/nf_conntrack_expect.c: " Mariusz Kozlowski
@ 2007-08-02 4:52 ` David Miller
0 siblings, 0 replies; 131+ messages in thread
From: David Miller @ 2007-08-02 4:52 UTC (permalink / raw)
To: m.kozlowski
Cc: linux-kernel, akpm, netfilter-devel, kernel-janitors, coreteam
From: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Date: Tue, 31 Jul 2007 23:31:02 +0200
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Applied.
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 58] net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c: kmalloc + memset conversion to kzalloc
2007-07-31 21:32 ` [PATCH 58] net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c: " Mariusz Kozlowski
@ 2007-08-02 4:53 ` David Miller
0 siblings, 0 replies; 131+ messages in thread
From: David Miller @ 2007-08-02 4:53 UTC (permalink / raw)
To: m.kozlowski
Cc: linux-kernel, kernel-janitors, akpm, netfilter-devel, coreteam
From: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Date: Tue, 31 Jul 2007 23:32:04 +0200
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Applied.
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 66] net/ipv4/raw.c: kmalloc + memset conversion to kzalloc
2007-07-31 21:54 ` [PATCH 66] net/ipv4/raw.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
@ 2007-08-02 4:54 ` David Miller
0 siblings, 0 replies; 131+ messages in thread
From: David Miller @ 2007-08-02 4:54 UTC (permalink / raw)
To: m.kozlowski; +Cc: linux-kernel, kernel-janitors, akpm, netdev
From: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Date: Tue, 31 Jul 2007 23:54:00 +0200
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Applied.
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 67] net/ipv4/route.c: mostly kmalloc + memset conversion to k[cz]alloc
2007-07-31 21:55 ` [PATCH 67] net/ipv4/route.c: mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
@ 2007-08-02 4:54 ` David Miller
0 siblings, 0 replies; 131+ messages in thread
From: David Miller @ 2007-08-02 4:54 UTC (permalink / raw)
To: m.kozlowski; +Cc: linux-kernel, kernel-janitors, akpm, netdev
From: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Date: Tue, 31 Jul 2007 23:55:02 +0200
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Applied.
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 62] include/asm-avr32/pgalloc.h: kmalloc + memset conversion to kcalloc
2007-07-31 21:41 ` [PATCH 62] include/asm-avr32/pgalloc.h: kmalloc + memset conversion to kcalloc Mariusz Kozlowski
@ 2007-08-03 11:42 ` Haavard Skinnemoen
0 siblings, 0 replies; 131+ messages in thread
From: Haavard Skinnemoen @ 2007-08-03 11:42 UTC (permalink / raw)
To: Mariusz Kozlowski; +Cc: linux-kernel, kernel-janitors, Andrew Morton
On Tue, 31 Jul 2007 23:41:00 +0200
Mariusz Kozlowski <m.kozlowski@tuxland.pl> wrote:
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Applied, thanks. I found some other cruft in pgalloc.h which I cleaned
up as well.
Haavard
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 45] drivers/scsi/lpfc/lpfc_init.c: kmalloc + memset conversion to kcalloc
2007-07-31 18:26 ` [PATCH 45] drivers/scsi/lpfc/lpfc_init.c: " Mariusz Kozlowski
@ 2007-08-03 15:41 ` James Smart
0 siblings, 0 replies; 131+ messages in thread
From: James Smart @ 2007-08-03 15:41 UTC (permalink / raw)
To: Mariusz Kozlowski
Cc: linux-kernel, kernel-janitors, Andrew Morton, linux-scsi
ACK
-- james s
Mariusz Kozlowski wrote:
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
>
> drivers/scsi/lpfc/lpfc_init.c | 65932 -> 65881 (-51 bytes)
> drivers/scsi/lpfc/lpfc_init.o | 219760 -> 219616 (-144 bytes)
>
> drivers/scsi/lpfc/lpfc_init.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> --- linux-2.6.23-rc1-mm1-a/drivers/scsi/lpfc/lpfc_init.c 2007-07-26 13:07:42.000000000 +0200
> +++ linux-2.6.23-rc1-mm1-b/drivers/scsi/lpfc/lpfc_init.c 2007-07-31 11:07:59.000000000 +0200
> @@ -1280,11 +1280,10 @@ lpfc_hba_init(struct lpfc_hba *phba, uin
> uint32_t *HashWorking;
> uint32_t *pwwnn = (uint32_t *) phba->wwnn;
>
> - HashWorking = kmalloc(80 * sizeof(uint32_t), GFP_KERNEL);
> + HashWorking = kcalloc(80, sizeof(uint32_t), GFP_KERNEL);
> if (!HashWorking)
> return;
>
> - memset(HashWorking, 0, (80 * sizeof(uint32_t)));
> HashWorking[0] = HashWorking[78] = *pwwnn++;
> HashWorking[1] = HashWorking[79] = *pwwnn;
>
>
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 46] drivers/scsi/lpfc/lpfc_scsi.c: kmalloc + memset conversion to kzalloc
2007-07-31 18:27 ` [PATCH 46] drivers/scsi/lpfc/lpfc_scsi.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
@ 2007-08-03 15:41 ` James Smart
2007-08-05 10:00 ` [PATCH] lpfc : lpfc_debugfs.c " James Smart
0 siblings, 1 reply; 131+ messages in thread
From: James Smart @ 2007-08-03 15:41 UTC (permalink / raw)
To: Mariusz Kozlowski
Cc: linux-kernel, kernel-janitors, Andrew Morton, linux-scsi
ACK
-- james s
Mariusz Kozlowski wrote:
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
>
> drivers/scsi/lpfc/lpfc_scsi.c | 42769 -> 42721 (-48 bytes)
> drivers/scsi/lpfc/lpfc_scsi.o | 191332 -> 191240 (-92 bytes)
>
> drivers/scsi/lpfc/lpfc_scsi.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> --- linux-2.6.23-rc1-mm1-a/drivers/scsi/lpfc/lpfc_scsi.c 2007-07-26 13:07:42.000000000 +0200
> +++ linux-2.6.23-rc1-mm1-b/drivers/scsi/lpfc/lpfc_scsi.c 2007-07-31 11:08:46.000000000 +0200
> @@ -208,10 +208,9 @@ lpfc_new_scsi_buf(struct lpfc_vport *vpo
> dma_addr_t pdma_phys;
> uint16_t iotag;
>
> - psb = kmalloc(sizeof(struct lpfc_scsi_buf), GFP_KERNEL);
> + psb = kzalloc(sizeof(struct lpfc_scsi_buf), GFP_KERNEL);
> if (!psb)
> return NULL;
> - memset(psb, 0, sizeof (struct lpfc_scsi_buf));
>
> /*
> * Get memory from the pci pool to map the virt space to pci bus space
>
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 44] drivers/scsi/lpfc/lpfc_debugfs.c: kmalloc + memset conversion to kcalloc
2007-07-31 18:25 ` [PATCH 44] drivers/scsi/lpfc/lpfc_debugfs.c: kmalloc + memset conversion to kcalloc Mariusz Kozlowski
@ 2007-08-03 15:42 ` James Smart
0 siblings, 0 replies; 131+ messages in thread
From: James Smart @ 2007-08-03 15:42 UTC (permalink / raw)
To: Mariusz Kozlowski
Cc: linux-kernel, kernel-janitors, Andrew Morton, linux-scsi
ACK
-- james s
Mariusz Kozlowski wrote:
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
>
> drivers/scsi/lpfc/lpfc_debugfs.c | 13809 -> 13716 (-93 bytes)
> drivers/scsi/lpfc/lpfc_debugfs.o | 146124 -> 146124 (0 bytes)
>
> drivers/scsi/lpfc/lpfc_debugfs.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> --- linux-2.6.23-rc1-mm1-a/drivers/scsi/lpfc/lpfc_debugfs.c 2007-07-26 13:07:42.000000000 +0200
> +++ linux-2.6.23-rc1-mm1-b/drivers/scsi/lpfc/lpfc_debugfs.c 2007-07-31 14:11:24.000000000 +0200
> @@ -432,14 +432,11 @@ lpfc_debugfs_initialize(struct lpfc_vpor
> if (!lpfc_debugfs_start_time)
> lpfc_debugfs_start_time = jiffies;
>
> - vport->disc_trc = kmalloc(
> - (sizeof(struct lpfc_disc_trc) * lpfc_debugfs_max_disc_trc),
> - GFP_KERNEL);
> + vport->disc_trc = kcalloc(lpfc_debugfs_max_disc_trc,
> + sizeof(struct lpfc_disc_trc), GFP_KERNEL);
>
> if (!vport->disc_trc)
> goto debug_failed;
> - memset(vport->disc_trc, 0,
> - (sizeof(struct lpfc_disc_trc) * lpfc_debugfs_max_disc_trc));
>
> snprintf(name, sizeof(name), "discovery_trace");
> vport->debug_disc_trc =
>
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 05] drivers/mmc/core/bus.c: kmalloc + memset conversion to kzalloc
2007-07-31 16:59 ` [PATCH 05] drivers/mmc/core/bus.c: " Mariusz Kozlowski
@ 2007-08-04 13:01 ` Pierre Ossman
0 siblings, 0 replies; 131+ messages in thread
From: Pierre Ossman @ 2007-08-04 13:01 UTC (permalink / raw)
To: Mariusz Kozlowski; +Cc: linux-kernel, kernel-janitors, Andrew Morton
On Tue, 31 Jul 2007 18:59:59 +0200
Mariusz Kozlowski <m.kozlowski@tuxland.pl> wrote:
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
>
> drivers/mmc/core/bus.c | 5663 -> 5619 (-44 bytes)
> drivers/mmc/core/bus.o | 70899 -> 70731 (-168 bytes)
>
> drivers/mmc/core/bus.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
Acked-by: Pierre Ossman <drzeus@drzeus.cx>
--
-- Pierre Ossman
Linux kernel, MMC maintainer http://www.kernel.org
PulseAudio, core developer http://pulseaudio.org
rdesktop, core developer http://www.rdesktop.org
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 29] drivers/mmc/core/host.c: kmalloc + memset conversion to kzalloc
2007-07-31 17:53 ` [PATCH 29] drivers/mmc/core/host.c: " Mariusz Kozlowski
@ 2007-08-04 13:01 ` Pierre Ossman
0 siblings, 0 replies; 131+ messages in thread
From: Pierre Ossman @ 2007-08-04 13:01 UTC (permalink / raw)
To: Mariusz Kozlowski; +Cc: linux-kernel, kernel-janitors, Andrew Morton
On Tue, 31 Jul 2007 19:53:16 +0200
Mariusz Kozlowski <m.kozlowski@tuxland.pl> wrote:
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
>
> drivers/mmc/core/host.c | 3509 -> 3457 (-52 bytes)
> drivers/mmc/core/host.o | 92400 -> 92136 (-264 bytes)
>
> drivers/mmc/core/host.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
Acked-by: Pierre Ossman <drzeus@drzeus.cx>
--
-- Pierre Ossman
Linux kernel, MMC maintainer http://www.kernel.org
PulseAudio, core developer http://pulseaudio.org
rdesktop, core developer http://www.rdesktop.org
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 49] drivers/mmc/core/mmc_ops.c: kmalloc + memset conversion to kzalloc
2007-07-31 18:50 ` [PATCH 49] drivers/mmc/core/mmc_ops.c: " Mariusz Kozlowski
@ 2007-08-04 13:02 ` Pierre Ossman
0 siblings, 0 replies; 131+ messages in thread
From: Pierre Ossman @ 2007-08-04 13:02 UTC (permalink / raw)
To: Mariusz Kozlowski; +Cc: linux-kernel, kernel-janitors, Andrew Morton
On Tue, 31 Jul 2007 20:50:13 +0200
Mariusz Kozlowski <m.kozlowski@tuxland.pl> wrote:
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
>
> drivers/mmc/core/mmc_ops.c | 7957 -> 7924 (-33 bytes)
> drivers/mmc/core/mmc_ops.o | 101732 -> 101744 (+12 bytes)
>
> drivers/mmc/core/mmc_ops.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
Acked-by: Pierre Ossman <drzeus@drzeus.cx>
--
-- Pierre Ossman
Linux kernel, MMC maintainer http://www.kernel.org
PulseAudio, core developer http://pulseaudio.org
rdesktop, core developer http://www.rdesktop.org
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 72] drivers/mmc/core/sdio_bus.c: kmalloc + memset conversion to kzalloc
2007-07-31 22:05 ` [PATCH 72] drivers/mmc/core/sdio_bus.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
@ 2007-08-04 13:03 ` Pierre Ossman
2007-08-04 16:47 ` Andrew Morton
0 siblings, 1 reply; 131+ messages in thread
From: Pierre Ossman @ 2007-08-04 13:03 UTC (permalink / raw)
To: Mariusz Kozlowski; +Cc: linux-kernel, kernel-janitors, Andrew Morton
On Wed, 1 Aug 2007 00:05:24 +0200
Mariusz Kozlowski <m.kozlowski@tuxland.pl> wrote:
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
>
> drivers/mmc/core/sdio_bus.c | 5528 -> 5483 (-45 bytes)
> drivers/mmc/core/sdio_bus.o | 70044 -> 69876 (-168 bytes)
>
> drivers/mmc/core/sdio_bus.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
Acked-by: Pierre Ossman <drzeus@drzeus.cx>
Although this is code that only lives in my -mm tree. Should I carry
this patch instead, perhaps?
--
-- Pierre Ossman
Linux kernel, MMC maintainer http://www.kernel.org
PulseAudio, core developer http://pulseaudio.org
rdesktop, core developer http://www.rdesktop.org
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 72] drivers/mmc/core/sdio_bus.c: kmalloc + memset conversion to kzalloc
2007-08-04 13:03 ` Pierre Ossman
@ 2007-08-04 16:47 ` Andrew Morton
0 siblings, 0 replies; 131+ messages in thread
From: Andrew Morton @ 2007-08-04 16:47 UTC (permalink / raw)
To: Pierre Ossman; +Cc: Mariusz Kozlowski, linux-kernel, kernel-janitors
On Sat, 4 Aug 2007 15:03:34 +0200 Pierre Ossman <drzeus-mmc@drzeus.cx> wrote:
> On Wed, 1 Aug 2007 00:05:24 +0200
> Mariusz Kozlowski <m.kozlowski@tuxland.pl> wrote:
>
> > Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
> >
> > drivers/mmc/core/sdio_bus.c | 5528 -> 5483 (-45 bytes)
> > drivers/mmc/core/sdio_bus.o | 70044 -> 69876 (-168 bytes)
> >
> > drivers/mmc/core/sdio_bus.c | 4 +---
> > 1 file changed, 1 insertion(+), 3 deletions(-)
> >
>
> Acked-by: Pierre Ossman <drzeus@drzeus.cx>
>
> Although this is code that only lives in my -mm tree. Should I carry
> this patch instead, perhaps?
>
Yes please. I always get confused when a git-tree maintainer says
"Acked-by" rather than "applied, thanks".
But I have these queued in my to-send-to-Pierre-regularly queue,
so things will sort themselves out.
^ permalink raw reply [flat|nested] 131+ messages in thread
* [PATCH] lpfc : lpfc_debugfs.c kmalloc + memset conversion to kzalloc
2007-08-03 15:41 ` James Smart
@ 2007-08-05 10:00 ` James Smart
0 siblings, 0 replies; 131+ messages in thread
From: James Smart @ 2007-08-05 10:00 UTC (permalink / raw)
To: linux-scsi
Cc: linux-kernel, kernel-janitors, Andrew Morton, Mariusz Kozlowski
One more area, introduced by the lpfc 8.2.2 patches, that need the
kmalloc+memset conversion.
This patch to be applied atop the 8.2.2 patches.
-- james s
Signed-off-by: James Smart <James.Smart@emulex.com>
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
index 2e3c01b..ef99e2b 100644
--- a/drivers/scsi/lpfc/lpfc_debugfs.c
+++ b/drivers/scsi/lpfc/lpfc_debugfs.c
@@ -856,9 +856,9 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
goto debug_failed;
}
if (!phba->slow_ring_trc) {
- phba->slow_ring_trc = kmalloc(
- (sizeof(struct lpfc_debugfs_trc) *
- lpfc_debugfs_max_slow_ring_trc),
+ phba->slow_ring_trc = kcalloc(
+ lpfc_debugfs_max_slow_ring_trc,
+ sizeof(struct lpfc_debugfs_trc),
GFP_KERNEL);
if (!phba->slow_ring_trc) {
lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
@@ -867,9 +867,6 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
goto debug_failed;
}
atomic_set(&phba->slow_ring_trc_cnt, 0);
- memset(phba->slow_ring_trc, 0,
- (sizeof(struct lpfc_debugfs_trc) *
- lpfc_debugfs_max_slow_ring_trc));
}
}
^ permalink raw reply related [flat|nested] 131+ messages in thread
* Re: [PATCH 68] drivers/net/s2io.c: kmalloc + memset conversion to k[cz]alloc
2007-07-31 21:56 ` [PATCH 68] drivers/net/s2io.c: " Mariusz Kozlowski
@ 2007-08-07 21:57 ` Jeff Garzik
2007-08-08 16:16 ` Ramkrishna Vepa
0 siblings, 1 reply; 131+ messages in thread
From: Jeff Garzik @ 2007-08-07 21:57 UTC (permalink / raw)
To: Mariusz Kozlowski; +Cc: linux-kernel, kernel-janitors, Andrew Morton, netdev
Mariusz Kozlowski wrote:
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
>
> drivers/net/s2io.c | 235587 -> 235340 (-247 bytes)
> drivers/net/s2io.o | 460768 -> 460120 (-648 bytes)
>
> drivers/net/s2io.c | 14 +++++---------
> 1 file changed, 5 insertions(+), 9 deletions(-)
ACK but didn't apply, please wait 24-48 hours (so that s2io fixes go
upstream), then rediff and resend
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 69] drivers/net/sb1250-mac.c: kmalloc + memset conversion to kcalloc
2007-07-31 21:58 ` [PATCH 69] drivers/net/sb1250-mac.c: kmalloc + memset conversion to kcalloc Mariusz Kozlowski
@ 2007-08-07 21:57 ` Jeff Garzik
0 siblings, 0 replies; 131+ messages in thread
From: Jeff Garzik @ 2007-08-07 21:57 UTC (permalink / raw)
To: Mariusz Kozlowski; +Cc: linux-kernel, kernel-janitors, Andrew Morton, netdev
Mariusz Kozlowski wrote:
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
>
> drivers/net/sb1250-mac.c | 76286 -> 76199 (-87 bytes)
>
> drivers/net/sb1250-mac.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
applied
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 76] drivers/net/via-velocity.c: mostly kmalloc + memset conversion to kcalloc
2007-07-31 22:11 ` [PATCH 76] drivers/net/via-velocity.c: mostly kmalloc + memset conversion to kcalloc Mariusz Kozlowski
2007-07-31 22:32 ` Francois Romieu
@ 2007-08-07 21:57 ` Jeff Garzik
1 sibling, 0 replies; 131+ messages in thread
From: Jeff Garzik @ 2007-08-07 21:57 UTC (permalink / raw)
To: Mariusz Kozlowski
Cc: linux-kernel, kernel-janitors, Andrew Morton, romieu, netdev
Mariusz Kozlowski wrote:
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
>
> drivers/net/via-velocity.c | 88263 -> 88120 (-143 bytes)
> drivers/net/via-velocity.o | 254264 -> 253828 (-436 bytes)
>
> drivers/net/via-velocity.c | 24 ++++++++++--------------
> 1 file changed, 10 insertions(+), 14 deletions(-)
applied
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 55] drivers/char/n_hdlc.c: kmalloc + memset conversion to kzalloc
2007-08-01 0:16 ` Alan Cox
@ 2007-08-08 6:02 ` Mariusz Kozlowski
2007-08-08 21:40 ` Krzysztof Halasa
0 siblings, 1 reply; 131+ messages in thread
From: Mariusz Kozlowski @ 2007-08-08 6:02 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-kernel, kernel-janitors, Andrew Morton, khc
> > Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
>
> NAK
>
> > - struct n_hdlc *n_hdlc = kmalloc(sizeof(*n_hdlc), GFP_KERNEL);
> > -
> > + struct n_hdlc *n_hdlc;
> > +
> > + n_hdlc = kzalloc(sizeof(*n_hdlc), GFP_KERNEL);
>
> Change looks fine but please keep the original formatting style
Ok. Here it goes (based on 2.6.23-rc1-mm2).
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/char/n_hdlc.c | 27451 -> 27413 (-38 bytes)
drivers/char/n_hdlc.o | 107068 -> 107088 (+20 bytes)
drivers/char/n_hdlc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- linux-2.6.23-rc1-mm2-a/drivers/char/n_hdlc.c 2007-08-01 08:43:44.000000000 +0200
+++ linux-2.6.23-rc1-mm2-b/drivers/char/n_hdlc.c 2007-08-08 07:50:42.000000000 +0200
@@ -807,13 +807,11 @@ static struct n_hdlc *n_hdlc_alloc(void)
{
struct n_hdlc_buf *buf;
int i;
- struct n_hdlc *n_hdlc = kmalloc(sizeof(*n_hdlc), GFP_KERNEL);
+ struct n_hdlc *n_hdlc = kzalloc(sizeof(*n_hdlc), GFP_KERNEL);
if (!n_hdlc)
return NULL;
- memset(n_hdlc, 0, sizeof(*n_hdlc));
-
n_hdlc_buf_list_init(&n_hdlc->rx_free_buf_list);
n_hdlc_buf_list_init(&n_hdlc->tx_free_buf_list);
n_hdlc_buf_list_init(&n_hdlc->rx_buf_list);
^ permalink raw reply [flat|nested] 131+ messages in thread
* RE: [PATCH 68] drivers/net/s2io.c: kmalloc + memset conversion to k[cz]alloc
2007-08-07 21:57 ` Jeff Garzik
@ 2007-08-08 16:16 ` Ramkrishna Vepa
2007-08-08 16:33 ` Jeff Garzik
0 siblings, 1 reply; 131+ messages in thread
From: Ramkrishna Vepa @ 2007-08-08 16:16 UTC (permalink / raw)
To: Jeff Garzik, Mariusz Kozlowski
Cc: linux-kernel, kernel-janitors, Andrew Morton, netdev
We have a few patches queued and can send this patch in along with ours.
Ram
> -----Original Message-----
> From: netdev-owner@vger.kernel.org
[mailto:netdev-owner@vger.kernel.org]
> On Behalf Of Jeff Garzik
> Sent: Tuesday, August 07, 2007 2:58 PM
> To: Mariusz Kozlowski
> Cc: linux-kernel@vger.kernel.org; kernel-janitors@vger.kernel.org;
Andrew
> Morton; netdev@vger.kernel.org
> Subject: Re: [PATCH 68] drivers/net/s2io.c: kmalloc + memset
conversion to
> k[cz]alloc
>
> Mariusz Kozlowski wrote:
> > Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
> >
> > drivers/net/s2io.c | 235587 -> 235340 (-247 bytes)
> > drivers/net/s2io.o | 460768 -> 460120 (-648 bytes)
> >
> > drivers/net/s2io.c | 14 +++++---------
> > 1 file changed, 5 insertions(+), 9 deletions(-)
>
> ACK but didn't apply, please wait 24-48 hours (so that s2io fixes go
> upstream), then rediff and resend
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 68] drivers/net/s2io.c: kmalloc + memset conversion to k[cz]alloc
2007-08-08 16:16 ` Ramkrishna Vepa
@ 2007-08-08 16:33 ` Jeff Garzik
0 siblings, 0 replies; 131+ messages in thread
From: Jeff Garzik @ 2007-08-08 16:33 UTC (permalink / raw)
To: Ramkrishna Vepa
Cc: Mariusz Kozlowski, linux-kernel, kernel-janitors, Andrew Morton, netdev
Ramkrishna Vepa wrote:
> We have a few patches queued and can send this patch in along with ours.
That would be great, thanks.
Jeff
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 55] drivers/char/n_hdlc.c: kmalloc + memset conversion to kzalloc
2007-08-08 6:02 ` Mariusz Kozlowski
@ 2007-08-08 21:40 ` Krzysztof Halasa
2007-08-08 22:57 ` Paul Fulghum
0 siblings, 1 reply; 131+ messages in thread
From: Krzysztof Halasa @ 2007-08-08 21:40 UTC (permalink / raw)
To: Mariusz Kozlowski; +Cc: Alan Cox, linux-kernel, kernel-janitors, Andrew Morton
Mariusz Kozlowski <m.kozlowski@tuxland.pl> writes:
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
>
> drivers/char/n_hdlc.c | 27451 -> 27413 (-38 bytes)
> drivers/char/n_hdlc.o | 107068 -> 107088 (+20 bytes)
BTW: drivers/char/n_hdlc is a very different thing than these
in drivers/net/wan/ and I have no connection with it. Not sure
who is responsible, if anyone.
--
Krzysztof Halasa
^ permalink raw reply [flat|nested] 131+ messages in thread
* Re: [PATCH 55] drivers/char/n_hdlc.c: kmalloc + memset conversion to kzalloc
2007-08-08 21:40 ` Krzysztof Halasa
@ 2007-08-08 22:57 ` Paul Fulghum
0 siblings, 0 replies; 131+ messages in thread
From: Paul Fulghum @ 2007-08-08 22:57 UTC (permalink / raw)
To: Krzysztof Halasa
Cc: Mariusz Kozlowski, Alan Cox, linux-kernel, kernel-janitors,
Andrew Morton
Krzysztof Halasa wrote:
> Mariusz Kozlowski <m.kozlowski@tuxland.pl> writes:
>
>> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
>>
>> drivers/char/n_hdlc.c | 27451 -> 27413 (-38 bytes)
>> drivers/char/n_hdlc.o | 107068 -> 107088 (+20 bytes)
>
> BTW: drivers/char/n_hdlc is a very different thing than these
> in drivers/net/wan/ and I have no connection with it. Not sure
> who is responsible, if anyone.
I am, my email is at the top of n_hdlc.c but there
is no maintainers entry.
--
Paul Fulghum
Microgate Systems, Ltd
^ permalink raw reply [flat|nested] 131+ messages in thread
end of thread, other threads:[~2007-08-08 21:59 UTC | newest]
Thread overview: 131+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-31 16:45 [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
2007-07-31 16:50 ` [PATCH 01] kmalloc + memset conversion co kzalloc Mariusz Kozlowski
2007-07-31 16:52 ` [PATCH 02] kmalloc + memset conversion to kzalloc Mariusz Kozlowski
2007-07-31 16:56 ` [PATCH 03] drivers/sbus/char/bbc_envctrl.c: " Mariusz Kozlowski
2007-07-31 21:04 ` David Miller
2007-07-31 16:58 ` [PATCH 04] drivers/sbus/char/bbc_i2c.c: " Mariusz Kozlowski
2007-07-31 21:05 ` David Miller
2007-07-31 16:59 ` [PATCH 05] drivers/mmc/core/bus.c: " Mariusz Kozlowski
2007-08-04 13:01 ` Pierre Ossman
2007-07-31 17:01 ` [PATCH 06] drivers/scsi/bvme6000_scsi.c: " Mariusz Kozlowski
2007-07-31 17:03 ` [PATCH 07] drivers/block/cciss.c: " Mariusz Kozlowski
2007-07-31 17:14 ` Miller, Mike (OS Dev)
2007-07-31 17:05 ` [PATCH 08] fs/cifs/connect.c: " Mariusz Kozlowski
2007-07-31 17:08 ` [PATCH 09] drivers/char/consolemap.c: " Mariusz Kozlowski
2007-08-01 0:19 ` Alan Cox
2007-07-31 17:12 ` [PATCH 10] drivers/block/cpqarray.c: better error handling and kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
2007-07-31 20:16 ` Miller, Mike (OS Dev)
2007-07-31 17:14 ` [PATCH 11] drivers/pci/hotplug/cpqphp_ctrl.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
2007-07-31 17:16 ` [PATCH 12] fs/reiser4/plugin/file/cryptcompress.c: " Mariusz Kozlowski
2007-07-31 17:17 ` [PATCH 13] " Mariusz Kozlowski
2007-07-31 17:19 ` [PATCH 14] " Mariusz Kozlowski
2007-07-31 17:21 ` [PATCH 15] " Mariusz Kozlowski
2007-07-31 17:23 ` [PATCH 16] drivers/md/dm-hw-handler.c: " Mariusz Kozlowski
2007-07-31 17:25 ` [PATCH 17] drivers/md/dm-path-selector.c: " Mariusz Kozlowski
2007-07-31 17:26 ` [PATCH 18] drivers/md/dm-table.c: " Mariusz Kozlowski
2007-07-31 17:29 ` [PATCH 19] drivers/md/dm-target.c: " Mariusz Kozlowski
2007-07-31 17:33 ` [PATCH 20] net/decnet/dn_route.c: " Mariusz Kozlowski
2007-07-31 21:06 ` David Miller
2007-07-31 17:35 ` [PATCH 21] drivers/scsi/dpt_i2o.c: " Mariusz Kozlowski
2007-07-31 17:45 ` Salyzyn, Mark
2007-07-31 17:36 ` [PATCH 22] drivers/net/e1000new/ethtool.c: " Mariusz Kozlowski
2007-07-31 17:39 ` [PATCH 23] doc firmware_sample_firmware_class.c: " Mariusz Kozlowski
2007-07-31 17:40 ` [PATCH 24] include/asm-frv/thread_info.h: " Mariusz Kozlowski
2007-07-31 17:42 ` [PATCH 25] drivers/usb/misc/ftdi-elan.c: " Mariusz Kozlowski
2007-07-31 23:46 ` Christoph Lameter
2007-07-31 17:46 ` [PATCH 26] drivers/scsi/gdth.c: " Mariusz Kozlowski
2007-07-31 17:48 ` [PATCH 27] drivers/input/serio/gscps2.c: " Mariusz Kozlowski
2007-07-31 17:49 ` [PATCH 28] drivers/net/wan/hdlc_fr.c: " Mariusz Kozlowski
2007-07-31 19:47 ` Krzysztof Halasa
2007-07-31 17:53 ` [PATCH 29] drivers/mmc/core/host.c: " Mariusz Kozlowski
2007-08-04 13:01 ` Pierre Ossman
2007-07-31 17:58 ` [PATCH 30] drivers/ide/arm/icside.c: " Mariusz Kozlowski
2007-08-01 21:01 ` Bartlomiej Zolnierkiewicz
2007-07-31 18:01 ` [PATCH 31] drivers/scsi/ide-scsi.c: " Mariusz Kozlowski
2007-08-01 21:02 ` Bartlomiej Zolnierkiewicz
2007-07-31 18:03 ` PATCH 32] drivers/mtd/inftlmount.c: kmalloc + memset conversion to kcalloc Mariusz Kozlowski
2007-07-31 18:04 ` [PATCH 33] fs/reiser4/init_super.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
2007-07-31 18:05 ` [PATCH 34] fs/autofs4/inode.c: " Mariusz Kozlowski
2007-08-01 4:02 ` Ian Kent
2007-07-31 18:06 ` [PATCH 35] fs/reiser4/plugin/inode_ops_rename.c: " Mariusz Kozlowski
2007-07-31 18:08 ` [PATCH 36] arch/x86_64/kernel/io_apic.c: " Mariusz Kozlowski
2007-07-31 18:09 ` [PATCH 37] arch/i386/kernel/io_apic.c: kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
2007-07-31 18:13 ` [PATCH 38] drivers/char/ip2/ip2main.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
2007-08-01 16:04 ` Alan Cox
2007-07-31 18:16 ` [PATCH 39] net/ipv4/ip_options.c: " Mariusz Kozlowski
2007-07-31 21:07 ` David Miller
2007-07-31 21:15 ` Mariusz Kozlowski
2007-07-31 18:18 ` [PATCH 40] drivers/atm/iphase.c: mostly " Mariusz Kozlowski
2007-07-31 21:08 ` David Miller
2007-07-31 18:20 ` [PATCH 41] drivers/net/irda/irda-usb.c: mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
2007-07-31 21:09 ` David Miller
2007-07-31 21:17 ` Mariusz Kozlowski
2007-07-31 18:22 ` [PATCH 42] fs/jbd2/journal.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
2007-07-31 18:24 ` [PATCH 43] fs/reiser4/ktxnmgrd.c: " Mariusz Kozlowski
2007-07-31 18:25 ` [PATCH 44] drivers/scsi/lpfc/lpfc_debugfs.c: kmalloc + memset conversion to kcalloc Mariusz Kozlowski
2007-08-03 15:42 ` James Smart
2007-07-31 18:26 ` [PATCH 45] drivers/scsi/lpfc/lpfc_init.c: " Mariusz Kozlowski
2007-08-03 15:41 ` James Smart
2007-07-31 18:27 ` [PATCH 46] drivers/scsi/lpfc/lpfc_scsi.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
2007-08-03 15:41 ` James Smart
2007-08-05 10:00 ` [PATCH] lpfc : lpfc_debugfs.c " James Smart
2007-07-31 18:34 ` [PATCH 47] drivers/scsi/megaraid.c: " Mariusz Kozlowski
2007-07-31 18:35 ` [PATCH 24] include/asm-frv/thread_info.h: " David Howells
2007-07-31 18:48 ` [PATCH 48] include/asm-mips/thread_info.h: " Mariusz Kozlowski
2007-07-31 18:53 ` Ralf Baechle
2007-07-31 18:50 ` [PATCH 49] drivers/mmc/core/mmc_ops.c: " Mariusz Kozlowski
2007-08-04 13:02 ` Pierre Ossman
2007-07-31 18:54 ` [PATCH 50] drivers/message/fusion/mptctl.c: mostly " Mariusz Kozlowski
2007-07-31 19:14 ` [PATCH 51] drivers/media/video/msp3400-driver.c: " Mariusz Kozlowski
2007-07-31 19:18 ` [PATCH 52] include/asm-m32r/thread_info.h: " Mariusz Kozlowski
2007-08-01 5:12 ` Hirokazu Takata
2007-07-31 21:22 ` [PATCH 53] Documentation/DocBook/mtdnand.tmpl: " Mariusz Kozlowski
2007-07-31 21:23 ` [PATCH 54] drivers/scsi/mvme16x_scsi.c: " Mariusz Kozlowski
2007-07-31 21:27 ` [PATCH 55] drivers/char/n_hdlc.c: " Mariusz Kozlowski
2007-08-01 0:16 ` Alan Cox
2007-08-08 6:02 ` Mariusz Kozlowski
2007-08-08 21:40 ` Krzysztof Halasa
2007-08-08 22:57 ` Paul Fulghum
2007-07-31 21:29 ` [PATCH 56] drivers/scsi/NCR_D700.c: " Mariusz Kozlowski
2007-07-31 21:31 ` [PATCH 57] net/netfilter/nf_conntrack_expect.c: " Mariusz Kozlowski
2007-08-02 4:52 ` David Miller
2007-07-31 21:32 ` [PATCH 58] net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c: " Mariusz Kozlowski
2007-08-02 4:53 ` David Miller
2007-07-31 21:33 ` [PATCH 59] drivers/video/offb.c: " Mariusz Kozlowski
2007-07-31 21:34 ` [PATCH 60] drivers/net/wireless/prism54/oid_mgt.c: " Mariusz Kozlowski
2007-08-01 1:12 ` Luis R. Rodriguez
2007-07-31 21:37 ` [PATCH 61] drivers/scsi/osst.c: " Mariusz Kozlowski
2007-07-31 21:41 ` [PATCH 62] include/asm-avr32/pgalloc.h: kmalloc + memset conversion to kcalloc Mariusz Kozlowski
2007-08-03 11:42 ` Haavard Skinnemoen
2007-07-31 21:46 ` [PATCH 63] drivers/scsi/pluto.c: mostly " Mariusz Kozlowski
2007-07-31 21:49 ` [PATCH 65] drivers/mtd/maps/pmcmsp-flash.c: kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
2007-07-31 21:51 ` [PATCH 64] drivers/scsi/qla2xxx/qla_init.c: mostly " Mariusz Kozlowski
2007-07-31 22:00 ` Andrew Vasquez
2007-07-31 21:54 ` [PATCH 66] net/ipv4/raw.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
2007-08-02 4:54 ` David Miller
2007-07-31 21:55 ` [PATCH 67] net/ipv4/route.c: mostly kmalloc + memset conversion to k[cz]alloc Mariusz Kozlowski
2007-08-02 4:54 ` David Miller
2007-07-31 21:56 ` [PATCH 68] drivers/net/s2io.c: " Mariusz Kozlowski
2007-08-07 21:57 ` Jeff Garzik
2007-08-08 16:16 ` Ramkrishna Vepa
2007-08-08 16:33 ` Jeff Garzik
2007-07-31 21:58 ` [PATCH 69] drivers/net/sb1250-mac.c: kmalloc + memset conversion to kcalloc Mariusz Kozlowski
2007-08-07 21:57 ` Jeff Garzik
2007-07-31 22:02 ` [PATCH 70] drivers/mtd/ubi/scan.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
2007-07-31 22:03 ` [PATCH 71] kernel/sched.c: kmalloc + memset conversion to kcalloc Mariusz Kozlowski
2007-07-31 22:05 ` [PATCH 72] drivers/mmc/core/sdio_bus.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
2007-08-04 13:03 ` Pierre Ossman
2007-08-04 16:47 ` Andrew Morton
2007-07-31 22:07 ` [PATCH 73] drivers/parport/share.c: " Mariusz Kozlowski
2007-07-31 22:08 ` [PATCH 74] include/linux/textsearch.h: " Mariusz Kozlowski
2007-07-31 22:10 ` [PATCH 75] drivers/macintosh/therm_adt746x.c: " Mariusz Kozlowski
2007-07-31 22:11 ` [PATCH 76] drivers/net/via-velocity.c: mostly kmalloc + memset conversion to kcalloc Mariusz Kozlowski
2007-07-31 22:32 ` Francois Romieu
2007-08-07 21:57 ` Jeff Garzik
2007-07-31 22:13 ` [PATCH 77] sound/oss/via82cxxx_audio.c: kmalloc + memset conversion to kzalloc Mariusz Kozlowski
2007-07-31 22:14 ` [PATCH 78] fs/proc/vmcore.c: " Mariusz Kozlowski
2007-07-31 22:16 ` [PATCH 79] arch/i386/mach-voyager/voyager_cat.c: " Mariusz Kozlowski
2007-07-31 22:18 ` [PATCH 80] fs/ext4/xattr.c: " Mariusz Kozlowski
2007-07-31 22:19 ` [PATCH 81] drivers/net/wireless/zd1201.c: " Mariusz Kozlowski
2007-07-31 22:21 ` [PATCH 82] drivers/scsi/zorro7xx.c: " Mariusz Kozlowski
2007-08-01 16:11 ` James Bottomley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).