From nobody Sat Oct 4 06:34:48 2025 Received: from out-178.mta0.migadu.com (out-178.mta0.migadu.com [91.218.175.178]) (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 4113920B1F4 for ; Tue, 19 Aug 2025 16:59:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755622790; cv=none; b=NM6Eg8SGaPsRmlHk7PniRGRX+WY+Ow4S63rya+vPEf3+Gg90VCfcd8jiV0a6vCQsWxwFFvkvdPg6pcCtRpFPt1QgQTUComzFgWTpw2/lgjqDcYa7U3quXb8ljuriaQ2eSzR6p2oGiEtNGpFkINmTdtPjHGjXe4EOM7wyWb7F7cs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755622790; c=relaxed/simple; bh=rX+rNY+IHuHP3S8qk86RqaUVoalZx1ZtIgryE9LSZE0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=J1DKQdBEs6p5LPi2giAW54ZWqnY9iZCLqiDEBX7x1/CnFe8w7SS7z9VLFPqXx0gDJkLS6/HmQPaTbh+er+hEQPdkK/Z/Zfr/ve3Cwwi8p1YEHsPyLl8FMfHHPnOAk3l0TEe2zxThegFLL7HiWgwmBm/jIRXzHAOEvzIc4JOgERo= 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=LdKA+KXR; arc=none smtp.client-ip=91.218.175.178 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="LdKA+KXR" 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=1755622784; 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=8cP+VflgCVNtVf3f9XKodv6qzOPG+U075h9FA37e9FM=; b=LdKA+KXRzXtZpB0v3KtcG8Gs6/M5Cg8Qdz8KMxGwO6r4rvE8A2EmKAGRDjUnNQkbhjyYPU Mby6P09sUzosolNNbCKMTa7aDgYFf0W4k04Tx6/FmP5JrRa/GQEogfsdAf/oVQshpUbXqW XciK4c4zf6Pvqw40hhxMRmetDTfLSNI= From: Thorsten Blum To: Geoff Levand , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy Cc: Thorsten Blum , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH] powerpc/ps3: Use str_write_read() in ps3stor_read_write_sectors() Date: Tue, 19 Aug 2025 18:58:29 +0200 Message-ID: <20250819165829.714344-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_write_read() helper function and silence the following Coccinelle/coccicheck warning reported by string_choices.cocci: opportunity for str_write_read(write) Signed-off-by: Thorsten Blum Reviewed-by: Geert Uytterhoeven --- drivers/ps3/ps3stor_lib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/ps3/ps3stor_lib.c b/drivers/ps3/ps3stor_lib.c index a12a1ad9b5fe..3d4d343ee0c8 100644 --- a/drivers/ps3/ps3stor_lib.c +++ b/drivers/ps3/ps3stor_lib.c @@ -8,6 +8,7 @@ =20 #include #include +#include =20 #include #include @@ -265,7 +266,7 @@ u64 ps3stor_read_write_sectors(struct ps3_storage_devic= e *dev, u64 lpar, u64 start_sector, u64 sectors, int write) { unsigned int region_id =3D dev->regions[dev->region_idx].id; - const char *op =3D write ? "write" : "read"; + const char *op =3D str_write_read(write); int res; =20 dev_dbg(&dev->sbd.core, "%s:%u: %s %llu sectors starting at %llu\n", --=20 2.50.1