From: Quanyang Wang <quanyang.w...@windriver.com>

If the size of array stack_var is 1024, it will trigger the build
warning as below:

arch/arm/mach-axxia/ddr_retention.c:220:1: warning: the frame size of 1032 
bytes is larger than 1024 bytes [-Wframe-larger-than=]
  220 | }
      | ^

Since substracting 1K for 4 times from current stack pointer is equal to
substracting 512 for 8 times, let's change array size to 512 and
recursions to be 8.

Signed-off-by: Quanyang Wang <quanyang.w...@windriver.com>
---
 arch/arm/mach-axxia/ddr_retention.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-axxia/ddr_retention.c 
b/arch/arm/mach-axxia/ddr_retention.c
index 4a8ca9641051..1ff34fb8baec 100644
--- a/arch/arm/mach-axxia/ddr_retention.c
+++ b/arch/arm/mach-axxia/ddr_retention.c
@@ -205,7 +205,7 @@ static inline void flush_tlb_ID(void)
 static void exercise_stack_ptr(volatile char *recursions)
 {
        volatile char *p;
-       char stack_var[1024];
+       char stack_var[512];
        int i;
 
        p = stack_var;
@@ -236,7 +236,7 @@ initiate_retention_reset(void)
      */
        volatile long tmp;
        long *ptmp;
-       char recursions = 4;
+       char recursions = 8;
 
        if (ddr_retention_enabled == 0) {
                pr_info("DDR Retention Reset is Not Enabled\n");
-- 
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#10634): 
https://lists.yoctoproject.org/g/linux-yocto/message/10634
Mute This Topic: https://lists.yoctoproject.org/mt/86952374/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to