You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2021/02/24 10:30:20 UTC

[GitHub] [mynewt-core] KKopyscinski opened a new pull request #2501: hw: handle hal_spi_enable/disable errors

KKopyscinski opened a new pull request #2501:
URL: https://github.com/apache/mynewt-core/pull/2501


   hal_spi_enable/disable errors were handled, but not everywhere. This
   unifies handling manner.


----------------------------------------------------------------
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] [mynewt-core] apache-mynewt-bot removed a comment on pull request #2501: hw: handle hal_spi_enable/disable errors

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot removed a comment on pull request #2501:
URL: https://github.com/apache/mynewt-core/pull/2501#issuecomment-784977712


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### hw/mcu/dialog/da1469x/src/hal_spi.c
   <details>
   
   ```diff
   @@ -255,7 +255,7 @@
    
        da1469x_pd_acquire(MCU_PD_DOMAIN_COM);
    
   -    spi->spi_type  = spi_type;
   +    spi->spi_type = spi_type;
    
        rc = hal_spi_disable(spi_num);
        if (rc) {
   ```
   
   </details>


----------------------------------------------------------------
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] [mynewt-core] KKopyscinski commented on a change in pull request #2501: hw: handle hal_spi_enable/disable errors

Posted by GitBox <gi...@apache.org>.
KKopyscinski commented on a change in pull request #2501:
URL: https://github.com/apache/mynewt-core/pull/2501#discussion_r583409470



##########
File path: hw/drivers/flash/at45db/src/at45db.c
##########
@@ -446,7 +446,10 @@ at45db_init(const struct hal_flash *hal_flash_dev)
     }
 
     hal_spi_set_txrx_cb(dev->spi_num, NULL, NULL);
-    hal_spi_enable(dev->spi_num);
+    rc = hal_spi_enable(dev->spi_num);

Review comment:
       ok, done




----------------------------------------------------------------
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] [mynewt-core] KKopyscinski merged pull request #2501: hw: handle hal_spi_enable/disable errors

Posted by GitBox <gi...@apache.org>.
KKopyscinski merged pull request #2501:
URL: https://github.com/apache/mynewt-core/pull/2501


   


----------------------------------------------------------------
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] [mynewt-core] apache-mynewt-bot commented on pull request #2501: hw: handle hal_spi_enable/disable errors

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on pull request #2501:
URL: https://github.com/apache/mynewt-core/pull/2501#issuecomment-786441495


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### hw/mcu/dialog/da1469x/src/hal_spi.c
   <details>
   
   ```diff
   @@ -255,7 +255,7 @@
    
        da1469x_pd_acquire(MCU_PD_DOMAIN_COM);
    
   -    spi->spi_type  = spi_type;
   +    spi->spi_type = spi_type;
    
        rc = hal_spi_disable(spi_num);
        if (rc) {
   ```
   
   </details>


----------------------------------------------------------------
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] [mynewt-core] kasjer commented on a change in pull request #2501: hw: handle hal_spi_enable/disable errors

Posted by GitBox <gi...@apache.org>.
kasjer commented on a change in pull request #2501:
URL: https://github.com/apache/mynewt-core/pull/2501#discussion_r582683525



##########
File path: hw/drivers/flash/at45db/src/at45db.c
##########
@@ -446,7 +446,10 @@ at45db_init(const struct hal_flash *hal_flash_dev)
     }
 
     hal_spi_set_txrx_cb(dev->spi_num, NULL, NULL);
-    hal_spi_enable(dev->spi_num);
+    rc = hal_spi_enable(dev->spi_num);

Review comment:
       i would just return rc all the time since there is nothing to do after if (rc) statement




----------------------------------------------------------------
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] [mynewt-core] apache-mynewt-bot commented on pull request #2501: hw: handle hal_spi_enable/disable errors

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on pull request #2501:
URL: https://github.com/apache/mynewt-core/pull/2501#issuecomment-784977712


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### hw/mcu/dialog/da1469x/src/hal_spi.c
   <details>
   
   ```diff
   @@ -255,7 +255,7 @@
    
        da1469x_pd_acquire(MCU_PD_DOMAIN_COM);
    
   -    spi->spi_type  = spi_type;
   +    spi->spi_type = spi_type;
    
        rc = hal_spi_disable(spi_num);
        if (rc) {
   ```
   
   </details>


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