[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20070326184656.GB24841@chrisli.org>
Date: Mon, 26 Mar 2007 11:46:56 -0700
From: Christopher Li <sparse@...isli.org>
To: Russ Cox <rsc@...ch.com>
Cc: linux-kernel@...r.kernel.org, linux-sparse@...r.kernel.org
Subject: Re: [PATCH] Add const to pointer qualifiers for __chk_user_ptr and __chk_io_ptr.
On Mon, Mar 26, 2007 at 02:59:39PM -0400, Russ Cox wrote:
> No, you have it backward.
> It is valid to pass void* to a const void* function.
> It is *not* valid to pass const void* to a void* function.
>
> Right now __chk_user_ptr is a void* function, meaning
> that all the places where it gets passed a const void*
> are technically illegal -- gcc would warn about these, and
> it is a (separate, as you observed) bug that sparse does not.
>
> The patch changes __chk_user_ptr to be a const void*
> function, meaning that it will be legal to pass either void*
> or const void* to it. This is the correct semantics.
Hah, I see. Thanks for the explain.
Ack.
Chris
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists