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/05/01 14:17:33 UTC

[GitHub] [nuttx] xiaoxiang781216 opened a new pull request, #9149: Remove #warning in the unnecessary places

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

   ## Summary
   
   - libm/arm: Remove the compiler specific #warning
   - Remove #warning if the code already return the error code or value
   
   ## Impact
   
   Minor
   
   ## 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] pkarashchenko merged pull request #9149: Remove #warning in the unnecessary places

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


-- 
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 #9149: Remove #warning in the unnecessary places

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


##########
net/utils/net_chksum.c:
##########
@@ -223,10 +223,6 @@ void net_chksum_adjust(FAR uint16_t *chksum,
                        FAR const uint16_t *optr, ssize_t olen,
                        FAR const uint16_t *nptr, ssize_t nlen)
 {
-#ifdef CONFIG_ENDIAN_BIG
-#  warning "Not verified on big-endian yet."

Review Comment:
   I review the code, it looks good.



-- 
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 pull request #9149: Remove #warning in the unnecessary places

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

   > > But the commit title already explains the change clearly.
   > 
   > The "Why" is not in the messages. Only the "What" is. A lot of commit message state the "What" but never state the motivation (Why).
   > 
   > The reason this is important is so that future contributors learn to not pattern match, but understand the motivations.
   
   The reason is that #warning is compiler specific and shouldn't used in the common code base unconditionally. Which is alrady mentioned in the commit message.
   
   


-- 
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 #9149: Remove #warning in the unnecessary places

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


##########
drivers/net/dm90x0.c:
##########
@@ -1554,8 +1554,7 @@ static int dm9x_addmac(FAR struct net_driver_s *dev, FAR const uint8_t *mac)
 
   /* Add the MAC address to the hardware multicast routing table */
 
-#warning "Multicast MAC support not implemented"
-  return OK;
+  return -ENOSYS;

Review Comment:
   Done, change #warning to comment for reference.



-- 
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] pkarashchenko commented on a diff in pull request #9149: Remove #warning in the unnecessary places

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


##########
net/utils/net_chksum.c:
##########
@@ -223,10 +223,6 @@ void net_chksum_adjust(FAR uint16_t *chksum,
                        FAR const uint16_t *optr, ssize_t olen,
                        FAR const uint16_t *nptr, ssize_t nlen)
 {
-#ifdef CONFIG_ENDIAN_BIG
-#  warning "Not verified on big-endian yet."

Review Comment:
   Maybe also make it a comment?



-- 
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] jerpelea commented on pull request #9149: Remove #warning in the unnecessary places

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

   please add commit messages explaining the changes


-- 
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 pull request #9149: Remove #warning in the unnecessary places

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

   But the commit title already explains the change clearly.


-- 
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 #9149: Remove #warning in the unnecessary places

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

   > But the commit title already explains the change clearly.
   
   The "Why" is not in the messages. Only the "What" is. A lot of commit message state the "What" but never state the motivation (Why). 
   
   The reason this is important is so that future contributors learn to not pattern match, but understand the motivations. 


-- 
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] btashton commented on a diff in pull request #9149: Remove #warning in the unnecessary places

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


##########
drivers/net/dm90x0.c:
##########
@@ -1554,8 +1554,7 @@ static int dm9x_addmac(FAR struct net_driver_s *dev, FAR const uint8_t *mac)
 
   /* Add the MAC address to the hardware multicast routing table */
 
-#warning "Multicast MAC support not implemented"
-  return OK;
+  return -ENOSYS;

Review Comment:
   For these missing logic sections I'm fine with the change to put the correct return code (that seems more correct) but should we also have a comment near it indicating missing logic? That would also make it easier to find and implement these sections later?



-- 
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