Message ID | 20240211003907.167891-1-christian@heusel.eu |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-60624-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp1714258dyd; Sat, 10 Feb 2024 16:40:48 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWGeuHfQpCDTY459SqYdrGS71q1jyt3e9nfokdTEnoD5vhH2NLe8yzaZmneYb/dW9cN80+eIeEtC+NIbVrbzG4vSFZipQ== X-Google-Smtp-Source: AGHT+IELwdBz0V2Y0k3ExUET/rlKsPWBoWoUAdk+Y4Uh+hJYvUwNeVPVoHMjbjBLDy5AK2W5lwHl X-Received: by 2002:a05:620a:666:b0:784:3a5:1c58 with SMTP id a6-20020a05620a066600b0078403a51c58mr3518046qkh.37.1707612048170; Sat, 10 Feb 2024 16:40:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707612048; cv=pass; d=google.com; s=arc-20160816; b=oBatmYJn20P0ZzuZiMcKtfdc9zC3oUi/NIoM7rbiCtoRRdjDIwG7QrQwNm0swBYRC/ v340c/4td8/sba4RSLLBVZU0g0v4C+D+CYXTWKCpP1V1BnIXLJP5f8WE8xj80IVQn3/n ipE3E9fPfhKSEOqfFtrVZXeOwjZCO6ni2D5sViYOKpMWPOv8T4N5sdFSdULIq4f5C0iV MHT/OM+hcP5vl3KO0OS6fPEo55VJZAHmHwcaYeIYoM5zrfzeS73tk4ndC3PopzFBWtKx pws3BF5413gvY5rJrIhdGD8FLY+NazTV53B1IDv7J4rgcK7WfN0UkKz+OJucs5l2/3a+ +IOA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:cc:to:from:dkim-signature; bh=fh+1t3qSKm/6a0O0M/3BdDV383QgaeRBf21qJTiHiR0=; fh=rt6j48ysq91HwLZbOMkI33hxg1jnbKSxEtFAVKBcj0Q=; b=Y+fxVS3bddzMyA10qpnJoRlKm6Qo5OaHZ8r25RLc66DS1o6gj3i32QzI1xtxBSPSmf cH0gPN0FRElD91w0nw7BQ1suIvbcNFbUqRnfv60l2PezuywRSdYiZAi17L3vhXvnUOIg ajlXianUbRBv0B8HBnSD2o2CXPlooZMMreBMgnUjk52sgeyW4XEhJmdXsT5ZDrnMC4N5 2akXJhtMJ4yRX90+a51XOs17HTLfmiu4Z+TmkPon1S2G2iyPwvMA5y12gaiD4FAlKiDr To9plUIP0w9Hw4dh4SY6CMA2fT0bL+DObwM8bT6pbNHhMhXVfab1eW/fd5ZnoO/8xpiy Sm5w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@heusel.eu header.s=s1-ionos header.b=rYQG8Zxx; arc=pass (i=1 spf=pass spfdomain=heusel.eu dkim=pass dkdomain=heusel.eu); spf=pass (google.com: domain of linux-kernel+bounces-60624-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60624-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCWsiUZ7qNJs5GtV2VId9kbz144px29nE1fx8ekcb/4paad+SnDbfJNImM+ospSGkVpJmPKF+nYXlbbSehe6VGS5oz5a2g== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h15-20020a37de0f000000b007857d7090b8si2749457qkj.379.2024.02.10.16.40.48 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 16:40:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60624-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@heusel.eu header.s=s1-ionos header.b=rYQG8Zxx; arc=pass (i=1 spf=pass spfdomain=heusel.eu dkim=pass dkdomain=heusel.eu); spf=pass (google.com: domain of linux-kernel+bounces-60624-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60624-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id EF02B1C20DF3 for <ouuuleilei@gmail.com>; Sun, 11 Feb 2024 00:40:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BE23020E6; Sun, 11 Feb 2024 00:40:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=heusel.eu header.i=christian@heusel.eu header.b="rYQG8Zxx" Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 458F415B1; Sun, 11 Feb 2024 00:40:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.72.192.75 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707612027; cv=none; b=ZN29qOYL4uA7yiOBBfaKN2HTClpuiiiIO9PYmTv0Dvx05guur3UOXZ0ps6wzc+tzPgOoERSbmmzeqYq13O+qgCSGAvQEb47+aECKpBFKzz077zUBYZpp7/6xDSW0Cb4huewRbuWNeF1WFD/RohgOTUpg/KK6ebUNrd71GOHgqZM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707612027; c=relaxed/simple; bh=wmHERYYN058/RFLczrPeOcXAoo/yUFyAt/tHzV8DLHc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=XSQ0IaZUG0O+rh5h0jppz+c1y9xbrXH30xKJxgb59G2/X5auds8wTR3jtU6f+xyvlRyLdsrlvNLWvAnWV1ETHvH2guuqO9rtfnTCdLDm+CSZpKa2/RVoobr2Qul8FX+aHE2EBaram3i513A72oNrrsEzuQfSfan1WTDqIlQQdP0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=heusel.eu; spf=pass smtp.mailfrom=heusel.eu; dkim=pass (2048-bit key) header.d=heusel.eu header.i=christian@heusel.eu header.b=rYQG8Zxx; arc=none smtp.client-ip=217.72.192.75 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=heusel.eu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=heusel.eu DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=heusel.eu; s=s1-ionos; t=1707611992; x=1708216792; i=christian@heusel.eu; bh=wmHERYYN058/RFLczrPeOcXAoo/yUFyAt/tHzV8DLHc=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=rYQG8Zxxn37LNmPQ2IrloJg4YF0tYXfeMdJeWAw2NuoTtT2imBfGnmnEhmzNbE9Y mkRJXIqpeEmFTpvCJrpaSZ8chuKyjZZZ6d6S93U/f7NBlWEe/2/aMyJkj2tcRfBag BkyJRCe/3YjPRUXsgFN+un6LnYVO5AMeQFobAxNsIjFMXqfVcmV/TxsbPqDUDqk/1 34IJ5X4PDBHhMvS5ZRlCn4Iz2pOrjYl02s7+dpjCcvvRZHKCJSVGtQiYL/9uwBvHU X6eaje5bta3ocxoMOHu2w2/UujYtcbmOEYJcQThH4XK6dyfFd78d/+GXwFA5pEjU5 J0FIojCnhYRGHIB3tA== X-UI-Sender-Class: 55c96926-9e95-11ee-ae09-1f7a4046a0f6 Received: from meterpeter.INF524.stwhd ([141.70.80.5]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1Msqpq-1qgBRA1HIm-00tGhj; Sun, 11 Feb 2024 01:39:52 +0100 From: Christian Heusel <christian@heusel.eu> To: David Woodhouse <dwmw2@infradead.org>, Richard Weinberger <richard@nod.at>, Christian Heusel <christian@heusel.eu>, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Cc: kernel-janitors@vger.kernel.org Subject: [PATCH] jffs2: print symbolic error name instead of error code Date: Sun, 11 Feb 2024 01:39:04 +0100 Message-ID: <20240211003907.167891-1-christian@heusel.eu> X-Mailer: git-send-email 2.43.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:mdD+cC108pnAZXbGv+PQh7kUVRHEsQ7+KfabFD+Q5ylCBajXVwQ +3RET9o94ZZ71QCJpskyjPJvAMRbY4jidCoz5a7lci+4ts8IwctXPBczn4wJZkX+HmNb7zt 3JHIDZQ9nyKxYuZXIJ7kW1x0Vr8w/6+Bg70MFNvB+DRKWEUoy7avmZh4BcX8tmLEDUn/T6n mZ/tfamT+oPSSc1NIMIEQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:pinJemaaIv0=;vsBcASSi2Z1p+Lp65An5yLWwkcy LRfNErQyBdSATIHLfrW3qEeDiDDHmHXrWLlmImFBeQkI3sL4ELNSAnEk8CYvFI2Lk33eZRiYG kctBAHBn+Lya0INz4uM/PslB7hJvO0t07zpP/71hEFBDoltvW8OV8Zo11mPqtBc9HQyel358c TlVPrsRPqYL+HF5QztoF4+41vDnoZAre54DALKhm47TUOq2ALeMUEPFxCl7mUogno+OSleMx+ fb6m5DNAu17khHcfffpd8qDN2qaXolV8EEIrAz6Y473MvPE7EE3xV9RZhThxqWUpIdnGYsskR TlaiVINg5612ED4saHJGXSvaMiSLDdLe4W/aQRvkwZujHLJWIx/TwrTsUixTLAavF7D+wSf56 vskI54DQxEbsdI7tmpjaX1mDzs9D3T2i7fi2h47pYKSCemRzhWFAQfLJcGwjDBfni7wMHCsf6 knzfEffgVGX8EhwvxcT+Yq4SQgVF+2EYbw9BuWBWop66ZS8Q43QabA2OlY8I+YokEV6yvZlnS bCvPwdc4IiYBE5+BwoQ94TNf7Jje9vprKuJko/C4qyUozIMYrPcVCMOPCRa51rn9swkVCiQLb LQdKpaavG7qM5tPuXJgDHqxuy58OpuyccOxEgjMqt7Jg/4+aLMA7g9sQdMt0h/obSY7jnsXXl JiYdMtNCtM21tQ2IGya08B8PAyrYCYyhL8guevNpgXRSL+I44McjTH9qUjtk5tFAooZIzEsN3 DFX9Eju0oOsUZFtIPNX+rlaSAoRbYs6QSW4V22JRvXc5xhBUiN6Lr8= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790561010936972405 X-GMAIL-MSGID: 1790561010936972405 |
Series |
jffs2: print symbolic error name instead of error code
|
|
Commit Message
Christian Heusel
Feb. 11, 2024, 12:39 a.m. UTC
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/92972476-0b1f-4d0a-9951-af3fc8bc6e65@suswa.mountain/
Signed-off-by: Christian Heusel <christian@heusel.eu>
---
fs/jffs2/background.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
2.43.1
Comments
在 2024/2/11 8:39, Christian Heusel 写道: > 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/92972476-0b1f-4d0a-9951-af3fc8bc6e65@suswa.mountain/ > > Signed-off-by: Christian Heusel <christian@heusel.eu> > --- > fs/jffs2/background.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com> > > diff --git a/fs/jffs2/background.c b/fs/jffs2/background.c > index 6da92ecaf66d..bb0ee1a59e71 100644 > --- a/fs/jffs2/background.c > +++ b/fs/jffs2/background.c > @@ -44,8 +44,8 @@ int jffs2_start_garbage_collect_thread(struct jffs2_sb_info *c) > > tsk = kthread_run(jffs2_garbage_collect_thread, c, "jffs2_gcd_mtd%d", c->mtd->index); > if (IS_ERR(tsk)) { > - pr_warn("fork failed for JFFS2 garbage collect thread: %ld\n", > - -PTR_ERR(tsk)); > + pr_warn("fork failed for JFFS2 garbage collect thread: %pe\n", > + tsk); > complete(&c->gc_thread_exit); > ret = PTR_ERR(tsk); > } else { > -- > 2.43.1 > > > ______________________________________________________ > Linux MTD discussion mailing list > http://lists.infradead.org/mailman/listinfo/linux-mtd/ > . >
diff --git a/fs/jffs2/background.c b/fs/jffs2/background.c index 6da92ecaf66d..bb0ee1a59e71 100644 --- a/fs/jffs2/background.c +++ b/fs/jffs2/background.c @@ -44,8 +44,8 @@ int jffs2_start_garbage_collect_thread(struct jffs2_sb_info *c) tsk = kthread_run(jffs2_garbage_collect_thread, c, "jffs2_gcd_mtd%d", c->mtd->index); if (IS_ERR(tsk)) { - pr_warn("fork failed for JFFS2 garbage collect thread: %ld\n", - -PTR_ERR(tsk)); + pr_warn("fork failed for JFFS2 garbage collect thread: %pe\n", + tsk); complete(&c->gc_thread_exit); ret = PTR_ERR(tsk); } else {