From nobody Mon Jun 8 09:48:04 2026 Received: from out-187.mta1.migadu.com (out-187.mta1.migadu.com [95.215.58.187]) (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 908C840B6FB for ; Thu, 4 Jun 2026 11:12:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.187 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780571569; cv=none; b=Z4CFiPpjSQbO8YoauxgGkh16hygxKjmCXKesBS9Mc+CjMi6fRBs1JKBWKW06QHRzjPJG0dI2xLjaZ+rZueTVVThpEWGW2MOOyHKH74ingt8yluv4QzpD5Qym1vFgwyAfvDCfEaeEp0Ua2haEXKNAwWmikup1UfjhB1qZ2j+nSA4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780571569; c=relaxed/simple; bh=ytdeCiJdNll6wjnMF7+8t1je0hArLGIcQuy8rAoL66Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=RxiWHVxOo0yov//9EGPjo4pBmSgVg9Fgw7juIaPjHbaSxzZSuhuAZ5pQ7rraux8+aJj5Sx/ya0RKVPbOZnXlr63LDaoFWfk1xzeZnontyBDl3/5uPwAT7U6mS0rBgCDafw13oKVvQa/rciMiVDJwKYEiZuyPSLhT8954gYu0EhY= 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=Mk2doaQo; arc=none smtp.client-ip=95.215.58.187 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="Mk2doaQo" 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=1780571563; 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=6YzdzQqy1dyCmwGKMsad+62QDYi8eL8H4CsEyEO05H8=; b=Mk2doaQowS7y76ySBf0cQG2deK8ECYpoNUjpW6+xA3VQ0iFz7POL1SAmGE9AbowB5UwEVF PYsl/MCydLh/OfMP9+ErrsfxL/cs9NzqsBOEyBYGtiXN9ffqYox6uUzHYPNuOMICfhQCCn 3le06Dl42wRdSzafKf1HK+l0q1piqHM= From: Thorsten Blum To: Rich Felker , John Paul Adrian Glaubitz , Kees Cook Cc: Thorsten Blum , linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] sh: sq: use str_plural helper in sq_remap Date: Thu, 4 Jun 2026 13:12:36 +0200 Message-ID: <20260604111237.1297783-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 X-Developer-Signature: v=1; a=openpgp-sha256; l=1238; i=thorsten.blum@linux.dev; h=from:subject; bh=ytdeCiJdNll6wjnMF7+8t1je0hArLGIcQuy8rAoL66Q=; b=owGbwMvMwCUWt7pQ4caZUj3G02pJDFmKsUtfizhM+VTxuZ1p9QHu46ZWaXE/b8yUTq7+9cR+Y 6/4vWNTOkpZGMS4GGTFFFkezPoxw7e0pnKTScROmDmsTCBDGLg4BWAi1c8ZGZ6taFp5dfmZXRrp J1tLWnTKAjJeJle1FVcv+vt1/0veqVEM/5QUjL8Izpjq9yz2JdvkAP1bJw/V+tUo+22cp1x1IDz 3ERcA X-Developer-Key: i=thorsten.blum@linux.dev; a=openpgp; fpr=1D60735E8AEF3BE473B69D84733678FD8DFEEAD4 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" Replace the manual ternary "s" pluralization with str_plural() to simplify the code. Use the format specifier %-1s to preserve the whitespace alignment. Simplify the map->name ternary expression while at it. Signed-off-by: Thorsten Blum Reviewed-by: Geert Uytterhoeven --- arch/sh/kernel/cpu/sh4/sq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c index 908a8e09113b..0f9244be6dcc 100644 --- a/arch/sh/kernel/cpu/sh4/sq.c +++ b/arch/sh/kernel/cpu/sh4/sq.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -181,9 +182,8 @@ unsigned long sq_remap(unsigned long phys, unsigned int= size, goto out; =20 psz =3D (size + (PAGE_SIZE - 1)) >> PAGE_SHIFT; - pr_info("sqremap: %15s [%4d page%s] va 0x%08lx pa 0x%08lx\n", - likely(map->name) ? map->name : "???", - psz, psz =3D=3D 1 ? " " : "s", + pr_info("sqremap: %15s [%4d page%-1s] va 0x%08lx pa 0x%08lx\n", + map->name ?: "???", psz, str_plural(psz), map->sq_addr, map->addr); =20 sq_mapping_list_add(map);