This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 4aaecdc62ad728dc7bebf00c1c6343ae502453ac
Author: guanyi3 <[email protected]>
AuthorDate: Fri Mar 13 16:41:23 2026 +0800

    drivers/devfreq: guard backtrace code with CONFIG_LIBC_BACKTRACE_DEPTH
    
    This change came to this tree (#19741) with the guard on
    CONFIG_LIBC_BACKTRACE_BUFFSIZE, the option that enabled the backtrace
    records at the time.  The records are now enabled by
    CONFIG_LIBC_BACKTRACE_DEPTH and CONFIG_LIBC_BACKTRACE_BUFFSIZE is gone,
    so guard the backtrace code of devfreq_read() with
    CONFIG_LIBC_BACKTRACE_DEPTH, as in the original version of this change.
    
    Signed-off-by: guanyi3 <[email protected]>
---
 drivers/devfreq/devfreq_procfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/devfreq/devfreq_procfs.c b/drivers/devfreq/devfreq_procfs.c
index 113a09a2107..effc0b41944 100644
--- a/drivers/devfreq/devfreq_procfs.c
+++ b/drivers/devfreq/devfreq_procfs.c
@@ -169,7 +169,7 @@ static ssize_t devfreq_read(FAR struct file *filep,
   FAR struct devfreq_s *devfreq = devfreq_procfs->devfreq;
 #ifdef CONFIG_DEVFREQ_PROCFS_QOS
   FAR struct qos_request_s *qos;
-#if defined(CONFIG_LIBC_BACKTRACE_BUFFSIZE) && CONFIG_LIBC_BACKTRACE_BUFFSIZE 
> 0
+#if CONFIG_LIBC_BACKTRACE_DEPTH > 0
   FAR void **stack;
   int depth;
 #endif
@@ -214,7 +214,7 @@ static ssize_t devfreq_read(FAR struct file *filep,
       procfs_sprintf(buffer, buflen, &offset,
                      " %"PRIu32", %"PRIu32",",
                      qos->min_req.prio, qos->max_req.prio);
-#if defined(CONFIG_LIBC_BACKTRACE_BUFFSIZE) && CONFIG_LIBC_BACKTRACE_BUFFSIZE 
> 0
+#if CONFIG_LIBC_BACKTRACE_DEPTH > 0
       stack = backtrace_get(qos->backtrace, &depth);
       for (i = 0; i < depth; i++)
         {

Reply via email to