WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] Don't free irqaction for com irq when release ir

To: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Don't free irqaction for com irq when release irq.
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Thu, 03 Sep 2009 17:40:32 +0100
Cc: Xen <xen-devel@xxxxxxxxxxxxxxxxxxx>, Xiantao Zhang <xiantao.zhang@xxxxxxxxx>
Delivery-date: Thu, 03 Sep 2009 09:41:11 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <c5a9d33d-5559-48bc-acc2-1045ddc0fa56@default>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acoss0xq/D5BqCuLT16d+Qcei63HgwAAfRMF
Thread-topic: [Xen-devel] [PATCH] Don't free irqaction for com irq when release irq.
User-agent: Microsoft-Entourage/12.19.0.090515
On 03/09/2009 17:26, "Dan Magenheimer" <dan.magenheimer@xxxxxxxxxx> wrote:

> Oops yes, thanks for pointing that out.  This won't
> be the first or last time I've been fooled by that
> convention.
> 
> For the sake of good programming practices and
> (self-)documentation, since "don't free" is
> a rare exception rather than the rule, may
> I suggest changing the name/sense of the variable
> in the struct to "dont_free", for which zero is
> a reasonable default, and just enabling
> it for the com irqs?

All irqactions which *should* be freed are allocated in exactly one place.
It is therefore sensible to make that the 'exception' which sets a flag to
1. The variou sother users of the setup_irq() interface then do not need to
be changed, as they get a default flag value of zero.

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel