From nobody Fri Apr 17 08:43:02 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 06082314B6A for ; Mon, 23 Feb 2026 21:12:25 +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=1771881147; cv=none; b=EXSC0l089BHxXE0j2/NrzejDSgh6AmTcvrC56u7l3tVdu5uEZLmG9w4vRn4RrYeE9lL/gwU/VP18zg1ItoPiFiqnNMzjXPf42zZfXYzqL/HuL2Jgj1ASqrf29FNQ4dUoQqgRZ5jteWbnXic68GY4CLhJneG2w1M+3Xww9u41NKg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771881147; c=relaxed/simple; bh=oMkaZUWcIL6IlgW1MhDfjRIp+SROghPF1f39HMaHAm0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=H2Fed6QhhPEDvl7mS6VJDfEw3Jm0uK4M9w2L74HAqQBaRpP5BziFk8AtLfHxCK5G/+pzyIrJ9J2YHvIKUvmX9LYQ3ctGAL11IhAU2OBUZk6nU7vnkP7n37O/r3M1MkvwmAAWOnI+xqFuXVaCJsG6ptlaAC0qgGl8THIpjzvwND4= 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=Ou0+Rmnr; 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="Ou0+Rmnr" 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=1771881144; 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=XRjfZu1Hr90ss3ioz6xOX+blIxYMM+Mlko4KD2NgAUw=; b=Ou0+Rmnr3JxP5kw4e40+7uW1Z3hOgVc6DgGXnJkusn+qXZby88wnxi/c7qOpMKBRU5FgE+ WheUDgCgFgsJaTbiECpnz5qr/9/GgIUDSZbnE8ZTW2xG7wprzA+HUV21b/Pw+OGashToaN KVAIMBtnSlCLaX/tHFd+/BV/5KW9jbU= From: Thorsten Blum To: Gatien Chevallier , Maxime Coquelin , Alexandre Torgue Cc: Thorsten Blum , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] bus: rifsc: Replace snprintf("%s") with strscpy Date: Mon, 23 Feb 2026 22:12:11 +0100 Message-ID: <20260223211212.344855-1-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" Replace snprintf("%s", ...) with the faster and more direct strscpy(). Signed-off-by: Thorsten Blum Acked-by: Gatien Chevallier --- drivers/bus/stm32_rifsc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/bus/stm32_rifsc.c b/drivers/bus/stm32_rifsc.c index debeaf8ea1bd..ba65ad21434b 100644 --- a/drivers/bus/stm32_rifsc.c +++ b/drivers/bus/stm32_rifsc.c @@ -15,6 +15,7 @@ #include #include #include +#include #include =20 #include "stm32_firewall.h" @@ -450,7 +451,7 @@ static void stm32_rifsc_fill_rimu_dbg_entry(struct rifs= c_dbg_private *rifsc, const struct stm32_rifsc_resources_names *dbg_names =3D rifsc->res_names; u32 rimc_attr =3D readl_relaxed(rifsc->mmio + RIFSC_RIMC_ATTR0 + 0x4 * i); =20 - snprintf(dbg_entry->m_name, sizeof(dbg_entry->m_name), "%s", dbg_names->i= nitiator_names[i]); + strscpy(dbg_entry->m_name, dbg_names->initiator_names[i]); dbg_entry->m_cid =3D FIELD_GET(RIFSC_RIMC_MCID_MASK, rimc_attr); dbg_entry->cidsel =3D rimc_attr & RIFSC_RIMC_CIDSEL; dbg_entry->m_sec =3D rimc_attr & RIFSC_RIMC_MSEC; @@ -469,8 +470,7 @@ static void stm32_rifsc_fill_dev_dbg_entry(struct rifsc= _dbg_private *rifsc, sec_cfgr =3D readl_relaxed(rifsc->mmio + RIFSC_RISC_SECCFGR0 + 0x4 * reg_= id); priv_cfgr =3D readl_relaxed(rifsc->mmio + RIFSC_RISC_PRIVCFGR0 + 0x4 * re= g_id); =20 - snprintf(dbg_entry->dev_name, sizeof(dbg_entry->dev_name), "%s", - dbg_names->device_names[i]); + strscpy(dbg_entry->dev_name, dbg_names->device_names[i]); dbg_entry->dev_id =3D i; dbg_entry->dev_cid_filt_en =3D cid_cfgr & CIDCFGR_CFEN; dbg_entry->dev_sem_en =3D cid_cfgr & CIDCFGR_SEMEN; --=20 Thorsten Blum GPG: 1D60 735E 8AEF 3BE4 73B6 9D84 7336 78FD 8DFE EAD4