You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by je...@apache.org on 2020/11/30 08:43:32 UTC
[incubator-nuttx] branch master updated (6637c5a -> 6d5cda1)
This is an automated email from the ASF dual-hosted git repository.
jerpelea pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.
from 6637c5a nrf52 PWM: fix missing trailing comma (build failure)
new bb8c448 libc: Change OK/ERROR macro to enum
new 4ebf446 arm/sama5: Fix error: chip/sam_ehci.c:340:38: error: statement with no effect
new 6d5cda1 Fix nxstyle warning
The 3 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:
arch/arm/src/sama5/sam_ehci.c | 36 ++++++++++++++++++++++++++----------
include/sys/types.h | 18 ++++++++----------
2 files changed, 34 insertions(+), 20 deletions(-)
[incubator-nuttx] 01/03: libc: Change OK/ERROR macro to enum
Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit bb8c4485a2803c7873b275a2e732665633b394cb
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Nov 27 15:50:25 2020 +0800
libc: Change OK/ERROR macro to enum
to avoid the conflict with 3rd party c++ library(e.g. protobuf):
https://github.com/protocolbuffers/protobuf/blob/fdc35840b95f56c3aef44a3fc6ae5991f21620a5/src/google/protobuf/stubs/status.h#L47
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
Change-Id: Ie8bb9008a8375c729f8b947c9f10baa80104d157
---
include/sys/types.h | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/include/sys/types.h b/include/sys/types.h
index 4bc7b97..ea46899 100644
--- a/include/sys/types.h
+++ b/include/sys/types.h
@@ -76,16 +76,6 @@
# endif
#endif
-/* POSIX-like OS return values: */
-
-#if !defined(__cplusplus)
-# undef ERROR
-# define ERROR -1
-#endif
-
-#undef OK
-#define OK 0
-
/* Scheduling Priorities.
*
* NOTES:
@@ -305,6 +295,14 @@ typedef uint64_t u_int64_t;
typedef CODE int (*main_t)(int argc, FAR char *argv[]);
+/* POSIX-like OS return values: */
+
+enum
+{
+ ERROR = -1,
+ OK = 0,
+};
+
#endif /* __ASSEMBLY__ */
/****************************************************************************
[incubator-nuttx] 03/03: Fix nxstyle warning
Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 6d5cda1db88da11c3dc7df549098890d5e840683
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Nov 27 19:45:58 2020 +0800
Fix nxstyle warning
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
arch/arm/src/sama5/sam_ehci.c | 32 ++++++++++++++++++++++++--------
1 file changed, 24 insertions(+), 8 deletions(-)
diff --git a/arch/arm/src/sama5/sam_ehci.c b/arch/arm/src/sama5/sam_ehci.c
index 4910ef4..c794cf3 100644
--- a/arch/arm/src/sama5/sam_ehci.c
+++ b/arch/arm/src/sama5/sam_ehci.c
@@ -163,7 +163,9 @@ struct sam_qh_s
uint8_t pad[8]; /* Padding to assure 32-byte alignment */
};
-/* Internal representation of the EHCI Queue Element Transfer Descriptor (qTD) */
+/* Internal representation of the EHCI Queue Element Transfer Descriptor
+ * (qTD)
+ */
struct sam_qtd_s
{
@@ -2115,7 +2117,9 @@ static int sam_async_setup(struct sam_rhport_s *rhport,
tokenbits |= QTD_TOKEN_PID_IN;
}
- /* Allocate a new Queue Element Transfer Descriptor (qTD) for the status */
+ /* Allocate a new Queue Element Transfer Descriptor (qTD) for the
+ * status
+ */
qtd = sam_qtd_statusphase(tokenbits);
if (qtd == NULL)
@@ -3927,7 +3931,9 @@ static int sam_free(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer)
{
DEBUGASSERT(drvr && buffer);
- /* No special action is require to free the transfer/descriptor buffer memory */
+ /* No special action is require to free the transfer/descriptor buffer
+ * memory
+ */
kmm_free(buffer);
return OK;
@@ -4072,7 +4078,9 @@ static int sam_ctrlin(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0,
req->index[1], req->index[0], len);
#endif
- /* We must have exclusive access to the EHCI hardware and data structures. */
+ /* We must have exclusive access to the EHCI hardware and data
+ * structures.
+ */
ret = sam_takesem(&g_ehci.exclsem);
if (ret < 0)
@@ -4172,7 +4180,9 @@ static ssize_t sam_transfer(FAR struct usbhost_driver_s *drvr,
DEBUGASSERT(rhport && epinfo && buffer && buflen > 0);
- /* We must have exclusive access to the EHCI hardware and data structures. */
+ /* We must have exclusive access to the EHCI hardware and data
+ * structures.
+ */
ret = sam_takesem(&g_ehci.exclsem);
if (ret < 0)
@@ -4282,7 +4292,9 @@ static int sam_asynch(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep,
DEBUGASSERT(rhport && epinfo && buffer && buflen > 0);
- /* We must have exclusive access to the EHCI hardware and data structures. */
+ /* We must have exclusive access to the EHCI hardware and data
+ * structures.
+ */
ret = sam_takesem(&g_ehci.exclsem);
if (ret < 0)
@@ -4713,7 +4725,9 @@ static int sam_reset(void)
return -ETIMEDOUT;
}
- /* Now we can set the HCReset bit in the USBCMD register to initiate the reset */
+ /* Now we can set the HCReset bit in the USBCMD register to initiate the
+ * reset
+ */
regval = sam_getreg(&HCOR->usbcmd);
regval |= EHCI_USBCMD_HCRESET;
@@ -5154,7 +5168,9 @@ FAR struct usbhost_connection_s *sam_ehci_initialize(int controller)
sam_putreg(regval, &HCOR->usbcmd);
- /* Start the host controller by setting the RUN bit in the USBCMD register. */
+ /* Start the host controller by setting the RUN bit in the USBCMD
+ * register.
+ */
regval = sam_getreg(&HCOR->usbcmd);
regval |= EHCI_USBCMD_RUN;
[incubator-nuttx] 02/03: arm/sama5: Fix error:
chip/sam_ehci.c:340:38: error: statement with no effect
Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 4ebf446ebb51b291050824e2fb9c2270761a9455
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Nov 27 19:41:46 2020 +0800
arm/sama5: Fix error: chip/sam_ehci.c:340:38: error: statement with no effect
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
arch/arm/src/sama5/sam_ehci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/src/sama5/sam_ehci.c b/arch/arm/src/sama5/sam_ehci.c
index f372908..4910ef4 100644
--- a/arch/arm/src/sama5/sam_ehci.c
+++ b/arch/arm/src/sama5/sam_ehci.c
@@ -336,8 +336,8 @@ static int sam_qh_dump(struct sam_qh_s *qh, uint32_t **bp, void *arg);
#else
# define sam_qtd_print(qtd)
# define sam_qh_print(qh)
-# define sam_qtd_dump(qtd, bp, arg) OK
-# define sam_qh_dump(qh, bp, arg) OK
+# define sam_qtd_dump(qtd, bp, arg)
+# define sam_qh_dump(qh, bp, arg)
#endif
static inline uint8_t sam_ehci_speed(uint8_t usbspeed);