Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755320AbXJ0VWu (ORCPT ); Sat, 27 Oct 2007 17:22:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751247AbXJ0VWm (ORCPT ); Sat, 27 Oct 2007 17:22:42 -0400 Received: from scrub.xs4all.nl ([194.109.195.176]:3013 "EHLO scrub.xs4all.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750732AbXJ0VWl (ORCPT ); Sat, 27 Oct 2007 17:22:41 -0400 Date: Sat, 27 Oct 2007 23:22:31 +0200 (CEST) From: Roman Zippel X-X-Sender: roman@scrub.home To: Alexey Dobriyan cc: torvalds@osdl.org, akpm@osdl.org, viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [PATCH 1/2] irq_flags_t: intro and core annotations In-Reply-To: <20071027201429.GE9816@martell.zuzino.mipt.ru> Message-ID: References: <20071020235546.GB1825@martell.zuzino.mipt.ru> <20071027201429.GE9816@martell.zuzino.mipt.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 825 Lines: 25 Hi, On Sun, 28 Oct 2007, Alexey Dobriyan wrote: > > If it's just about the type checking, something like below should pretty > > much do the same. > > It won't catch, the following if both variables are unsigned long: > > spin_lock_irqsave(&lock, flags); > [stuff] > spin_unlock_irqrestore(&lock, foo->flags); > > It won't catch "static unsigned long flags;". With sparse, we can > eventually mark type as "on-stack only". It should be on the stack, but we have cases where a pointer to it is used (e.g. lock_timer_base). How do you want to deal with this? bye, Roman - 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/