You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "xiaoxiang781216 (via GitHub)" <gi...@apache.org> on 2023/04/17 18:59:56 UTC

[GitHub] [nuttx] xiaoxiang781216 opened a new pull request, #9033: Fix the style issue in procfs

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

   ## Summary
   
   - procfs: Add g_ prefix to all procfs_operations 
   - procfs: remove procfs_ from procfs_operations variables 
   - procfs: Make g_procfs_entries in the alphabetic order 
   
   ## Impact
   
   No, code refactor only
   
   ## Testing
   
   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] [nuttx] xiaoxiang781216 commented on a diff in pull request #9033: Fix the style issue in procfs

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #9033:
URL: https://github.com/apache/nuttx/pull/9033#discussion_r1175331960


##########
drivers/mtd/mtd_partition.c:
##########
@@ -149,7 +149,7 @@ static int     part_procfs_stat(FAR const char *relpath,
 #if defined(CONFIG_FS_PROCFS) && !defined(CONFIG_PROCFS_EXCLUDE_PARTITIONS)
 static struct mtd_partition_s *g_pfirstpartition = NULL;
 
-const struct procfs_operations part_procfsoperations =
+const struct procfs_operations g_part_operations =

Review Comment:
   This change follow others to make the style consistent with each other:
   https://github.com/apache/nuttx/pull/9033/files#diff-4f09fc6787bdafa4c18947e2cd05b138fa7d8e5a66c446e45e7076256d2f98c7L55-L67
   We can add back procfs_ prefix.



-- 
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] [nuttx] davids5 merged pull request #9033: Fix the style issue in procfs

Posted by "davids5 (via GitHub)" <gi...@apache.org>.
davids5 merged PR #9033:
URL: https://github.com/apache/nuttx/pull/9033


-- 
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] [nuttx] patacongo commented on a diff in pull request #9033: Fix the style issue in procfs

Posted by "patacongo (via GitHub)" <gi...@apache.org>.
patacongo commented on code in PR #9033:
URL: https://github.com/apache/nuttx/pull/9033#discussion_r1175318178


##########
drivers/mtd/mtd_partition.c:
##########
@@ -149,7 +149,7 @@ static int     part_procfs_stat(FAR const char *relpath,
 #if defined(CONFIG_FS_PROCFS) && !defined(CONFIG_PROCFS_EXCLUDE_PARTITIONS)
 static struct mtd_partition_s *g_pfirstpartition = NULL;
 
-const struct procfs_operations part_procfsoperations =
+const struct procfs_operations g_part_operations =

Review Comment:
   I really dislike long variable names.  However, they are often necessary if a variable has global scope.  It is a good coding style to append something that forces the name into a "namespace" and prevents naming collisions.
   
   I would suggest not simplifying the names like this.  g_part_operation could very easily collide with some other variable naming in the future.  I recommend extending the name with a "namespce" like `g_procfs_part_operation`.
   
   I understand that that is a long cumbersome name but we will be happier in the long run if we try to prevent naming collisions.



-- 
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] [nuttx] davids5 commented on pull request #9033: Fix the style issue in procfs

Posted by "davids5 (via GitHub)" <gi...@apache.org>.
davids5 commented on PR #9033:
URL: https://github.com/apache/nuttx/pull/9033#issuecomment-1514370550

   @xiaoxiang781216 Please fix the Code space overflow found by 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