pkarashchenko commented on code in PR #7018:
URL: https://github.com/apache/incubator-nuttx/pull/7018#discussion_r965191317


##########
libs/libc/queue/dq_remafter.c:
##########
@@ -0,0 +1,50 @@
+/****************************************************************************
+ * libs/libc/queue/dq_remafter.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <queue.h>
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: dq_remafter
+ *
+ * Description:
+ *   dq_remafter removes the entry following 'node' from the 'queue'.
+ *   Returns a reference to the removed entry.
+ *
+ ****************************************************************************/
+
+FAR dq_entry_t *dq_remafter(FAR dq_entry_t *node, dq_queue_t *queue)

Review Comment:
   ```suggestion
   FAR dq_entry_t *dq_remafter(FAR dq_entry_t *node, FAR dq_queue_t *queue)
   ```



##########
libs/libc/queue/dq_remafter.c:
##########
@@ -0,0 +1,50 @@
+/****************************************************************************
+ * libs/libc/queue/dq_remafter.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <queue.h>
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: dq_remafter
+ *
+ * Description:
+ *   dq_remafter removes the entry following 'node' from the 'queue'.
+ *   Returns a reference to the removed entry.
+ *
+ ****************************************************************************/
+
+FAR dq_entry_t *dq_remafter(FAR dq_entry_t *node, dq_queue_t *queue)
+{
+  FAR dq_entry_t *ret = node->flink;
+
+  if (queue->head && ret)

Review Comment:
   Optional
   ```suggestion
     if (queue->head != NULL && ret != NULL)
   ```



##########
include/nuttx/wdog.h:
##########
@@ -61,17 +61,22 @@ typedef uint32_t  wdparm_t;
 
 typedef CODE void (*wdentry_t)(wdparm_t arg);
 
-/* This is the internal representation of the watchdog timer structure. */
+/* This is the internal representation of the watchdog timer structure.
+ * Notice !!!
+ * Carefully with the struct wdog_s order, you may not directly modify
+ * this. This struct will combine in struct work_s in union type, and,
+ * wqueue will modify/check this struct in work_qcancel().
+ */
 
 struct wdog_s
 {
   FAR struct wdog_s *next;       /* Support for singly linked lists. */
+  wdparm_t           arg;        /* Callback argument */

Review Comment:
   I see. That is two pointers instead of one now.



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