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 14:51:12 UTC

[GitHub] [incubator-nuttx] PetervdPerk-NXP opened a new pull request #1258: S32K1XX: FlexCAN fixes & EEEPROM driver

PetervdPerk-NXP opened a new pull request #1258:
URL: https://github.com/apache/incubator-nuttx/pull/1258


   ## Summary
   Fixes compile error with older compiler for FlexCAN & SocketCAN
   FlexCAN don't disable interrupt but only remove masks TX MB interrupts
   S32K1XX: Emulated EEPROM block device driver
   
   ## Impact
   S32K1XX & Kinetis FlexCAN driver
   
   ## Testing
   Verified on S32K1XX
   
   


----------------------------------------------------------------
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] PetervdPerk-NXP commented on pull request #1258: S32K1XX: FlexCAN fixes & EEEPROM driver

Posted by GitBox <gi...@apache.org>.
PetervdPerk-NXP commented on pull request #1258:
URL: https://github.com/apache/incubator-nuttx/pull/1258#issuecomment-644896516


   @acassis, you're right C89 style initialization is better. I've pushed a new commit.


----------------------------------------------------------------
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] acassis commented on pull request #1258: S32K1XX: FlexCAN fixes & EEEPROM driver

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


   > @acassis, you're right C89 style initialization is better. I've pushed a new commit.
   
   Thank you for your modification Peter!


----------------------------------------------------------------
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] acassis commented on a change in pull request #1258: S32K1XX: FlexCAN fixes & EEEPROM driver

Posted by GitBox <gi...@apache.org>.
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



[GitHub] [incubator-nuttx] acassis merged pull request #1258: S32K1XX: FlexCAN fixes & EEEPROM driver

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


   


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