You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/08/22 15:03:37 UTC
[incubator-nuttx] branch master updated: drivers: Fix compiler errors
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 55df6e951e drivers: Fix compiler errors
55df6e951e is described below
commit 55df6e951e83461c2cb71a96af1a36a85f146dfb
Author: chao.an <an...@xiaomi.com>
AuthorDate: Wed Aug 10 19:34:42 2022 +0800
drivers: Fix compiler errors
riscv64-unknown-elf-ld: staging/libdrivers.a(rwbuffer.o): in function `rwb_flush':
rwbuffer.c:(.text.rwb_flush+0x12): undefined reference to `rwb_forcetake'
Signed-off-by: chenwen@espressif.com <ch...@espressif.com>
Signed-off-by: chao.an <an...@xiaomi.com>
---
drivers/misc/rwbuffer.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/misc/rwbuffer.c b/drivers/misc/rwbuffer.c
index 7f267bae0e..3b60632711 100644
--- a/drivers/misc/rwbuffer.c
+++ b/drivers/misc/rwbuffer.c
@@ -71,18 +71,20 @@ static ssize_t rwb_read_(FAR struct rwbuffer_s *rwb, off_t startblock,
* Name: rwb_semtake
****************************************************************************/
-#if defined(CONFIG_DRVR_WRITEBUFFER) && CONFIG_DRVR_WRDELAY != 0
+#if defined(CONFIG_DRVR_WRITEBUFFER)
static int rwb_semtake(FAR sem_t *sem)
{
return nxsem_wait_uninterruptible(sem);
}
+#else
+# define rwb_semtake(s) OK
#endif
/****************************************************************************
* Name: rwb_forcetake
****************************************************************************/
-#if defined(CONFIG_DRVR_WRITEBUFFER) && CONFIG_DRVR_WRDELAY != 0
+#if defined(CONFIG_DRVR_WRITEBUFFER)
static int rwb_forcetake(FAR sem_t *sem)
{
int result;
@@ -106,13 +108,19 @@ static int rwb_forcetake(FAR sem_t *sem)
return ret;
}
+#else
+# define rwb_forcetake(s) OK
#endif
/****************************************************************************
* Name: rwb_semgive
****************************************************************************/
-#define rwb_semgive(s) nxsem_post(s)
+#if defined(CONFIG_DRVR_WRITEBUFFER)
+# define rwb_semgive(s) nxsem_post(s)
+#else
+# define rwb_semgive(s)
+#endif
/****************************************************************************
* Name: rwb_overlap