pkarashchenko commented on a change in pull request #4999:
URL: https://github.com/apache/incubator-nuttx/pull/4999#discussion_r769359176



##########
File path: include/nuttx/sched_note.h
##########
@@ -99,6 +99,15 @@
   memset((s), 0, sizeof(struct note_filter_irq_s))
 #endif
 
+/* Note dump module tag definitions */
+
+#ifdef CONFIG_SCHED_INSTRUMENTATION_DUMP
+#  define NOTE_MODULE(a, b, c, d) \
+  ((unsigned)(a) | ((unsigned)(b) << 8) | ((unsigned)(c) << 16) | ((d) << 24))

Review comment:
       yes. current variant has a bug when `(unsigned)(a)` is promoted (that is 
not needed), but `((d) << 24)` is not.
   additionally in `void sched_note_vbprintf(uint32_t module, uint8_t event, 
FAR const char *fmt, va_list va)` the `module` is `uint32_t`, so there is not 
reason to use `unsigned` for promotion




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to