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/11/05 20:59:29 UTC

[GitHub] [mynewt-core] vikrant-proxy commented on a change in pull request #2711: mcu/nrf5340: Add RAM location check to calls using easyDMA

vikrant-proxy commented on a change in pull request #2711:
URL: https://github.com/apache/mynewt-core/pull/2711#discussion_r743973729



##########
File path: hw/mcu/nordic/nrf5340_net/src/hal_spi.c
##########
@@ -685,10 +686,14 @@ hal_spi_txrx_noblock(int spi_num, void *txbuf, void *rxbuf, int len)
 {
     struct nrf5340_net_hal_spi *spi = &nrf5340_net_hal_spi0;
 
-    if (spi_num != 0 || (spi->txrx_cb_func == NULL) || (len == 0)) {
+    if (spi_num != 0 || (spi->txrx_cb_func == NULL) || (len == 0) || !nrfx_is_in_ram(txbuf)) {
         return EINVAL;
     }
 
+    if (rxbuf != NULL && !nrfx_is_in_ram(rxbuf)) {
+        return SYS_EINVAL;

Review comment:
       ah yes, let me be consistent with the existing convention.




-- 
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@mynewt.apache.org

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