From: "Jan Beulich" Subject: Re: [PATCH] do_callback_op()'s second argument can be const Date: Fri, 18 Jan 2008 15:05:47 +0000 Message-ID: <4790CE5B.76E4.0078.0@novell.com> References: <4790C784.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >>> Keir Fraser 18.01.08 16:00 >>> >This patch doesn't seem very useful since the guest can trivially cast = its >way out of the const-ness. Casts should be avoided if possible, especially in C (in C++ you could indeed just cast away the constness without affecting the underlying type). The hypervisor side of this change is to guarantee the constness to the guest side is (to be, in a few seconds) promised by changes to the hypercall wrappers. >I certainly don't see how the chunk below fixes >anything -- doesn't it take two lines to state what took one line before? It fixes the build in the context of the other changes. Jan