Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932530AbdDEPTU (ORCPT ); Wed, 5 Apr 2017 11:19:20 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:26631 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753317AbdDEPSK (ORCPT ); Wed, 5 Apr 2017 11:18:10 -0400 Date: Wed, 5 Apr 2017 18:17:48 +0300 From: Yuval Shaia To: Johannes Thumshirn Cc: SF Markus Elfring , 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: <20170405151747.GB5519@yuval-lap> References: <5e5e00d3-b6a4-7371-65be-c5fe387d26b3@users.sourceforge.net> <20170405143438.GC5006@yuval-lap> <20170405150658.GU3941@linux-x5ow.site> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170405150658.GU3941@linux-x5ow.site> User-Agent: Mutt/1.5.24 (2015-08-30) X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1174 Lines: 31 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