You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/04/27 01:53:49 UTC

[incubator-nuttx] branch master updated (bd7217e -> 927cb00)

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

gnutt pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.


    from bd7217e  Remove boilerplate from the PR template.
     new 546e35f  drivers/rptun: replace 'rxbuf_size' and 'txbuf_size' to 'buf_size' in struct 'rptun_rsc_s'.
     new 927cb00  fix nxstyle warning

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 drivers/rptun/rptun.c       | 13 ++++++++-----
 include/nuttx/rptun/rptun.h |  5 +++--
 2 files changed, 11 insertions(+), 7 deletions(-)


[incubator-nuttx] 01/02: drivers/rptun: replace 'rxbuf_size' and 'txbuf_size' to 'buf_size' in struct 'rptun_rsc_s'.

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 546e35fc98e171feb720d192eb5f4cc53546ce66
Author: zhongan <zh...@xiaomi.com>
AuthorDate: Sun Apr 26 19:11:25 2020 +0800

    drivers/rptun: replace 'rxbuf_size' and 'txbuf_size' to 'buf_size' in struct 'rptun_rsc_s'.
    
    Change-Id: I7c9da4bd985712a3fde4c56999901434740b33f7
    Signed-off-by: zhongan <zh...@xiaomi.com>
---
 drivers/rptun/rptun.c       | 4 ++--
 include/nuttx/rptun/rptun.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/rptun/rptun.c b/drivers/rptun/rptun.c
index 0a75c2e..ea1c21a 100644
--- a/drivers/rptun/rptun.c
+++ b/drivers/rptun/rptun.c
@@ -441,8 +441,8 @@ static int rptun_dev_start(FAR struct remoteproc *rproc)
       rsc->rpmsg_vring1.da = da1;
 
       shbuf   = (FAR char *)rsc + tbsz + v0sz + v1sz;
-      shbufsz = rsc->buf_size *
-                (rsc->rpmsg_vring0.num + rsc->rpmsg_vring1.num);
+      shbufsz = rsc->config.txbuf_size * rsc->rpmsg_vring0.num +
+                rsc->config.rxbuf_size * rsc->rpmsg_vring1.num;
 
       rpmsg_virtio_init_shm_pool(&priv->shm_pool, shbuf, shbufsz);
 
diff --git a/include/nuttx/rptun/rptun.h b/include/nuttx/rptun/rptun.h
index 194ba80..6eb2774 100644
--- a/include/nuttx/rptun/rptun.h
+++ b/include/nuttx/rptun/rptun.h
@@ -260,7 +260,7 @@ struct __attribute__((aligned(B2C(8)))) rptun_rsc_s
   struct fw_rsc_vdev       rpmsg_vdev;
   struct fw_rsc_vdev_vring rpmsg_vring0;
   struct fw_rsc_vdev_vring rpmsg_vring1;
-  unsigned int             buf_size;
+  struct fw_rsc_config     config;
 };
 
 struct rptun_dev_s;


[incubator-nuttx] 02/02: fix nxstyle warning

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 927cb00f5e9581eba3e45851b41a76173ec1f5cb
Author: zhongan <zh...@xiaomi.com>
AuthorDate: Mon Apr 27 09:10:58 2020 +0800

    fix nxstyle warning
    
    Signed-off-by: zhongan <zh...@xiaomi.com>
---
 drivers/rptun/rptun.c       | 9 ++++++---
 include/nuttx/rptun/rptun.h | 3 ++-
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/rptun/rptun.c b/drivers/rptun/rptun.c
index ea1c21a..c568077 100644
--- a/drivers/rptun/rptun.c
+++ b/drivers/rptun/rptun.c
@@ -551,7 +551,8 @@ static int rptun_dev_stop(FAR struct remoteproc *rproc)
   return 0;
 }
 
-static int rptun_dev_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
+static int rptun_dev_ioctl(FAR struct file *filep, int cmd,
+                           unsigned long arg)
 {
   FAR struct inode *inode = filep->f_inode;
   FAR struct rptun_priv_s *priv = inode->i_private;
@@ -577,7 +578,8 @@ static int rptun_dev_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
   return ret;
 }
 
-static int rptun_store_open(FAR void *store_, FAR const char *path,
+static int rptun_store_open(FAR void *store_,
+                            FAR const char *path,
                             FAR const void **img_data)
 {
   FAR struct rptun_store_s *store = store_;
@@ -777,7 +779,8 @@ void rpmsg_unregister_callback(FAR void *priv_,
                 {
                   struct rptun_priv_s *priv;
 
-                  priv = metal_container_of(pnode, struct rptun_priv_s, node);
+                  priv = metal_container_of(pnode,
+                                            struct rptun_priv_s, node);
                   device_destroy(&priv->vdev.rdev, priv_);
                 }
             }
diff --git a/include/nuttx/rptun/rptun.h b/include/nuttx/rptun/rptun.h
index 6eb2774..31be2d4 100644
--- a/include/nuttx/rptun/rptun.h
+++ b/include/nuttx/rptun/rptun.h
@@ -269,7 +269,8 @@ struct rptun_ops_s
   CODE FAR const char *(*get_cpuname)(FAR struct rptun_dev_s *dev);
   CODE FAR const char *(*get_firmware)(FAR struct rptun_dev_s *dev);
 
-  CODE FAR const struct rptun_addrenv_s *(*get_addrenv)(FAR struct rptun_dev_s *dev);
+  CODE FAR const struct rptun_addrenv_s *(*get_addrenv)(
+                        FAR struct rptun_dev_s *dev);
   CODE FAR struct rptun_rsc_s *(*get_resource)(FAR struct rptun_dev_s *dev);
 
   CODE bool (*is_autostart)(FAR struct rptun_dev_s *dev);