From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sat, 9 Aug 2014 08:49:57 -0700 From: Greg Kroah-Hartman Subject: Re: [PATCH 1/3] fpga manager framework core Message-ID: <20140809154957.GD22689@kroah.com> References: <1406932118-13885-1-git-send-email-atull@opensource.altera.com> <1406932118-13885-2-git-send-email-atull@opensource.altera.com> <20140802001848.GB11170@amd.pavel.ucw.cz> <20140809145024.GA6764@pollux.denx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140809145024.GA6764@pollux.denx.de> To: Pavel Machek Cc: Alan Tull , atull@opensource.altera.com, Jason Gunthorpe , "H. Peter Anvin" , Michal Simek , Michal Simek , linux-kernel , "devicetree@vger.kernel.org" , Pantelis Antoniou , Rob Herring , Grant Likely , Mark Brown , Philip Balister , Alessandro Rubini , Steffen Trumtrar , Jason Cooper , Kyle Teske , Nicolas Pitre , Felipe Balbi , Mauro Carvalho Chehab , David Brown , Rob Landley , "David S. Miller" , Cesar Eduardo Barros , Samuel Ortiz , Andrew Morton , Linus Walleij , dinguyen@opensource.altera.com, yvanderv@opensource.altera.com List-ID: On Sat, Aug 09, 2014 at 04:50:24PM +0200, Pavel Machek wrote: > On Tue 2014-08-05 15:05:40, Alan Tull wrote: > > On Fri, Aug 1, 2014 at 7:18 PM, Pavel Machek wrote: > > > Hi! > > > > > >> + nr = ida_simple_get(&fpga_mgr_ida, start, FPGA_MAX_MINORS, GFP_KERNEL); > > >> + > > > > > > Actually, are you sure ida framework is a good idea here? AFAICT, you > > > only use it to keep track of used minors. > > > pavel > > > > > > > Yes, the ida is to keep track of minors. I think that was the intent > > of introducing ida into the kernel (looking at git logs of idr.c). > > SImilar to idr, but uses less memory. I see some other frameworks > > using it for this purpose, such as the rtc class. I can change this > > if this is something the kernel wants to move away from. What issues > > are you seeing here and what would you suggest? > > Well, it looked to me like a job for bitfield, since we don't plan that many > minors... Use ida, it's simple, works correctly, and I don't have to audit crazy special-case bitfield manipulation that odds are, is wrong in some odd corner condition. greg k-h