You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/08/22 19:41:08 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 opened a new pull request, #6894: Refine how to specify iob and ramlog data section

xiaoxiang781216 opened a new pull request, #6894:
URL: https://github.com/apache/incubator-nuttx/pull/6894

   ## Summary
   1.Remove the default value(.bss)
   2.Remove !ARCH_SIM dependence
   
   ## Impact
   Refactor only
   
   ## Testing
   Pass CI
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6894: Refine how to specify iob and ramlog data section

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #6894:
URL: https://github.com/apache/incubator-nuttx/pull/6894#discussion_r952175233


##########
drivers/syslog/ramlog.c:
##########
@@ -125,8 +125,8 @@ static const struct file_operations g_ramlogfops =
 
 #ifdef CONFIG_RAMLOG_SYSLOG
 static char g_sysbuffer[CONFIG_RAMLOG_BUFSIZE]
-#ifdef CONFIG_RAMLOG_BUFFER_SECTION
-                               locate_data(CONFIG_RAMLOG_BUFFER_SECTION)
+#ifdef RAMLOG_BUFFER_SECTION

Review Comment:
   Since RAMLOG_BUFFER_SECTION and IOB_SECTION are defined by Make.defs now:
   https://github.com/apache/incubator-nuttx/pull/6894/files#diff-803dc937d614cd425d920dbd26bcf947ea598029928167af68fae122b89718deR41
   https://github.com/apache/incubator-nuttx/pull/6894/files#diff-30811896863304a4ba8b467eebd5a110e46e8f84b311deb349c0640c9187d7b2R42



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6894: Refine how to specify iob and ramlog data section

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #6894:
URL: https://github.com/apache/incubator-nuttx/pull/6894#discussion_r952175233


##########
drivers/syslog/ramlog.c:
##########
@@ -125,8 +125,8 @@ static const struct file_operations g_ramlogfops =
 
 #ifdef CONFIG_RAMLOG_SYSLOG
 static char g_sysbuffer[CONFIG_RAMLOG_BUFSIZE]
-#ifdef CONFIG_RAMLOG_BUFFER_SECTION
-                               locate_data(CONFIG_RAMLOG_BUFFER_SECTION)
+#ifdef RAMLOG_BUFFER_SECTION

Review Comment:
   Since RAMLOG_BUFFER_SECTION and IOB_SECTION are defined by Make.defs:
   https://github.com/apache/incubator-nuttx/pull/6894/files#diff-803dc937d614cd425d920dbd26bcf947ea598029928167af68fae122b89718deR41
   https://github.com/apache/incubator-nuttx/pull/6894/files#diff-30811896863304a4ba8b467eebd5a110e46e8f84b311deb349c0640c9187d7b2R42



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] davids5 commented on a diff in pull request #6894: Refine how to specify iob and ramlog data section

Posted by GitBox <gi...@apache.org>.
davids5 commented on code in PR #6894:
URL: https://github.com/apache/incubator-nuttx/pull/6894#discussion_r952173591


##########
drivers/syslog/ramlog.c:
##########
@@ -125,8 +125,8 @@ static const struct file_operations g_ramlogfops =
 
 #ifdef CONFIG_RAMLOG_SYSLOG
 static char g_sysbuffer[CONFIG_RAMLOG_BUFSIZE]
-#ifdef CONFIG_RAMLOG_BUFFER_SECTION
-                               locate_data(CONFIG_RAMLOG_BUFFER_SECTION)
+#ifdef RAMLOG_BUFFER_SECTION

Review Comment:
   Why not use the #define in the preprocessor section to define the "locate" as was done in the other PR?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6894: Refine how to specify iob and ramlog data section

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #6894:
URL: https://github.com/apache/incubator-nuttx/pull/6894#discussion_r952230204


##########
drivers/syslog/ramlog.c:
##########
@@ -125,8 +125,8 @@ static const struct file_operations g_ramlogfops =
 
 #ifdef CONFIG_RAMLOG_SYSLOG
 static char g_sysbuffer[CONFIG_RAMLOG_BUFSIZE]
-#ifdef CONFIG_RAMLOG_BUFFER_SECTION
-                               locate_data(CONFIG_RAMLOG_BUFFER_SECTION)
+#ifdef RAMLOG_BUFFER_SECTION

Review Comment:
   Since this macro just reference once, I prefer to #ifdef/#else/#endif directly instead introducing a new macro. Anyway, I change g_sysbuffer definition to ensure both places use the same style.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko merged pull request #6894: Refine how to specify iob and ramlog data section

Posted by GitBox <gi...@apache.org>.
pkarashchenko merged PR #6894:
URL: https://github.com/apache/incubator-nuttx/pull/6894


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] davids5 commented on a diff in pull request #6894: Refine how to specify iob and ramlog data section

Posted by GitBox <gi...@apache.org>.
davids5 commented on code in PR #6894:
URL: https://github.com/apache/incubator-nuttx/pull/6894#discussion_r952211951


##########
drivers/syslog/ramlog.c:
##########
@@ -125,8 +125,8 @@ static const struct file_operations g_ramlogfops =
 
 #ifdef CONFIG_RAMLOG_SYSLOG
 static char g_sysbuffer[CONFIG_RAMLOG_BUFSIZE]
-#ifdef CONFIG_RAMLOG_BUFFER_SECTION
-                               locate_data(CONFIG_RAMLOG_BUFFER_SECTION)
+#ifdef RAMLOG_BUFFER_SECTION

Review Comment:
   I suggesting using the pattern (choose the naming as you like)
   
   ```
   #if defined(RAMLOG_BUFFER_SECTION)
   #  define RAM_LOG_LOCATE locate_data(RAMLOG_BUFFER_SECTION)
   # else
   #  define RAM_LOG_LOCATE
   #endif  
   ```
   ...
   ```
   static char g_sysbuffer[CONFIG_RAMLOG_BUFSIZE] RAM_LOG_LOCATE
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org