From nobody Sun Nov 24 14:06:28 2024 Received: from out-175.mta0.migadu.com (out-175.mta0.migadu.com [91.218.175.175]) (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 ED147139CFF for ; Mon, 4 Nov 2024 23:49:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730764181; cv=none; b=LtyP7sUBYQfDp8Xzsm8JaF+uhUB5RvWlxykFT2TLcMwLRBODbedWfHYq+iJRUby7pcdq1e62McOjExb4/kssLRriWQENPGAHif8QYwqPSnm6Dpfdq0K2hJcq0je0Mjo7ymNlDd87GYW6twEaC+9cri8PJbmHgG2+HLmzialvJt0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730764181; c=relaxed/simple; bh=muS5YqxBg1X4aKFuoG3dKehUBVF2a3t+rvoZaz64Fy4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=a1A+BtB823z1w309GLuzKawC4wppgwZVHRs0owvy+xT8hfA1623HTrjEVDJJTgadEy1DKbiR63OhZmX+30jpjSoH8dAK+Sc6C1FP7sq9ufoD8DME45i65K9MfXs72INL2PqvKIf66k47E6S3Pr5CrRNDDf7iLnTqKMRanuIZ3Vc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=DWxFe4/S; arc=none smtp.client-ip=91.218.175.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="DWxFe4/S" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1730764176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=0hPGUSawC3wfWVUaw8imv0OPqbrEwJlGlsqYQZ9dtME=; b=DWxFe4/SamXPkpSpTjT8KXjtcYlNwJTOz1l0MC+jKO+bmvJoEJJvVZaWCbnB4JXmLO1v6T E0CYwjupD9t7w7aihgpW6RRi6JuwQ5jst7/OJN4Bw5XOrcp8IRETK9bwCnTAdSaxYRGT86 unr3BNhHeHb6v5UWjJhoc73w3H5xAwk= From: Thorsten Blum To: David Woodhouse , Richard Weinberger , Zhihao Cheng , Thorsten Blum , Randy Dunlap , Jeff Johnson Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [RESEND PATCH] jffs2: Use str_yes_no() helper function Date: Tue, 5 Nov 2024 00:48:59 +0100 Message-ID: <20241104234900.8305-2-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" Remove hard-coded strings by using the str_yes_no() helper function. Reviewed-by: Zhihao Cheng Signed-off-by: Thorsten Blum --- fs/jffs2/nodemgmt.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fs/jffs2/nodemgmt.c b/fs/jffs2/nodemgmt.c index bbab2bdc71b6..69569864630e 100644 --- a/fs/jffs2/nodemgmt.c +++ b/fs/jffs2/nodemgmt.c @@ -15,6 +15,7 @@ #include #include #include +#include #include "nodelist.h" #include "debug.h" =20 @@ -317,9 +318,9 @@ static int jffs2_find_nextblock(struct jffs2_sb_info *c) And there's no space left. At all. */ pr_crit("Argh. No free space left for GC. nr_erasing_blocks is %d. nr_f= ree_blocks is %d. (erasableempty: %s, erasingempty: %s, erasependingempty: = %s)\n", c->nr_erasing_blocks, c->nr_free_blocks, - list_empty(&c->erasable_list) ? "yes" : "no", - list_empty(&c->erasing_list) ? "yes" : "no", - list_empty(&c->erase_pending_list) ? "yes" : "no"); + str_yes_no(list_empty(&c->erasable_list)), + str_yes_no(list_empty(&c->erasing_list)), + str_yes_no(list_empty(&c->erase_pending_list))); return -ENOSPC; } =20 @@ -883,7 +884,7 @@ int jffs2_thread_should_wake(struct jffs2_sb_info *c) =20 jffs2_dbg(1, "%s(): nr_free_blocks %d, nr_erasing_blocks %d, dirty_size 0= x%x, vdirty_blocks %d: %s\n", __func__, c->nr_free_blocks, c->nr_erasing_blocks, - c->dirty_size, nr_very_dirty, ret ? "yes" : "no"); + c->dirty_size, nr_very_dirty, str_yes_no(ret)); =20 return ret; } --=20 2.47.0