linux/drivers/s390
Julia Lawall 777a551009 [S390] drivers/s390/char: Use kstrdup
Use kstrdup when the goal of an allocation is copy a string into the
allocated region.  Additionally drop the now unused variable len.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to;
expression flag,E1,E2;
statement S;
@@

-  to = kmalloc(strlen(from) + 1,flag);
+  to = kstrdup(from, flag);
   ... when != \(from = E1 \| to = E1 \)
   if (to==NULL || ...) S
   ... when != \(from = E2 \| to = E2 \)
-  strcpy(to, from);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-05-17 10:00:18 +02:00
..
block [S390] dasd: remove uid from devmap 2010-05-17 10:00:16 +02:00
char [S390] drivers/s390/char: Use kstrdup 2010-05-17 10:00:18 +02:00
cio [S390] qdio: remove API wrappers 2010-05-17 10:00:17 +02:00
crypto [S390] avoid default_llseek in s390 drivers 2010-05-17 10:00:16 +02:00
kvm include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
net [S390] qdio: remove API wrappers 2010-05-17 10:00:17 +02:00
scsi [S390] avoid default_llseek in s390 drivers 2010-05-17 10:00:16 +02:00
Makefile [S390] split/move machine check handler code 2009-03-26 15:24:10 +01:00