lkml.org 
[lkml]   [2017]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/5] IB/qib: Use kcalloc() in qib_init_iba7322_funcs()
On Wed, Apr 05, 2017 at 05:06:58PM +0200, Johannes Thumshirn wrote:
> On Wed, Apr 05, 2017 at 04:54:40PM +0200, SF Markus Elfring wrote:
> > >> @@ -7324,8 +7324,9 @@ struct qib_devdata *qib_init_iba7322_funcs(struct pci_dev *pdev,
> > >> actual_cnt -= dd->num_pports;
> > >>
> > >> tabsize = actual_cnt;
> > >> - dd->cspec->msix_entries = kzalloc(tabsize *
> > >> - sizeof(struct qib_msix_entry), GFP_KERNEL);
> > >> + dd->cspec->msix_entries = kcalloc(tabsize,
> > >> + sizeof(*dd->cspec->msix_entries),
> > >> + GFP_KERNEL);
> > >
> > > Are we fine with loosing the zeroing of the entries?
> >
> > How did you get this concern?
> >
> > Do you really miss such functionality from the other interface?
>
> Ahm... Don't kzalloc() and kcalloc() both pass in __GFP_ZERO?

Yes.
Please ignore my comment.

>
> --
> Johannes Thumshirn Storage
> jthumshirn@suse.de +49 911 74053 689
> SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> GF: Felix Imendörffer, Jane Smithard, Graham Norton
> HRB 21284 (AG Nürnberg)
> Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

\
 
 \ /
  Last update: 2017-04-05 17:24    [W:0.030 / U:3.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site