From 1829fc33cb3dd55b41b1ca1ef3642df9d2ac6bbf Mon Sep 17 00:00:00 2001 From: Pisit Sawangvonganan Date: Wed, 24 Jan 2024 01:40:26 +0700 Subject: [PATCH] sd: omit zero-initialization for csd[4] and cid[4] After a review of the usage of csd[4] and cid[4], it has been determined that zero-initialization can be omitted. It can be expected from successful operations that data will be appropriately written back from the underlying layer. Signed-off-by: Pisit Sawangvonganan --- subsys/sd/sd_ops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subsys/sd/sd_ops.c b/subsys/sd/sd_ops.c index cf8bd01c146593..27e64c32dc8f10 100644 --- a/subsys/sd/sd_ops.c +++ b/subsys/sd/sd_ops.c @@ -260,7 +260,7 @@ static int sdmmc_read_cxd(struct sd_card *card, uint32_t opcode, uint32_t rca, u int sdmmc_read_csd(struct sd_card *card) { int ret; - uint32_t csd[4] = {0}; + uint32_t csd[4]; /* Keep CSD on stack for reduced RAM usage */ struct sd_csd card_csd = {0}; @@ -283,7 +283,7 @@ int sdmmc_read_csd(struct sd_card *card) /* Reads card identification register, and decodes it */ int card_read_cid(struct sd_card *card) { - uint32_t cid[4] = {0}; + uint32_t cid[4]; int ret; #if defined(CONFIG_SDMMC_STACK) || defined(CONFIG_SDIO_STACK) /* Keep CID on stack for reduced RAM usage */