This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit d0ddf027dbcf65b239d8c5d54ac25797d50125e1
Author: Bowen Wang <[email protected]>
AuthorDate: Fri Aug 22 22:33:39 2025 +0800

    drivers/rpmsg: move struct rpmsg_ping_s into nuttx/rpmsg/rpmsg.h
    
    struct rpmsg_ping_s is the argument of RPMSGIOC_PING, but lived in its
    own public header that rpmsg.h included.  Define it in
    include/nuttx/rpmsg/rpmsg.h next to the ioctl, remove
    include/nuttx/rpmsg/rpmsg_ping.h, and include the private
    drivers/rpmsg/rpmsg_ping.h from drivers/rpmsg/rpmsg.h instead.
    
    Signed-off-by: Bowen Wang <[email protected]>
---
 .github/CODEOWNERS               |  1 -
 drivers/rpmsg/rpmsg.c            |  1 -
 drivers/rpmsg/rpmsg.h            |  2 ++
 include/nuttx/rpmsg/rpmsg.h      | 11 ++++++++-
 include/nuttx/rpmsg/rpmsg_ping.h | 49 ----------------------------------------
 5 files changed, 12 insertions(+), 52 deletions(-)

diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 241de2c39c3..a2d57dc282f 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -14600,7 +14600,6 @@ include/nuttx/rf/ioctl.h [email protected] 
[email protected]
 include/nuttx/rmt/rmt.h [email protected] [email protected]
 include/nuttx/rmt/rmtchar.h [email protected] [email protected]
 include/nuttx/rpmsg/rpmsg.h [email protected] [email protected] 
[email protected] [email protected] [email protected]
-include/nuttx/rpmsg/rpmsg_ping.h [email protected] [email protected]
 include/nuttx/rpmsg/rpmsg_port.h [email protected] [email protected] 
[email protected] [email protected]
 include/nuttx/rpmsg/rpmsg_router.h [email protected] [email protected]
 include/nuttx/rpmsg/rpmsg_virtio_ivshmem.h [email protected] 
[email protected]
diff --git a/drivers/rpmsg/rpmsg.c b/drivers/rpmsg/rpmsg.c
index 7723dc98876..35621015f9f 100644
--- a/drivers/rpmsg/rpmsg.c
+++ b/drivers/rpmsg/rpmsg.c
@@ -33,7 +33,6 @@
 #include <nuttx/semaphore.h>
 
 #include "rpmsg.h"
-#include "rpmsg_ping.h"
 #include "rpmsg_router.h"
 #include "rpmsg_test.h"
 
diff --git a/drivers/rpmsg/rpmsg.h b/drivers/rpmsg/rpmsg.h
index 0b79377f8b8..78a2f7414e6 100644
--- a/drivers/rpmsg/rpmsg.h
+++ b/drivers/rpmsg/rpmsg.h
@@ -29,6 +29,8 @@
 
 #include <nuttx/rpmsg/rpmsg.h>
 
+#include "rpmsg_ping.h"
+
 /****************************************************************************
  * Public Types
  ****************************************************************************/
diff --git a/include/nuttx/rpmsg/rpmsg.h b/include/nuttx/rpmsg/rpmsg.h
index 36b6daebc12..ffce5eed40b 100644
--- a/include/nuttx/rpmsg/rpmsg.h
+++ b/include/nuttx/rpmsg/rpmsg.h
@@ -33,7 +33,6 @@
 #ifdef CONFIG_RPMSG
 
 #include <nuttx/fs/ioctl.h>
-#include <nuttx/rpmsg/rpmsg_ping.h>
 #include <openamp/rpmsg.h>
 #include <openamp/rpmsg_internal.h>
 
@@ -52,6 +51,16 @@
  * Public Types
  ****************************************************************************/
 
+/* Used for ioctl RPMSGIOC_PING */
+
+struct rpmsg_ping_s
+{
+  int times;
+  int len;
+  int cmd;
+  int sleep; /* unit: ms */
+};
+
 struct rpmsg_s
 {
   bool                         init;
diff --git a/include/nuttx/rpmsg/rpmsg_ping.h b/include/nuttx/rpmsg/rpmsg_ping.h
deleted file mode 100644
index f6b7cccf343..00000000000
--- a/include/nuttx/rpmsg/rpmsg_ping.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************************
- * include/nuttx/rpmsg/rpmsg_ping.h
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * 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.
- *
- ****************************************************************************/
-
-#ifndef __INCLUDE_NUTTX_RPMSG_RPMSG_PING_H
-#define __INCLUDE_NUTTX_RPMSG_RPMSG_PING_H
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#ifdef CONFIG_RPMSG_PING
-
-/****************************************************************************
- * Public Function Prototypes
- ****************************************************************************/
-
-/* used for ioctl RPMSGIOC_PING */
-
-struct rpmsg_ping_s
-{
-  int  times;
-  int  len;
-  int  cmd;
-  int  sleep; /* unit: ms */
-};
-
-#endif /* CONFIG_RPMSG_PING */
-#endif /* __INCLUDE_NUTTX_RPMSG_RPMSG_PING_H */

Reply via email to