Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757594Ab3IAPty (ORCPT ); Sun, 1 Sep 2013 11:49:54 -0400 Received: from mail-vc0-f179.google.com ([209.85.220.179]:45165 "EHLO mail-vc0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755836Ab3IAPtw (ORCPT ); Sun, 1 Sep 2013 11:49:52 -0400 MIME-Version: 1.0 In-Reply-To: <20130901111008.GA28812@thunk.org> References: <20130901085049.21748.qmail@science.horizon.com> <20130901111008.GA28812@thunk.org> Date: Sun, 1 Sep 2013 08:49:48 -0700 X-Google-Sender-Auth: WOGJZgD6C_RmrXkZk7zMO9yG88U Message-ID: Subject: Re: [PATCH v7 1/4] spinlock: A new lockref structure for lockless update of refcount From: Linus Torvalds To: "Theodore Ts'o" , George Spelvin , linux-fsdevel , Linux Kernel Mailing List , Al Viro , Waiman Long , Steven Rostedt , Frederic Weisbecker Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1370 Lines: 27 On Sun, Sep 1, 2013 at 4:10 AM, Theodore Ts'o wrote: > Speaking of bool (and I'm not a fan of it either), is this warning > just noise (which is bad enough since it masks real warnings), or is > this going to cause serious problems? > > CHECK /usr/projects/linux/ext4/kernel/trace/trace.c > /usr/projects/linux/ext4/kernel/trace/trace.c:559:6: warning: symbol 'free_snapshot' was not declared. Should it be static? > /usr/projects/linux/ext4/kernel/trace/trace.c:1489:14: warning: expression using sizeof bool It's just because sparse is being a bit odd. Internally, sparse thinks that "bool" has a size of one bit. So it then the sizeof code has a special case to make it one byte, and when that special case was added, people added the warning too. I suspect we sparse should just make the size of "bool" be 8 bits internally, and we should drop the warning. As it is, sparse will actually do odd and wrong things due to the "bool is one bit" if you put "bool" types in structures or unions, I think. Nobody used to care, because we used to not use that broken type in the kernel. Linus -- 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/