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 2020/06/16 16:32:37 UTC

[GitHub] [incubator-nuttx] acassis commented on a change in pull request #1258: S32K1XX: FlexCAN fixes & EEEPROM driver

acassis commented on a change in pull request #1258:
URL: https://github.com/apache/incubator-nuttx/pull/1258#discussion_r440985785



##########
File path: arch/arm/src/s32k1xx/s32k1xx_flexcan.c
##########
@@ -979,7 +982,7 @@ static void s32k1xx_txdone(FAR void *arg)
   /* Process TX completions */
 
   uint32_t mb_bit = 1 << RXMBCOUNT;

Review comment:
       I know you didn't touch this line in this commit, but please also move it to the top.

##########
File path: arch/arm/src/kinetis/kinetis_flexcan.c
##########
@@ -978,7 +981,7 @@ static void kinetis_txdone(FAR void *arg)
   /* Process TX completions */
 
   uint32_t mb_bit = 1 << RXMBCOUNT;

Review comment:
       same here

##########
File path: arch/arm/src/kinetis/kinetis_flexcan.c
##########
@@ -719,7 +719,8 @@ static int kinetis_transmit(FAR struct kinetis_driver_s *priv)
 
       uint32_t *frame_data_word = (uint32_t *)&frame->data[0];
 
-      for (int i = 0; i < (frame->len + 4 - 1) / 4; i++)
+      uint32_t i;

Review comment:
       Although code inside arch/ are not required to follow C89, please move the function declaration to the top of the function to spread good practice and avoid people follow it to core parts of the OS where it is forbidden.

##########
File path: arch/arm/src/kinetis/kinetis_flexcan.c
##########
@@ -863,7 +864,8 @@ static void kinetis_receive(FAR struct kinetis_driver_s *priv,
 
           uint32_t *frame_data_word = (uint32_t *)&frame->data[0];
 
-          for (int i = 0; i < (frame->len + 4 - 1) / 4; i++)
+          uint32_t i;

Review comment:
       ditto




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