yamt commented on code in PR #16022:
URL: https://github.com/apache/nuttx/pull/16022#discussion_r2023889569


##########
arch/xtensa/src/esp32/esp32_ble_adapter.c:
##########
@@ -312,47 +312,49 @@ struct irqstate_list_s
  */
 
 static xt_handler ble_set_isr(int n, xt_handler f, void *arg);
-static void ints_on(uint32_t mask);
+static void ints_on(unsigned int mask);
 static void IRAM_ATTR interrupt_disable(void);
 static void IRAM_ATTR interrupt_restore(void);
 static void IRAM_ATTR task_yield_from_isr(void);
 static void *semphr_create_wrapper(uint32_t max, uint32_t init);
 static void semphr_delete_wrapper(void *semphr);
-static int IRAM_ATTR semphr_take_from_isr_wrapper(void *semphr, void *hptw);
-static int IRAM_ATTR semphr_give_from_isr_wrapper(void *semphr, void *hptw);
-static int semphr_take_wrapper(void *semphr, uint32_t block_time_ms);
-static int semphr_give_wrapper(void *semphr);
+static int32_t IRAM_ATTR semphr_take_from_isr_wrapper(void *semphr,
+                                                      void *hptw);
+static int32_t IRAM_ATTR semphr_give_from_isr_wrapper(void *semphr,
+                                                      void *hptw);
+static int32_t semphr_take_wrapper(void *semphr, uint32_t block_time_ms);
+static int32_t semphr_give_wrapper(void *semphr);
 static void *mutex_create_wrapper(void);
 static void mutex_delete_wrapper(void *mutex);
-static int mutex_lock_wrapper(void *mutex);
-static int mutex_unlock_wrapper(void *mutex);
+static int32_t mutex_lock_wrapper(void *mutex);
+static int32_t mutex_unlock_wrapper(void *mutex);
 static void *queue_create_wrapper(uint32_t queue_len, uint32_t item_size);
 static void queue_delete_wrapper(void *queue);
-static int queue_send_wrapper(void *queue,
+static int32_t queue_send_wrapper(void *queue,
                               void *item,
                               uint32_t block_time_ms);
-static int IRAM_ATTR queue_send_from_isr_wrapper(void *queue,
-                                                 void *item,
-                                                 void *hptw);
-static int queue_recv_wrapper(void *queue,
-                              void *item,
-                              uint32_t block_time_ms);
-static int IRAM_ATTR queue_recv_from_isr_wrapper(void *queue,
-                                                 void *item,
-                                                 void *hptw);
-static int task_create_wrapper(void *task_func,
-                               const char *name,
-                               uint32_t stack_depth,
-                               void *param,
-                               uint32_t prio,
-                               void *task_handle,
-                               uint32_t core_id);
+static int32_t IRAM_ATTR queue_send_from_isr_wrapper(void *queue,
+                                                     void *item,
+                                                     void *hptw);
+static int32_t queue_recv_wrapper(void *queue,

Review Comment:
   just a curious question: what's the policy on int32_t vs int in esp32 code?
   
   even the "upstream" (esp-hal-3rdparty) seems inconsistent to me.
   



##########
arch/xtensa/src/common/espressif/esp_nxdiag.c:
##########
@@ -258,7 +258,7 @@ static ssize_t esp_nxdiag_read(struct file *filep,
     }
   else
     {
-      snprintf(tmp, tmp_arr_size, "Flash status: 0x%lx\n\n",
+      snprintf(tmp, tmp_arr_size, "Flash status: 0x%" PRIx32 "\n\n",
                (long unsigned int)flash_status);

Review Comment:
   you should remove the cast. (or revert the format change)



##########
arch/xtensa/src/common/espressif/esp_wireless.c:
##########
@@ -1520,7 +1520,7 @@ int32_t esp_wifi_init(const wifi_init_config_t *config)
   ret = coex_init();
   if (ret)
     {
-      wlerr("ERROR: Failed to initialize coex error=%d\n", ret);
+      wlerr("ERROR: Failed to initialize coex error=%ld\n", ret);

Review Comment:
   it seems inconsistent to keep `ret` int32_t while changing the type of the 
function int.
   
   (i guess int is better as it matches esp_err_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.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

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

Reply via email to