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 2021/05/03 18:48:20 UTC

[GitHub] [incubator-nuttx] davids5 opened a new pull request #3651: Use inttypes in stm32{f7|h7}, Kinetis, s32k drivers.

davids5 opened a new pull request #3651:
URL: https://github.com/apache/incubator-nuttx/pull/3651


   ## Summary
   
   Use the intypes in syslog macros.
   
   ## Impact
   
   Allows files to compile.
   
   ## 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.

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



[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #3651: Use inttypes in stm32{f7|h7}, Kinetis, s32k drivers.

Posted by GitBox <gi...@apache.org>.
gustavonihei commented on a change in pull request #3651:
URL: https://github.com/apache/incubator-nuttx/pull/3651#discussion_r625380417



##########
File path: arch/arm/src/stm32f7/stm32_can.c
##########
@@ -322,7 +323,7 @@ static uint32_t stm32can_vgetreg(uint32_t addr)
         {
           /* Yes.. then show how many times the value repeated */
 
-          caninfo("[repeats %d more times]\n", count - 3);
+          caninfo("[repeats %" PRId32 " more times]\n", count - 3);

Review comment:
       Since it is already being changed, I believe it would be best if changed to the correct one :)
   
   Creating another PR just for changing it again seems a waste of resources (review time, CI usage...)




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

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



[GitHub] [incubator-nuttx] antmerlino commented on a change in pull request #3651: Use inttypes in stm32{f7|h7}, Kinetis, s32k drivers.

Posted by GitBox <gi...@apache.org>.
antmerlino commented on a change in pull request #3651:
URL: https://github.com/apache/incubator-nuttx/pull/3651#discussion_r625373628



##########
File path: arch/arm/src/stm32f7/stm32_serial.c
##########
@@ -3641,10 +3641,10 @@ void arm_serialinit(void)
 
 #if !defined(SERIAL_HAVE_ONLY_DMA)
 #  if defined(SERIAL_HAVE_RXDMA)
-  UNUSED(g_uart_rxdma_ops);
+  UNUSED(&g_uart_rxdma_ops);

Review comment:
       Cool thanks for the explanation. 




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

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



[GitHub] [incubator-nuttx] davids5 commented on pull request #3651: Use inttypes in stm32{f7|h7}, Kinetis, s32k drivers.

Posted by GitBox <gi...@apache.org>.
davids5 commented on pull request #3651:
URL: https://github.com/apache/incubator-nuttx/pull/3651#issuecomment-832255946


   @gustavonihei - I applied you changes ans several more in 547e3d7


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

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



[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #3651: Use inttypes in stm32{f7|h7}, Kinetis, s32k drivers.

Posted by GitBox <gi...@apache.org>.
gustavonihei commented on a change in pull request #3651:
URL: https://github.com/apache/incubator-nuttx/pull/3651#discussion_r625376869



##########
File path: arch/arm/src/stm32f7/stm32_can.c
##########
@@ -1252,8 +1260,8 @@ static int stm32can_send(FAR struct can_dev_s *dev,
   int dlc;
   int txmb;
 
-  caninfo("CAN%d ID: %d DLC: %d\n",
-          priv->port, msg->cm_hdr.ch_id, msg->cm_hdr.ch_dlc);
+  caninfo("CAN%" PRId8 " ID: %" PRId32 " DLC: %" PRId8 "\n",
+          priv->port, (uint32_t)msg->cm_hdr.ch_id, msg->cm_hdr.ch_dlc);

Review comment:
       ```suggestion
     caninfo("CAN%" PRIu8 " ID: %" PRIu32 " DLC: %" PRIu8 "\n",
             priv->port, (uint32_t)msg->cm_hdr.ch_id, msg->cm_hdr.ch_dlc);
   ```
   These variables are all of unsigned types.




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

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



[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #3651: Use inttypes in stm32{f7|h7}, Kinetis, s32k drivers.

Posted by GitBox <gi...@apache.org>.
gustavonihei commented on a change in pull request #3651:
URL: https://github.com/apache/incubator-nuttx/pull/3651#discussion_r625372174



##########
File path: arch/arm/src/stm32f7/stm32_can.c
##########
@@ -589,7 +596,7 @@ static void stm32can_reset(FAR struct can_dev_s *dev)
   uint32_t regbit = 0;
   irqstate_t flags;
 
-  caninfo("CAN%d\n", priv->port);
+  caninfo("CAN%" PRId8 "\n", priv->port);

Review comment:
       There are other similar occurrences in this file.




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

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



[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #3651: Use inttypes in stm32{f7|h7}, Kinetis, s32k drivers.

Posted by GitBox <gi...@apache.org>.
gustavonihei commented on a change in pull request #3651:
URL: https://github.com/apache/incubator-nuttx/pull/3651#discussion_r625371956



##########
File path: arch/arm/src/stm32f7/stm32_can.c
##########
@@ -589,7 +596,7 @@ static void stm32can_reset(FAR struct can_dev_s *dev)
   uint32_t regbit = 0;
   irqstate_t flags;
 
-  caninfo("CAN%d\n", priv->port);
+  caninfo("CAN%" PRId8 "\n", priv->port);

Review comment:
       ```suggestion
     caninfo("CAN%" PRIu8 "\n", priv->port);
   ```
   `priv->port` has type `uint8_t`.




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

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



[GitHub] [incubator-nuttx] davids5 commented on a change in pull request #3651: Use inttypes in stm32{f7|h7}, Kinetis, s32k drivers.

Posted by GitBox <gi...@apache.org>.
davids5 commented on a change in pull request #3651:
URL: https://github.com/apache/incubator-nuttx/pull/3651#discussion_r625373893



##########
File path: arch/arm/src/stm32f7/stm32_can.c
##########
@@ -322,7 +323,7 @@ static uint32_t stm32can_vgetreg(uint32_t addr)
         {
           /* Yes.. then show how many times the value repeated */
 
-          caninfo("[repeats %d more times]\n", count - 3);
+          caninfo("[repeats %" PRId32 " more times]\n", count - 3);

Review comment:
       @gustavonihei - I was torn on matching the old code usage and fixing them. 
   
   Are you you are siding on the "fixing them" side?




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

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



[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #3651: Use inttypes in stm32{f7|h7}, Kinetis, s32k drivers.

Posted by GitBox <gi...@apache.org>.
gustavonihei commented on a change in pull request #3651:
URL: https://github.com/apache/incubator-nuttx/pull/3651#discussion_r625370767



##########
File path: arch/arm/src/stm32f7/stm32_can.c
##########
@@ -322,7 +323,7 @@ static uint32_t stm32can_vgetreg(uint32_t addr)
         {
           /* Yes.. then show how many times the value repeated */
 
-          caninfo("[repeats %d more times]\n", count - 3);
+          caninfo("[repeats %" PRId32 " more times]\n", count - 3);

Review comment:
       ```suggestion
             caninfo("[repeats %" PRIu32 " more times]\n", count - 3);
   ```
   `count` has `uint32_t` type




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

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



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #3651: Use inttypes in stm32{f7|h7}, Kinetis, s32k drivers.

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #3651:
URL: https://github.com/apache/incubator-nuttx/pull/3651


   


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

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



[GitHub] [incubator-nuttx] davids5 commented on a change in pull request #3651: Use inttypes in stm32{f7|h7}, Kinetis, s32k drivers.

Posted by GitBox <gi...@apache.org>.
davids5 commented on a change in pull request #3651:
URL: https://github.com/apache/incubator-nuttx/pull/3651#discussion_r625371712



##########
File path: arch/arm/src/stm32f7/stm32_serial.c
##########
@@ -3641,10 +3641,10 @@ void arm_serialinit(void)
 
 #if !defined(SERIAL_HAVE_ONLY_DMA)
 #  if defined(SERIAL_HAVE_RXDMA)
-  UNUSED(g_uart_rxdma_ops);
+  UNUSED(&g_uart_rxdma_ops);

Review comment:
       Yes. it is listed "stm32f7:serial fix compile error from UNUSED() change" 
   UNUSED changed recently and broke it.




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

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



[GitHub] [incubator-nuttx] davids5 commented on a change in pull request #3651: Use inttypes in stm32{f7|h7}, Kinetis, s32k drivers.

Posted by GitBox <gi...@apache.org>.
davids5 commented on a change in pull request #3651:
URL: https://github.com/apache/incubator-nuttx/pull/3651#discussion_r626114476



##########
File path: arch/arm/src/stm32f7/stm32_can.c
##########
@@ -1252,8 +1260,8 @@ static int stm32can_send(FAR struct can_dev_s *dev,
   int dlc;
   int txmb;
 
-  caninfo("CAN%d ID: %d DLC: %d\n",
-          priv->port, msg->cm_hdr.ch_id, msg->cm_hdr.ch_dlc);
+  caninfo("CAN%" PRId8 " ID: %" PRId32 " DLC: %" PRId8 "\n",
+          priv->port, (uint32_t)msg->cm_hdr.ch_id, msg->cm_hdr.ch_dlc);

Review comment:
       done in 547e3d7




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

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



[GitHub] [incubator-nuttx] antmerlino commented on a change in pull request #3651: Use inttypes in stm32{f7|h7}, Kinetis, s32k drivers.

Posted by GitBox <gi...@apache.org>.
antmerlino commented on a change in pull request #3651:
URL: https://github.com/apache/incubator-nuttx/pull/3651#discussion_r625365851



##########
File path: arch/arm/src/stm32f7/stm32_serial.c
##########
@@ -3641,10 +3641,10 @@ void arm_serialinit(void)
 
 #if !defined(SERIAL_HAVE_ONLY_DMA)
 #  if defined(SERIAL_HAVE_RXDMA)
-  UNUSED(g_uart_rxdma_ops);
+  UNUSED(&g_uart_rxdma_ops);

Review comment:
       @davids5 
   
   Is this change intended to be included? It stands out from everything else. 




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

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



[GitHub] [incubator-nuttx] davids5 commented on a change in pull request #3651: Use inttypes in stm32{f7|h7}, Kinetis, s32k drivers.

Posted by GitBox <gi...@apache.org>.
davids5 commented on a change in pull request #3651:
URL: https://github.com/apache/incubator-nuttx/pull/3651#discussion_r625373893



##########
File path: arch/arm/src/stm32f7/stm32_can.c
##########
@@ -322,7 +323,7 @@ static uint32_t stm32can_vgetreg(uint32_t addr)
         {
           /* Yes.. then show how many times the value repeated */
 
-          caninfo("[repeats %d more times]\n", count - 3);
+          caninfo("[repeats %" PRId32 " more times]\n", count - 3);

Review comment:
       @gustavonihei - I was torn on matching the old code usage and fixing them. 
   
   Are you on the "fixing them" side?




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

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



[GitHub] [incubator-nuttx] davids5 commented on a change in pull request #3651: Use inttypes in stm32{f7|h7}, Kinetis, s32k drivers.

Posted by GitBox <gi...@apache.org>.
davids5 commented on a change in pull request #3651:
URL: https://github.com/apache/incubator-nuttx/pull/3651#discussion_r625375710



##########
File path: arch/arm/src/stm32f7/stm32_can.c
##########
@@ -658,15 +665,16 @@ static int stm32can_setup(FAR struct can_dev_s *dev)
   FAR struct stm32_can_s *priv = dev->cd_priv;
   int ret;
 
-  caninfo("CAN%d RX0 irq: %d RX1 irq: %d TX irq: %d\n",
+  caninfo("CAN%" PRId8 " RX0 irq: %" PRId8 " RX1 irq: %" PRId8
+          " TX irq: %" PRId8 "\n",

Review comment:
       @gustavonihei @antmerlino - Thnak you both!
   
   I will fix these is the AM, squash and force push.




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

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



[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #3651: Use inttypes in stm32{f7|h7}, Kinetis, s32k drivers.

Posted by GitBox <gi...@apache.org>.
gustavonihei commented on a change in pull request #3651:
URL: https://github.com/apache/incubator-nuttx/pull/3651#discussion_r625373224



##########
File path: arch/arm/src/stm32f7/stm32_can.c
##########
@@ -658,15 +665,16 @@ static int stm32can_setup(FAR struct can_dev_s *dev)
   FAR struct stm32_can_s *priv = dev->cd_priv;
   int ret;
 
-  caninfo("CAN%d RX0 irq: %d RX1 irq: %d TX irq: %d\n",
+  caninfo("CAN%" PRId8 " RX0 irq: %" PRId8 " RX1 irq: %" PRId8
+          " TX irq: %" PRId8 "\n",

Review comment:
       ```suggestion
     caninfo("CAN%" PRIu8 " RX0 irq: %" PRIu8 " RX1 irq: %" PRIu8
             " TX irq: %" PRIu8 "\n",
   ```
   `port`, `canrx` and `cantx` are of type `uint8_t`
   ```
     uint8_t  port;     /* CAN port number (1 or 2) */
     uint8_t  canrx[2]; /* CAN RX FIFO 0/1 IRQ number */
     uint8_t  cantx;    /* CAN TX IRQ number */
   ```
   




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

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