Use dma_zalloc_coherent instead of dma_alloc_coherent followed by memset
0.
Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci
Suggested-by: Luis R. Rodriguez <mcg...@kernel.org>
Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com>
---
drivers/scsi/qedi/qedi
Use dma_zalloc_coherent instead of dma_alloc_coherent followed by
memset 0.
Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci
Suggested-by: Luis R. Rodriguez <mcg...@kernel.org>
Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com>
---
drivers/scsi/bnx2fc/bnx2f
Hi Shivashran,
On Thu, Jan 04, 2018 at 04:52:54PM +0530, Shivasharan Srikanteshwara wrote:
> > -Original Message-
> > From: Himanshu Jha [mailto:himanshujha199...@gmail.com]
> > Sent: Saturday, December 30, 2017 9:18 PM
> > To: martin.peter...@oracle.com; j...@l
roing allocator rather than allocator/memset --Applied
But do I also need to send those mentioned above, which didn't receive
any response from you ?
Also, I later sent a patch for fnic after this series which can be
applied after or before this series whichever is suitable to you.
Thanks
Himanshu Jha
Use eth_broadcasr_addr Networking API instead of memset to assign the
broadcast address to the given address array.
0-day tested with no failures.
Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com>
---
drivers/scsi/fnic/fnic_scsi.c | 2 +-
1 file changed, 1 insertion(+), 1 de
Use pci_zalloc_consistent for allocating zeroed
memory and remove unnecessary memset function.
Done using Coccinelle.
Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci
0-day tested with no failures.
Suggested-by: Luis R. Rodriguez <mcg...@kernel.org>
Signed-off-by: Himans
Use dma_zalloc_coherent and vzalloc instead of dma_alloc_coherent and
vmalloc respectively, followed by memset 0.
Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci
Suggested-by: Luis R. Rodriguez <mcg...@kernel.org>
Signed-off-by: Himanshu Jha <himanshujha199...@
Use dma_zalloc_coherent instead of dma_alloc_coherent followed by memset
0.
Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci
Suggested-by: Luis R. Rodriguez <mcg...@kernel.org>
Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com>
---
drivers/scsi/qedi/qedi
Use dma_zalloc_coherent instead of dma_alloc_coherent followed by
memset 0.
Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci
Suggested-by: Luis R. Rodriguez <mcg...@kernel.org>
Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com>
---
drivers/scsi/bnx2i/bnx2
Use vzalloc instead of vmalloc followed by memset 0.
Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci
Suggested-by: Luis R. Rodriguez <mcg...@kernel.org>
Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com>
---
drivers/scsi/fnic/fnic_debugfs.c | 10 ++
Use dma_zalloc_coherent instead of dma_alloc_coherent followed by
memset 0.
Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci
Suggested-by: Luis R. Rodriguez <mcg...@kernel.org>
Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com>
---
drivers/scsi/bnx2fc/bnx2f
Use dma_zalloc_coherent instead of dma_alloc_coherent followed by
memset 0.
Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci
Suggested-by: Luis R. Rodriguez <mcg...@kernel.org>
Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com>
---
drivers/scsi/mvsas/mv
Use dma_zalloc_coherent instead of dma_alloc_coherent followed by
memset 0.
Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci
Suggested-by: Luis R. Rodriguez <mcg...@kernel.org>
Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com>
---
drivers/scsi/dp
Use vzalloc instead of vmalloc followed by memset 0.
Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci
Suggested-by: Luis R. Rodriguez <mcg...@kernel.org>
Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com>
---
drivers/scsi/bfa/bfad.c | 3 +--
driv
Use dma_zalloc_coherent instead of dma_alloc_coherent followed by memset
0.
Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci
Suggested-by: Luis R. Rodriguez <mcg...@kernel.org>
Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com>
---
drivers/scsi/qla4xxx/ql4
failures.
Done using Coccinelle.
Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci
Link: https://lkml.org/lkml/2017/12/26/205
Himanshu Jha (9):
scsi: qla4xxx: Use zeroing allocator rather than allocator/memset
scsi: qla2xxx: Use zeroing allocator rather than allocator/memset
scsi
On Tue, Nov 07, 2017 at 08:51:36PM +0100, Luis R. Rodriguez wrote:
> On Sun, Nov 05, 2017 at 03:26:26AM +0530, Himanshu Jha wrote:
> > Use vzalloc instead of vmalloc/memset to allocate memory filled with 0
> > value.
> >
> > Done using Coccinel
Kfree on NULL pointer is a no-op and therefore checking is redundant.
Done using Coccinelle.
Semantic patch used :
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
Signed-off-by: Himanshu Jha
Use vzalloc instead of vmalloc/memset to allocate memory filled with 0
value.
Done using Coccinelle.
Semantic patch used :
@@
expression x,a;
statement S;
@@
- x = vmalloc(a);
+ x = vzalloc(a);
if (x == NULL || ...) S
- memset(x, 0, a);
Signed-off-by: Himanshu Jha <himanshujha
On Fri, Nov 03, 2017 at 11:25:05AM -0400, Martin K. Petersen wrote:
Hi Martin,
>
> Himanshu,
>
> > Just a reminder, is my patch in our queue ?
>
> It is not. It needs a review/ack from the driver maintainers.
What about Kyle Fortin's review ?
> --
> Martin K. PetersenOracle Linux
On Wed, Oct 11, 2017 at 09:06:14PM +0530, Himanshu Jha wrote:
Hi James,
Just a reminder, is my patch in our queue ?
Thanks
Himanshu Jha
> Use kasprintf instead of combination of kmalloc and sprintf.
> Also, remove BEISCSI_MSI_NAME macro used to specify size of string as
> kasprint
Use kasprintf instead of combination of kmalloc and sprintf.
Also, remove BEISCSI_MSI_NAME macro used to specify size of string as
kasprintf handles size computations.
Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com>
---
v2:
-remove the unnecessary macro BEISCSI_MSI_NAME.
d
On Tue, Oct 10, 2017 at 05:54:15PM -0400, Kyle Fortin wrote:
> Hi Himanshu,
>
> On Oct 6, 2017, at 2:57 PM, Himanshu Jha <himanshujha199...@gmail.com> wrote:
> >
> > Use kasprintf instead of combination of kmalloc and sprintf.
> >
> > Signed-off-by: Hi
Use kasprintf instead of combination of kmalloc and sprintf.
Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com>
---
drivers/scsi/be2iscsi/be_main.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be
-off-by: Himanshu Jha <himanshujha199...@gmail.com>
---
drivers/scsi/esas2r/esas2r_main.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/scsi/esas2r/esas2r_main.c
b/drivers/scsi/esas2r/esas2r_main.c
index 81f226b..1866ba0 100644
--- a/drivers/scsi/
, e2);
Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com>
---
drivers/scsi/qla2xxx/qla_init.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index b5b48dd..54c1d63 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/d
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
calling memcpy immediately after memset with the same region of memory
makes memset redundant.
Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com>
---
drivers/scsi/bfa/bfa_ioc.c | 1 -
drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 --
drivers/scsi/qla4xxx/ql
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com>
---
drivers/scsi/qla2xxx/tcm_qla2xxx.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
b/drivers/scsi/q
29 matches
Mail list logo