drivers: block: Remove unnecessary cast
Subsystems (2)
PATCH 1/1 drivers: block: Remove unnecessary cast
This issue was detected using Coccinelle and the following semantic patch:
@@
expression * e;
expression arg1, arg2;
type T;
@@
- e = (T *)
+ e =kmalloc(arg1, arg2);
Signed-off-by Gustavo A. R. Silva <[email protected]>
--- drivers/block/cciss_scsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/block/cciss_scsi.c +1 -2
@@ -647,8 +647,7 @@ cciss_scsi_setup(ctlr_info_t *h)struct cciss_scsi_adapter_data_t * shba; ccissscsi[h->ctlr].ndevices =0 ; - shba = (struct cciss_scsi_adapter_data_t *) -kmalloc (sizeof (*shba),GFP_KERNEL ); + shba =kmalloc (sizeof (*shba),GFP_KERNEL );if (shba ==NULL )return ; shba->scsi_host =NULL ;
Signature · 1 line
2.5.0
Quoted 8 lines · Gustavo A. R. Silva
This issue was detected using Coccinelle and the following semantic patch:
@@
expression * e;
expression arg1, arg2;
type T;
@@
Quoted 8 lines
- e = (T *)
+ e =kmalloc(arg1, arg2);Signed-off-by Gustavo A. R. Silva <[email protected]>--- drivers/block/cciss_scsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Why send this to me?
Quoting Greg KH <[email protected]>:
Quoted 13 lines · Gustavo A. R. Silva
Quoted 12 lines
This issue was detected using Coccinelle and the following semantic patch:
@@
expression * e;
expression arg1, arg2;
type T;
@@- e = (T *)
+ e =kmalloc(arg1, arg2);
Quoted 6 lines
Quoted 4 lines
Signed-off-by Gustavo A. R. Silva <[email protected]>--- drivers/block/cciss_scsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)Why send this to me?
Oops... Sorry... I was also working with the Staging tree, so it seems your e-mail address got in the middle at some point.
--
Gustavo A. R. Silva