From nobody Sun Feb 8 05:40:36 2026 Received: from out-187.mta0.migadu.com (out-187.mta0.migadu.com [91.218.175.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 71D9735960 for ; Fri, 17 Jan 2025 11:47:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.187 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737114449; cv=none; b=PcmBB2ofGiDkJ6QHgtuq2pZE/sRudxY89MCg94FmHZ8Kc1Z7Iaxgsakv1TkopJKIYJsXvUnLEnxSjD+p7EKXkp0PZkC0Zy95bUvf27bQknNYuIjhaibUxbhQ+Gj/GaG59IkcxCRBKRMz0uWAOpTj1yQdZsegTfcoW99/UrAEk3g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737114449; c=relaxed/simple; bh=qeM18OmW+TCt/yVyOVeEOgersjUJvQv80sqrLAN3bMk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=IvDoKPE1OqgX5RWrAZufXSf0gaAkMJvYafdi1vnUJLyhgmQaB7Jq4tl30hbG6ubGfZo8FDmNQvpzIpo9rH39lCtlZTW4Ikj12NdSDWAwCGU0n9aoZ82voYMliTaFSosvSYtMu3IWdCoKggMHlaIPNPguHVKp5gHzNu59wYwZNhA= 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=DJn1hSiF; arc=none smtp.client-ip=91.218.175.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="DJn1hSiF" 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=1737114439; 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=VOzs1/uk+f0UYDcEG8Y22jpAtVU8GmqKKNkO1hSuNIU=; b=DJn1hSiFNhcaaOt10HcodRo54MELfXLd/xyrmDqPqK1g7mNfLDF1W0eijSbrRj9sBXWHyx yCD6GjDvXyL44yboHlRwJuSOJqkO4vTTIutki8+TqhPHnEBHi/VVsRGhIbZQ/VUOugc0XJ UJoIWvc/g3Z3sOCoAXdbtWmjv/RfM3c= From: Thorsten Blum To: Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao Cc: Thorsten Blum , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH] powerpc/powermac: Use str_enabled_disabled() and str_on_off() helpers Date: Fri, 17 Jan 2025 12:46:20 +0100 Message-ID: <20250117114625.64903-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_enabled_disabled() and str_on_off() helper functions. Signed-off-by: Thorsten Blum --- arch/powerpc/platforms/powermac/setup.c | 4 ++-- arch/powerpc/platforms/powermac/time.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platfor= ms/powermac/setup.c index 6de1cd5d8a58..e119ced05d10 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include =20 @@ -238,8 +239,7 @@ static void __init l2cr_init(void) _set_L2CR(0); _set_L2CR(*l2cr); pr_info("L2CR overridden (0x%x), backside cache is %s\n", - *l2cr, ((*l2cr) & 0x80000000) ? - "enabled" : "disabled"); + *l2cr, str_enabled_disabled((*l2cr) & 0x80000000)); } of_node_put(np); break; diff --git a/arch/powerpc/platforms/powermac/time.c b/arch/powerpc/platform= s/powermac/time.c index 8633891b7aa5..b4426a35aca3 100644 --- a/arch/powerpc/platforms/powermac/time.c +++ b/arch/powerpc/platforms/powermac/time.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -77,7 +78,7 @@ long __init pmac_time_init(void) delta |=3D 0xFF000000UL; dst =3D ((pmac_xpram_read(PMAC_XPRAM_MACHINE_LOC + 0x8) & 0x80) !=3D 0); printk("GMT Delta read from XPRAM: %d minutes, DST: %s\n", delta/60, - dst ? "on" : "off"); + str_on_off(dst)); #endif return delta; } --=20 2.48.0