Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757394Ab0LNVrI (ORCPT ); Tue, 14 Dec 2010 16:47:08 -0500 Received: from www.tglx.de ([62.245.132.106]:44475 "EHLO www.tglx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755821Ab0LNVrG (ORCPT ); Tue, 14 Dec 2010 16:47:06 -0500 Date: Tue, 14 Dec 2010 22:46:46 +0100 (CET) From: Thomas Gleixner To: Jan Kiszka cc: Avi Kivity , Marcelo Tosatti , linux-kernel@vger.kernel.org, kvm , Tom Lyon , Alex Williamson , "Michael S. Tsirkin" , Jan Kiszka Subject: Re: [PATCH v3 2/4] genirq: Inform handler about line sharing state In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 874 Lines: 30 On Mon, 13 Dec 2010, Jan Kiszka wrote: > From: Jan Kiszka > chip_bus_lock(desc); > retval = __setup_irq(irq, desc, action); > chip_bus_sync_unlock(desc); > > - if (retval) > + if (retval) { > + if (desc->action && !desc->action->next) > + desc->irq_data.drv_status &= ~IRQS_SHARED; This is redundant. IRQS_SHARED gets set in a code path where all checks are done already. To make that more obvious we can set it right before raw_spin_unlock_irqrestore(&desc->lock, flags); conditionally on (shared). That way we can also move the kfree out of the mutex locked section. Thanks, tglx -- 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/