Re: [PATCH] scsi: remove memset before memcpy

2017-08-29 Thread Himanshu Jha
On Tue, Aug 29, 2017 at 12:29:35PM -0700, Joe Perches wrote: > On Wed, 2017-08-30 at 00:19 +0530, Himanshu Jha wrote: > > drivers/scsi/megaraid/megaraid_sas_fusion.c > > I don't know if you did this with coccinelle. Yes, I did this with coccinelle. > > If so, it would be good to show the tool a

Re: [PATCH] scsi: remove memset before memcpy

2017-08-29 Thread Joe Perches
On Wed, 2017-08-30 at 00:19 +0530, Himanshu Jha wrote: > drivers/scsi/megaraid/megaraid_sas_fusion.c I don't know if you did this with coccinelle. If so, it would be good to show the tool and script in the commit message. If not, the input script is pretty simple. $ cat memset_before_memcpy.coc

[PATCH] scsi: remove memset before memcpy

2017-08-29 Thread Himanshu Jha
calling memcpy immediately after memset with the same region of memory makes memset redundant. Signed-off-by: Himanshu Jha --- drivers/scsi/bfa/bfa_ioc.c | 1 - drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 -- drivers/scsi/qla4xxx/ql4_os.c | 1 - 3 files changed