From: Keir Fraser Subject: Re: [PATCH] x86/MSI: drop local cpumask_t variable from msi_compose_msg() Date: Fri, 14 Oct 2011 15:55:04 +0100 Message-ID: References: <4E984A69020000780005B67D@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4E984A69020000780005B67D@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 14/10/2011 13:42, "Jan Beulich" wrote: >> I wonder whether the cpus_empty() check should be a BUG_ON. Or an ASSERT >> pushed into cpu_mask_to_apicid. > > An ASSERT may be reasonable, but simply dropping the check here > may be too - no other code path invoking cpu_mask_to_apicid() has > a similar check. It is certainly not valid to call cpu_mask_to_apicid with an empty mask. Hence an ASSERT would check that precondition, and for all callers. -- Keir