Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp450357rdb; Sat, 17 Feb 2024 17:14:05 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXEZ1YH6UGzWuHNpai9OsXYhwA1zoxeoQ1nWw4mCPTxyoie/M/Te5M9YOw7wpNNQWlM1gkLTZB7pCJK9heHnJxPjcD82zoQgZzT0yGPKg== X-Google-Smtp-Source: AGHT+IH+DL5QclZddJ14OQELZwj1vVh7moOrRu6xWR2H5By3Fuewexeqx3kB2z2BmPtPYXh4bRZS X-Received: by 2002:a05:6870:d88d:b0:218:df68:87b2 with SMTP id oe13-20020a056870d88d00b00218df6887b2mr9400659oac.44.1708218845553; Sat, 17 Feb 2024 17:14:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708218845; cv=pass; d=google.com; s=arc-20160816; b=ClHZxbLmxWOmtkOBpKnxCrqc1IUSk2mxfRUQaHuug9j9IMTAh+pAvCmELbj9KWSdrB nXhAvG3hJ2AfFcTTWY2pvt4bWtFrnI+tv4pAcb6qFc2WOZqTTWWwGm7iF+B1oRHpbZBO NPJBreaobNFX0wEopQPso7hgdKTdjUhRLGPtH0wMMQx0Fc1xv144Ecd1TlQg3/HJJ9bw 2SA+cbLLqlxgQOVLZ0MKHbTbyy04coIpn0rqQLBqAWRt+Zafg95oBj71Gov4GnB7lDMK MRik0HtsBasg8fHgmeAYFCL0PxdcNRBnHe6aKpvwF3TVrytNYRvINqZ2x6xh8XyQAFSL XKeg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:date:message-id:from :references:cc:to:subject; bh=va0rTiIXp+FKWST0ZjxSB3o1/aE4JXg3wf+a6CYVqYI=; fh=O4hVsvgYxRQXsZ2RPArHQI3D07eFcL2J1sZgNmQuIfA=; b=yj7CiGnBzwSuS0EAzQr3ES/fj8SdtGLSCweo+wQ6ItzLbqDBxbRHhQEz93QI7bje8t gjjQp0ktasNY+M4uCt4NFhXwaqJ3vGilim0eyVQErQkD9shhzSveysshG51Zx0oh2tUW GvVLgkLfdTIbNyTmS9VS6odZDvgdAXcUFa0tetpe2q6IhYCWrZEGvE/mEOvZVV7TmbwB ledlj9cbL+QrjGh1Jp7a8pqn7kEYH11Fcjs93tsKLa+nRT+Ctd6k5zU/pWcYSN6uHI0Q Lno3JMMYXeMgTRbp0TT+P+QHp+/0mnPhmcvISG99KGRsBkhXxWz65+9p093GGCsUchpw vGtA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-70130-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70130-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 17-20020a631451000000b005dcae4c1ff8si2219313pgu.131.2024.02.17.17.14.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 17:14:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-70130-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-70130-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70130-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id CA47528245D for ; Sun, 18 Feb 2024 01:14:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8AE02184F; Sun, 18 Feb 2024 01:13:57 +0000 (UTC) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) (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 B5CA8149DED; Sun, 18 Feb 2024 01:13:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.191 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708218836; cv=none; b=kChUMHFAgZuxD39+2QisSxJBqIOi48wHdWiPDH0IOJDTTkhLdUWztYvnfaMxC0CKM0fUvAUuLDpL1QXtOrkZiyi2m/UhcaCDoHrQy0rA6IqnPoG5G3xXTKcQs3vt4Tb7FjTYqQanyumaQN8ajyIyXLqun161gVcBkYDVEasNNLU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708218836; c=relaxed/simple; bh=BM5fWLHxt+nbnIcaH9/6rApX+O/g3UTPsFa3hJbgNYQ=; h=Subject:To:CC:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=MjRzLnzvXJzzs9scfp+J4YYdIQl0YLkje2zoa6l8/woLf9J7EdzTWeJzxbklvcDjnYqnQufyOaZrbqI6zCdB2TjJeR6t7fotcE636P0NSaJj1AbosZA7WIWtM30skVdOhIr2ovIelsm9BdNYFNlK9pf+uJIjFITQYLuPwbuMDo0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.191 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.234]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4TcncM4vSQz1FKTg; Sun, 18 Feb 2024 09:08:51 +0800 (CST) Received: from kwepemm600013.china.huawei.com (unknown [7.193.23.68]) by mail.maildlp.com (Postfix) with ESMTPS id B5AB314040D; Sun, 18 Feb 2024 09:13:39 +0800 (CST) Received: from [10.174.178.46] (10.174.178.46) by kwepemm600013.china.huawei.com (7.193.23.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Sun, 18 Feb 2024 09:13:38 +0800 Subject: Re: [PATCH] jffs2: print symbolic error name instead of error code To: Christian Heusel , David Woodhouse , Richard Weinberger , , CC: References: <20240211003907.167891-1-christian@heusel.eu> From: Zhihao Cheng Message-ID: Date: Sun, 18 Feb 2024 09:13:27 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240211003907.167891-1-christian@heusel.eu> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemm600013.china.huawei.com (7.193.23.68) ?? 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 > --- > fs/jffs2/background.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Zhihao Cheng > > 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/ > . >