mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
bus: rifsc: Replace snprintf("%s") with strscpy
Replace snprintf("%s", ...) with the faster and more direct strscpy().
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Link: https://lore.kernel.org/r/20260223211212.344855-1-thorsten.blum@linux.dev
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
This commit is contained in:
committed by
Alexandre Torgue
parent
256b4efd98
commit
a6e1842be2
@@ -16,6 +16,7 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
/*
|
||||
@@ -449,7 +450,7 @@ static void stm32_rifsc_fill_rimu_dbg_entry(struct rifsc_dbg_private *rifsc,
|
||||
const struct stm32_rifsc_resources_names *dbg_names = rifsc->res_names;
|
||||
u32 rimc_attr = readl_relaxed(rifsc->mmio + RIFSC_RIMC_ATTR0 + 0x4 * i);
|
||||
|
||||
snprintf(dbg_entry->m_name, sizeof(dbg_entry->m_name), "%s", dbg_names->initiator_names[i]);
|
||||
strscpy(dbg_entry->m_name, dbg_names->initiator_names[i]);
|
||||
dbg_entry->m_cid = FIELD_GET(RIFSC_RIMC_MCID_MASK, rimc_attr);
|
||||
dbg_entry->cidsel = rimc_attr & RIFSC_RIMC_CIDSEL;
|
||||
dbg_entry->m_sec = rimc_attr & RIFSC_RIMC_MSEC;
|
||||
@@ -468,8 +469,7 @@ static void stm32_rifsc_fill_dev_dbg_entry(struct rifsc_dbg_private *rifsc,
|
||||
sec_cfgr = readl_relaxed(rifsc->mmio + RIFSC_RISC_SECCFGR0 + 0x4 * reg_id);
|
||||
priv_cfgr = readl_relaxed(rifsc->mmio + RIFSC_RISC_PRIVCFGR0 + 0x4 * reg_id);
|
||||
|
||||
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 = i;
|
||||
dbg_entry->dev_cid_filt_en = cid_cfgr & CIDCFGR_CFEN;
|
||||
dbg_entry->dev_sem_en = cid_cfgr & CIDCFGR_SEMEN;
|
||||
|
||||
Reference in New Issue
Block a user