From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sc8-sf-mx2-b.sourceforge.net ([10.3.1.92] helo=mail.sourceforge.net) by sc8-sf-list1.sourceforge.net with esmtp (Exim 4.30) id 1FMxPV-000753-0y for user-mode-linux-devel@lists.sourceforge.net; Fri, 24 Mar 2006 17:17:45 -0800 Received: from saraswathi.solana.com ([198.99.130.12]) by mail.sourceforge.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.44) id 1FMxPU-0001Ow-6l for user-mode-linux-devel@lists.sourceforge.net; Fri, 24 Mar 2006 17:17:44 -0800 From: Jeff Dike Subject: Re: [uml-devel] Re: [PATCH 12/16] UML - Memory hotplug Message-ID: <20060325011903.GC8117@ccure.user-mode-linux.org> References: <200603241814.k2OIExNn005555@ccure.user-mode-linux.org> <20060324144535.37b3daf7.akpm@osdl.org> <200603250058.57700.blaisorblade@yahoo.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200603250058.57700.blaisorblade@yahoo.it> Sender: user-mode-linux-devel-admin@lists.sourceforge.net Errors-To: user-mode-linux-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Id: The user-mode Linux development list List-Post: List-Help: List-Subscribe: , List-Archive: Date: Fri, 24 Mar 2006 20:19:03 -0500 To: Blaisorblade Cc: user-mode-linux-devel@lists.sourceforge.net, Andrew Morton , linux-kernel@vger.kernel.org On Sat, Mar 25, 2006 at 12:58:57AM +0100, Blaisorblade wrote: > > +int os_drop_memory(void *addr, int length) > > +{ > > + int err; > > + > > + err = madvise(addr, length, MADV_REMOVE); > > + if(err < 0) > > + err = -errno; > > Jeff, did you mean the "return _0_" rather than "return err" below? It's > incoherent with the existance of the "err" local. > > > + return 0; > > +} That's just a brain fart - will fix. Jeff ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751032AbWCYBR5 (ORCPT ); Fri, 24 Mar 2006 20:17:57 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751070AbWCYBR5 (ORCPT ); Fri, 24 Mar 2006 20:17:57 -0500 Received: from saraswathi.solana.com ([198.99.130.12]:43162 "EHLO saraswathi.solana.com") by vger.kernel.org with ESMTP id S1751012AbWCYBR5 (ORCPT ); Fri, 24 Mar 2006 20:17:57 -0500 Date: Fri, 24 Mar 2006 20:19:03 -0500 From: Jeff Dike To: Blaisorblade Cc: user-mode-linux-devel@lists.sourceforge.net, Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [uml-devel] Re: [PATCH 12/16] UML - Memory hotplug Message-ID: <20060325011903.GC8117@ccure.user-mode-linux.org> References: <200603241814.k2OIExNn005555@ccure.user-mode-linux.org> <20060324144535.37b3daf7.akpm@osdl.org> <200603250058.57700.blaisorblade@yahoo.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200603250058.57700.blaisorblade@yahoo.it> User-Agent: Mutt/1.4.2.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 25, 2006 at 12:58:57AM +0100, Blaisorblade wrote: > > +int os_drop_memory(void *addr, int length) > > +{ > > + int err; > > + > > + err = madvise(addr, length, MADV_REMOVE); > > + if(err < 0) > > + err = -errno; > > Jeff, did you mean the "return _0_" rather than "return err" below? It's > incoherent with the existance of the "err" local. > > > + return 0; > > +} That's just a brain fart - will fix. Jeff