lkml.org 
[lkml]   [2022]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/6] scsi: lpfc: use kzalloc
On Sat, Mar 12, 2022 at 01:45:01PM -0800, Joe Perches wrote:
> On Sat, 2022-03-12 at 11:27 +0100, Julia Lawall wrote:
> > Use kzalloc instead of kmalloc + memset.
> []
> > diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
> []
> > @@ -6272,10 +6272,8 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
> > phba->hba_debugfs_root,
> > phba, &lpfc_debugfs_op_slow_ring_trc);
> > if (!phba->slow_ring_trc) {
> > - phba->slow_ring_trc = kmalloc(
> > - (sizeof(struct lpfc_debugfs_trc) *
> > - lpfc_debugfs_max_slow_ring_trc),
> > - GFP_KERNEL);
> > + phba->slow_ring_trc = kzalloc((sizeof(struct lpfc_debugfs_trc) * lpfc_debugfs_max_slow_ring_trc),
> > + GFP_KERNEL);
>
> kcalloc
>

Did someone have a Coccinelle script that converted kzalloc() to
kcalloc()?

regards,
dan carpenter

\
 
 \ /
  Last update: 2022-03-14 12:40    [W:0.132 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site