Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752801AbZK3U1X (ORCPT ); Mon, 30 Nov 2009 15:27:23 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752458AbZK3U1X (ORCPT ); Mon, 30 Nov 2009 15:27:23 -0500 Received: from metis.ext.pengutronix.de ([92.198.50.35]:35275 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752446AbZK3U1W (ORCPT ); Mon, 30 Nov 2009 15:27:22 -0500 Date: Mon, 30 Nov 2009 21:27:18 +0100 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: David Brownell Cc: linux-kernel@vger.kernel.org, David Brownell , Andrew Morton , Peter Zijlstra , Ingo Molnar , Nicolas Pitre , Eric Miao , John Stultz , Rusty Russell , Remy Bohmer , Hugh Dickins , Andrea Gallo , Thomas Gleixner , Jamie Lokier , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] genirq: warn about IRQF_SHARED|IRQF_DISABLED at the right place Message-ID: <20091130202718.GC19172@pengutronix.de> References: <1259356206-14843-1-git-send-email-u.kleine-koenig@pengutronix.de> <1259578067-29169-1-git-send-email-u.kleine-koenig@pengutronix.de> <200911301221.30601.david-b@pacbell.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <200911301221.30601.david-b@pacbell.net> User-Agent: Mutt/1.5.18 (2008-05-17) X-SA-Exim-Connect-IP: 2001:6f8:1178:2:215:17ff:fe12:23b0 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1378 Lines: 40 On Mon, Nov 30, 2009 at 12:21:30PM -0800, David Brownell wrote: > On Monday 30 November 2009, Uwe Kleine-K?nig wrote: > > +???????????????if (new->flags & IRQF_DISABLED) > > +???????????????????????pr_warning("IRQ %d/%s: IRQF_DISABLED is not guaranteed " > > +???????????????????????????????????????"on shared IRQs\n", irq, new->name); > > This should have copied the original test ... this way, > it's dropping the SHARED constraint, and trying to morph > into a generic "IRQF_DISABLED is eeebil!" test. No, it doesn't. The inserted code is in an if block: old_ptr = &desc->action; old = *old_ptr; if (old) { /* ... */ if (!((old->flags & new->flags) & IRQF_SHARED) || ((old->flags ^ new->flags) & IRQF_TRIGGER_MASK)) { old_name = old->name; goto mismatch; } ... + if (new->flags & IRQF_DISABLED) + pr_warning("..."); and the mismatch label is further below. So the warning is still only hit if a shared irq is registered. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ | -- 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/