Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756252Ab2K1V70 (ORCPT ); Wed, 28 Nov 2012 16:59:26 -0500 Received: from hedwig.cmf.nrl.navy.mil ([134.207.12.162]:36482 "EHLO hedwig.cmf.nrl.navy.mil" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755995Ab2K1V7Y (ORCPT ); Wed, 28 Nov 2012 16:59:24 -0500 Date: Wed, 28 Nov 2012 16:59:06 -0500 From: chas williams - CONTRACTOR To: Krzysztof Mazur Cc: David Woodhouse , davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] atm: introduce vcc_pop() Message-ID: <20121128165906.05ef5e2b@thirdoffive.cmf.nrl.navy.mil> In-Reply-To: <20121128214533.GA25486@shrek.podlesie.net> References: <1350926091-12642-1-git-send-email-krzysiek@podlesie.net> <1350926091-12642-3-git-send-email-krzysiek@podlesie.net> <1354036592.2534.6.camel@shinybook.infradead.org> <20121127173906.GA11390@shrek.podlesie.net> <1354039349.2534.11.camel@shinybook.infradead.org> <20121127182843.GA11597@shrek.podlesie.net> <20121128201837.GA912@shrek.podlesie.net> <20121128162001.3f326720@thirdoffive.cmf.nrl.navy.mil> <20121128214533.GA25486@shrek.podlesie.net> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1159 Lines: 30 On Wed, 28 Nov 2012 22:45:34 +0100 Krzysztof Mazur wrote: > On Wed, Nov 28, 2012 at 04:20:01PM -0500, chas williams - CONTRACTOR wrote: > > i dont like the vcc->pop() implementation and at one point i had the > > crazy idea of using skb->destructors to handle it. however, i think it > > would be necessary to clone the skb's so any existing destructor is > > preserved. > > With this patch we will kill vcc->pop() in drivers and in future > we can do that without changes in drivers. ok > > > > > +#define vcc_pop(vcc, skb) vcc_pop_any(vcc, skb) > > > +#define vcc_pop_irq(vcc, skb) vcc_pop_any(vcc, skb) > > > > don't define these if you dont plan on using them anway. > > I removed them. I also added check if vcc is NULL, as David Woodhouse > suggested, some drivers use that. it should probably be if (likely(vcc) && likely(vcc->pop)) since it will almost always be the case. -- 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/