summaryrefslogtreecommitdiffstats
path: root/lib/refcount.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/refcount.c')
-rw-r--r--lib/refcount.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/refcount.c b/lib/refcount.c
index 48b78a423d7d..719b0bc42ab1 100644
--- a/lib/refcount.c
+++ b/lib/refcount.c
@@ -61,7 +61,7 @@
*
* Return: false if the passed refcount is 0, true otherwise
*/
-bool refcount_add_not_zero_checked(unsigned int i, refcount_t *r)
+bool refcount_add_not_zero_checked(int i, refcount_t *r)
{
unsigned int new, val = atomic_read(&r->refs);
@@ -101,7 +101,7 @@ EXPORT_SYMBOL(refcount_add_not_zero_checked);
* cases, refcount_inc(), or one of its variants, should instead be used to
* increment a reference count.
*/
-void refcount_add_checked(unsigned int i, refcount_t *r)
+void refcount_add_checked(int i, refcount_t *r)
{
WARN_ONCE(!refcount_add_not_zero_checked(i, r), "refcount_t: addition on 0; use-after-free.\n");
}
@@ -180,7 +180,7 @@ EXPORT_SYMBOL(refcount_inc_checked);
*
* Return: true if the resulting refcount is 0, false otherwise
*/
-bool refcount_sub_and_test_checked(unsigned int i, refcount_t *r)
+bool refcount_sub_and_test_checked(int i, refcount_t *r)
{
unsigned int new, val = atomic_read(&r->refs);