no1wudi commented on code in PR #12809:
URL: https://github.com/apache/nuttx/pull/12809#discussion_r1699260362


##########
arch/risc-v/src/common/riscv_debug.c:
##########
@@ -359,25 +325,95 @@ int up_debugpoint_add(int type, void *addr, size_t size,
 
   if (size > 1 && g_support_napot)
     {
-      mc.match = MATCH_TYPE_TOPBITS;
+      reg.match.match = MATCH_TYPE_TOPBITS;
       addr_napot = ((uintptr_t)addr & ~(size - 1)) |
                     ((size - 1) >> 1);
       WRITE_CSR(CSR_TDATA2, addr_napot);
     }
   else
     {
-      mc.match = MATCH_TYPE_EQUAL;
+      reg.match.match = MATCH_TYPE_EQUAL;
       WRITE_CSR(CSR_TDATA2, (uintptr_t)addr);
     }
 
+  return reg.reg;
+}
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: up_debugpoint_add
+ ****************************************************************************/

Review Comment:
   This function is a common function which have detaild description in 
https://github.com/apache/nuttx/blob/fe45d8aace2683b212e4ca2b9166a5df93c760fe/include/nuttx/arch.h#L2975-L2998
   
   Maybe no need to dup it here?



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