You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/01/18 19:04:54 UTC

[GitHub] [incubator-nuttx] pkarashchenko commented on a change in pull request #5265: rpmsg_rtc: dirctly call rpmsg_rtc_server_xx() in server_ept_cb()

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



##########
File path: drivers/timers/rpmsg_rtc.c
##########
@@ -634,8 +633,8 @@ static int rpmsg_rtc_server_ept_cb(FAR struct rpmsg_endpoint *ept,
         FAR struct rpmsg_rtc_get_s *msg = data;
         struct rtc_time rtctime;
 
-        header->result = server->lower->ops->rdtime(server->lower,
-                                                    &rtctime);
+        header->result =  rpmsg_rtc_server_rdtime(priv, &rtctime);

Review comment:
       ```suggestion
           header->result = rpmsg_rtc_server_rdtime(priv, &rtctime);
   ```
   

##########
File path: drivers/timers/rpmsg_rtc.c
##########
@@ -646,11 +645,17 @@ static int rpmsg_rtc_server_ept_cb(FAR struct rpmsg_endpoint *ept,
         FAR struct rpmsg_rtc_set_s *msg = data;
         struct rtc_time rtctime;
         time_t time = msg->sec;
+        struct timespec tp;
 
         gmtime_r(&time, (FAR struct tm *)&rtctime);
         rtctime.tm_nsec = msg->nsec;
-        header->result = server->lower->ops->settime(server->lower,
-                                                     &rtctime);
+
+        rpmsg_rtc_server_settime(priv, &rtctime);

Review comment:
       So we do not need to fill `header->result` 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-unsubscribe@nuttx.apache.org

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