lkml.org 
[lkml]   [2008]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: powerpc: hv{cs,si}_close() both unsigned hp->count and hvcsd->open_count cannot be negative
Andreas Schwab wrote:
> roel kluin <roel.kluin@gmail.com> 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


\
 
 \ /
  Last update: 2008-11-29 14:29    [W:0.058 / U:1.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site