Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753516Ab2JIUGm (ORCPT ); Tue, 9 Oct 2012 16:06:42 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55135 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751183Ab2JIUGj (ORCPT ); Tue, 9 Oct 2012 16:06:39 -0400 Date: Tue, 9 Oct 2012 13:06:37 -0700 From: Andrew Morton To: Josh Triplett Cc: linux-kernel@vger.kernel.org, linux-sparse@vger.kernel.org, Ed Cashin , Christopher Li , Andi Kleen Subject: Re: [PATCH] linux/compiler.h: Add __must_hold macro for functions called with a lock held Message-Id: <20121009130637.5e61078f.akpm@linux-foundation.org> In-Reply-To: <20121008020610.GA9197@leaf> References: <20121008020610.GA9197@leaf> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 699 Lines: 17 On Sun, 7 Oct 2012 19:06:10 -0700 Josh Triplett wrote: > linux/compiler.h has macros to denote functions that acquire or release > locks, but not to denote functions called with a lock held that return > with the lock still held. Add a __must_hold macro to cover that case. hum. How does this work? Any code examples and sample sparse output? Does it apply to all lock types, etc? IOW, where is all this stuff documented? -- 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/