From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by ozlabs.org (Postfix) with ESMTP id 95FA6DDDED for ; Sun, 30 Nov 2008 00:27:23 +1100 (EST) Received: by ug-out-1314.google.com with SMTP id 17so2211368ugm.14 for ; Sat, 29 Nov 2008 05:27:21 -0800 (PST) Message-ID: <49314334.6060609@gmail.com> Date: Sat, 29 Nov 2008 08:27:16 -0500 From: roel kluin MIME-Version: 1.0 To: Andreas Schwab Subject: Re: powerpc: hv{cs, si}_close() both unsigned hp->count and hvcsd->open_count cannot be negative References: <4931201D.7060701@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Cc: linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Andreas Schwab wrote: > roel kluin writes: > >> - if (--hvcsd->open_count == 0) { >> + if (hvcsd->open_count == 1) { >> + hvcsd->open_count--; > > This is not the same. I think you're missing that I also decrement if (hvcsd->open_count > 1) If not, please elaborate. > >> - if (--hp->count == 0) { >> + if (hp->count == 1) { >> + hp->count--; > > Likewise. Same here. Roel