Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757500AbZCFTSz (ORCPT ); Fri, 6 Mar 2009 14:18:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755248AbZCFTSq (ORCPT ); Fri, 6 Mar 2009 14:18:46 -0500 Received: from fg-out-1718.google.com ([72.14.220.153]:5966 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754627AbZCFTSp (ORCPT ); Fri, 6 Mar 2009 14:18:45 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=ken2GbXtgfAp7mboAeUhydGd/72PGZ722XWnXVfpTCuHVlxGzEFXNyfXI43AviHZ8+ lPM0A8Iqs9rzbUIAK9zBn9D+UIqiRdXv53OlF/GYOp5tnwVHakck6ovK0+Rt2RauNR2K EtWLwphgwed/AFhgm4T+56MY4YJxbzLw6qhbY= Date: Fri, 6 Mar 2009 20:18:41 +0100 From: Frederic Weisbecker To: Cyrill Gorcunov Cc: Joerg Roedel , mingo@redhat.com, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org Subject: Re: [PATCH 03/18] dma-debug: add hash functions for dma_debug_entries Message-ID: <20090306191840.GF7329@nowhere> References: <1236346229-6618-1-git-send-email-joerg.roedel@amd.com> <1236346229-6618-4-git-send-email-joerg.roedel@amd.com> <20090306135052.GE5988@nowhere> <20090306184514.GE7420@localhost> <20090306191059.GE7329@nowhere> <20090306191641.GF7420@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090306191641.GF7420@localhost> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1823 Lines: 55 On Fri, Mar 06, 2009 at 10:16:41PM +0300, Cyrill Gorcunov wrote: > [Frederic Weisbecker - Fri, Mar 06, 2009 at 08:11:00PM +0100] > | On Fri, Mar 06, 2009 at 09:45:14PM +0300, Cyrill Gorcunov wrote: > | > [Frederic Weisbecker - Fri, Mar 06, 2009 at 02:50:52PM +0100] > | > ... > | > | > +/* > | > | > + * Add an entry to a hash bucket > | > | > + */ > | > | > +static void hash_bucket_add(struct hash_bucket *bucket, > | > | > + struct dma_debug_entry *entry) > | > | > +{ > | > | > + list_add_tail(&entry->list, &bucket->list); > | > | > +} > | > | > + > | > | > +/* > | > | > + * Remove entry from a hash bucket list > | > | > + */ > | > | > +static void hash_bucket_del(struct dma_debug_entry *entry) > | > | > +{ > | > | > + list_del(&entry->list); > | > | > +} > | > | > | > | > | > | Perhaps the two wrappers above are unnecessary, since they are actually > | > | used once and only wrap a single list operation. No? > | > | > | > | Frederic. > | > > | > Hi Frederic, > | > > | > I think it would be better to make them 'inline' only but remain > | > the wrappers as is, since it show logic flow and hides internal data > | > details. But it's my personal opinion. > | > | > | Yeah, I guess it's only a matter of taste :-) > | Anyway, as you said, it should be inlined. > > Nod :) The only problem could be (it depends) -- is that > if one day some locking would be needed instead of fixing > one function you would need to grep all list_add/del entries :) Yes, although the locking is already here but I understand your point. > | > | > - Cyrill - -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/