Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932820AbdDEPIG (ORCPT ); Wed, 5 Apr 2017 11:08:06 -0400 Received: from mx2.suse.de ([195.135.220.15]:51233 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932679AbdDEPHL (ORCPT ); Wed, 5 Apr 2017 11:07:11 -0400 Date: Wed, 5 Apr 2017 17:06:58 +0200 From: Johannes Thumshirn To: SF Markus Elfring Cc: Yuval Shaia , linux-rdma@vger.kernel.org, Doug Ledford , Hal Rosenstock , Mike Marciniszyn , Sean Hefty , LKML , kernel-janitors@vger.kernel.org Subject: Re: [PATCH 1/5] IB/qib: Use kcalloc() in qib_init_iba7322_funcs() Message-ID: <20170405150658.GU3941@linux-x5ow.site> References: <5e5e00d3-b6a4-7371-65be-c5fe387d26b3@users.sourceforge.net> <20170405143438.GC5006@yuval-lap> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1021 Lines: 26 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? -- 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