]> git.baikalelectronics.ru Git - kernel.git/commit
percpu_counter: change return value and add comments
authorShaohua Li <shaohua.li@intel.com>
Wed, 25 May 2011 00:13:35 +0000 (17:13 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 25 May 2011 15:39:54 +0000 (08:39 -0700)
commit6fbed46a8510e4ce65711c82cb12ba8eb36925b2
tree9287d1dcfd313193b944f3dc49a6519a40a7ee4f
parent091c82fec2e3e2996e30dee163f3e102a6cbd6b4
percpu_counter: change return value and add comments

The percpu_counter_*_positive() API in UP case doesn't check if return
value is positive.  Add comments to explain why we don't.  Also if count <
0, returns 0 instead of 1 for *read_positive().

[akpm@linux-foundation.org: tweak comment]
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/percpu_counter.h