[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151214174123.GB22987@osadl.at>
Date: Mon, 14 Dec 2015 17:41:23 +0000
From: Nicholas Mc Guire <der.herr@...r.at>
To: "Marciniszyn, Mike" <mike.marciniszyn@...el.com>
Cc: Nicholas Mc Guire <hofrat@...dl.org>,
Doug Ledford <dledford@...hat.com>,
"Hefty, Sean" <sean.hefty@...el.com>,
Hal Rosenstock <hal.rosenstock@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] staging/rdma/hfi1: consolidate kmalloc_array+memset
into kcalloc
On Mon, Dec 14, 2015 at 03:28:46PM +0000, Marciniszyn, Mike wrote:
> > --- a/drivers/staging/rdma/hfi1/chip.c
> > +++ b/drivers/staging/rdma/hfi1/chip.c
> > @@ -10128,8 +10128,7 @@ static void init_qos(struct hfi1_devdata *dd,
> > u32 first_ctxt)
> > goto bail;
> > if (num_vls * qpns_per_vl > dd->chip_rcv_contexts)
> > goto bail;
> > - rsmmap = kmalloc_array(NUM_MAP_REGS, sizeof(u64),
> > GFP_KERNEL);
> > - memset(rsmmap, rxcontext, NUM_MAP_REGS * sizeof(u64));
> > + rsmmap = kcalloc(NUM_MAP_REGS, sizeof(u64), GFP_KERNEL);
> > /* init the local copy of the table */
> > for (i = 0, ctxt = first_ctxt; i < num_vls; i++) {
> > unsigned tctxt;
> > --
>
> I'm NAKing this.
>
> There is a chip specific difference that accounts for the current code.
>
I obviously made a real mess here.
I incorrectly concluded that rxcontext is 0 which it is not in some cases
sorry for the noise.
thx!
hofrat
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists