Skip to content

Commit 0162a70

Browse files
christian-heuselrichardweinberger
authored andcommitted
jffs2: print symbolic error name instead of error code
Utilize the %pe print specifier to get the symbolic error name as a string (i.e "-ENOMEM") in the log message instead of the error code to increase its readablility. This change was suggested in https://lore.kernel.org/all/[email protected]/ Signed-off-by: Christian Heusel <[email protected]> Reviewed-by: Zhihao Cheng <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent e67572c commit 0162a70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/jffs2/background.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ int jffs2_start_garbage_collect_thread(struct jffs2_sb_info *c)
4444

4545
tsk = kthread_run(jffs2_garbage_collect_thread, c, "jffs2_gcd_mtd%d", c->mtd->index);
4646
if (IS_ERR(tsk)) {
47-
pr_warn("fork failed for JFFS2 garbage collect thread: %ld\n",
48-
-PTR_ERR(tsk));
47+
pr_warn("fork failed for JFFS2 garbage collect thread: %pe\n",
48+
tsk);
4949
complete(&c->gc_thread_exit);
5050
ret = PTR_ERR(tsk);
5151
} else {

0 commit comments

Comments
 (0)