Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 27 Aug 2002 20:41:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 27 Aug 2002 20:41:14 -0400 Received: from dsl-213-023-020-028.arcor-ip.net ([213.23.20.28]:15301 "EHLO starship") by vger.kernel.org with ESMTP id ; Tue, 27 Aug 2002 20:41:12 -0400 Content-Type: text/plain; charset=US-ASCII From: Daniel Phillips To: Andrew Morton , Lahti Oy Subject: Re: [PATCH] sched.c Date: Wed, 28 Aug 2002 02:47:24 +0200 X-Mailer: KMail [version 1.3.2] Cc: linux-kernel@vger.kernel.org References: <000b01c24df5$aacc7ed0$d20a5f0a@deldaran> <3D6BC685.216B5B67@zip.com.au> In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Message-Id: Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 671 Lines: 26 On Wednesday 28 August 2002 02:13, Daniel Phillips wrote: > On Tuesday 27 August 2002 20:35, Andrew Morton wrote: > > Lahti Oy wrote: > > > - for (i = 0; i < NR_CPUS; i++) > > > + for (i = NR_CPUS; i; i--) > > > sum += cpu_rq(i)->nr_running; > > > > Off-by-one there. You'd want > > > > for (i = NR_CPUS; --i >= 0; ) > > > > or something similarly foul ;) > > int i = NR_CPUS; > > while (--i) Err, i-- -- Daniel - 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/