aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/edac/xgene_edac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/edac/xgene_edac.c b/drivers/edac/xgene_edac.c
index aee03c21632a..dfa13bb60d71 100644
--- a/drivers/edac/xgene_edac.c
+++ b/drivers/edac/xgene_edac.c
@@ -879,7 +879,7 @@ xgene_edac_pmd_create_debugfs_nodes(struct edac_device_ctl_info *edac_dev)
879 if (!IS_ENABLED(CONFIG_EDAC_DEBUG) || !ctx->edac->dfs) 879 if (!IS_ENABLED(CONFIG_EDAC_DEBUG) || !ctx->edac->dfs)
880 return; 880 return;
881 881
882 sprintf(name, "PMD%d", ctx->pmd); 882 snprintf(name, sizeof(name), "PMD%d", ctx->pmd);
883 dbgfs_dir = edac_debugfs_create_dir_at(name, ctx->edac->dfs); 883 dbgfs_dir = edac_debugfs_create_dir_at(name, ctx->edac->dfs);
884 if (!dbgfs_dir) 884 if (!dbgfs_dir)
885 return; 885 return;
@@ -923,7 +923,7 @@ static int xgene_edac_pmd_add(struct xgene_edac *edac, struct device_node *np,
923 goto err_group; 923 goto err_group;
924 } 924 }
925 925
926 sprintf(edac_name, "l2c%d", pmd); 926 snprintf(edac_name, sizeof(edac_name), "l2c%d", pmd);
927 edac_dev = edac_device_alloc_ctl_info(sizeof(*ctx), 927 edac_dev = edac_device_alloc_ctl_info(sizeof(*ctx),
928 edac_name, 1, "l2c", 1, 2, NULL, 928 edac_name, 1, "l2c", 1, 2, NULL,
929 0, edac_device_alloc_index()); 929 0, edac_device_alloc_index());