ocfs2: fix snprintf format specifier in dlmdebug.c
authoralex chen <alex.chen@huawei.com>
Tue, 10 Feb 2015 22:08:51 +0000 (14:08 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 10 Feb 2015 22:30:29 +0000 (14:30 -0800)
Use snprintf format specifier "%lu" instead of "%ld" for argument of type
'unsigned long'.

Signed-off-by: Alex Chen <alex.chen@huawei.com>
Reviewed-by: Joseph Qi <joseph.qi@huawei.com>
Reviewed-by: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/dlm/dlmdebug.c

index 149eb556b8c6300aabc136033c93953494d0eaf1..825136070d2c118d493902b2bb0d24919cd1003a 100644 (file)
@@ -406,7 +406,7 @@ static int debug_purgelist_print(struct dlm_ctxt *dlm, char *buf, int len)
        }
        spin_unlock(&dlm->spinlock);
 
-       out += snprintf(buf + out, len - out, "Total on list: %ld\n", total);
+       out += snprintf(buf + out, len - out, "Total on list: %lu\n", total);
 
        return out;
 }
@@ -464,7 +464,7 @@ static int debug_mle_print(struct dlm_ctxt *dlm, char *buf, int len)
        spin_unlock(&dlm->master_lock);
 
        out += snprintf(buf + out, len - out,
-                       "Total: %ld, Longest: %ld\n", total, longest);
+                       "Total: %lu, Longest: %lu\n", total, longest);
        return out;
 }