masayuki2009 commented on code in PR #7744:
URL: https://github.com/apache/nuttx/pull/7744#discussion_r1036891552


##########
arch/risc-v/src/common/riscv_mtimer.c:
##########
@@ -290,7 +290,7 @@ static int riscv_mtimer_current(struct oneshot_lowerhalf_s 
*lower,
   struct riscv_mtimer_lowerhalf_s *priv =
     (struct riscv_mtimer_lowerhalf_s *)lower;
   uint64_t mtime = riscv_mtimer_get_mtime(priv);
-  uint64_t nsec = mtime * NSEC_PER_SEC / priv->freq;
+  uint64_t nsec = mtime * (NSEC_PER_SEC / priv->freq);

Review Comment:
   @pkarashchenko 
   Thanks for the suggestion. I confirmed the above code works.
   



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