[riot-notifications] [RIOT-OS/RIOT] uncrustify: Add fe310 cpu files to the whitelist (#15778)

Martine Lenders notifications at github.com
Fri Jan 15 14:15:17 CET 2021


@miri64 approved this pull request.

ACK. I ran the `dist/tools/uncrustify/uncrustify.sh` locally and it reported it touched the files (since my newer version of `uncrustify` on Arch found some more defects. Feel free to fix:

```diff
diff --git a/cpu/fe310/include/atomic_utils_arch.h b/cpu/fe310/include/atomic_utils_arch.h
index 122f7bf061..f74e166ff8 100644
--- a/cpu/fe310/include/atomic_utils_arch.h
+++ b/cpu/fe310/include/atomic_utils_arch.h
@@ -71,6 +71,6 @@ static inline void atomic_store_u32(volatile uint32_t *dest, uint32_t val)
 }
 #endif
 
-#endif /* DOXYGEN */
-#endif /* ATOMIC_UTILS_ARCH_H */
+#endif  /* DOXYGEN */
+#endif  /* ATOMIC_UTILS_ARCH_H */
 /** @} */
diff --git a/cpu/fe310/nano/nanostubs.c b/cpu/fe310/nano/nanostubs.c
index 914baff797..39ac781aec 100644
--- a/cpu/fe310/nano/nanostubs.c
+++ b/cpu/fe310/nano/nanostubs.c
@@ -45,12 +45,10 @@ void nanostubs_init(void)
 }
 
 void _init(void)
-{
-}
+{}
 
 void _fini(void)
-{
-}
+{}
 
 void *_sbrk(ptrdiff_t incr)
 {
@@ -60,7 +58,7 @@ void *_sbrk(ptrdiff_t incr)
     /* Allocate memory from heap */
     if ((heap_top + incr > &_eheap) || (heap_top + incr < &_sheap)) {
         errno = ENOMEM;
-        res = (void *) -1;
+        res = (void *)-1;
     }
     else {
         heap_top += incr;
@@ -72,9 +70,9 @@ void *_sbrk(ptrdiff_t incr)
 
 int _open(const char *name, int flags, int mode)
 {
-    (void) name;
-    (void) flags;
-    (void) mode;
+    (void)name;
+    (void)flags;
+    (void)mode;
     errno = ENODEV;
     return -1;
 }
@@ -88,9 +86,9 @@ _ssize_t _read(int fd, void *buffer, size_t count)
     errno = EBADF;
     return -1;
 #else
-    (void) fd;
-    (void) buffer;
-    (void) count;
+    (void)fd;
+    (void)buffer;
+    (void)count;
     errno = ENODEV;
     return -1;
 #endif
@@ -105,9 +103,9 @@ _ssize_t _write(int fd, const void *data, size_t count)
     errno = EBADF;
     return -1;
 #else
-    (void) fd;
-    (void) data;
-    (void) count;
+    (void)fd;
+    (void)data;
+    (void)count;
     errno = ENODEV;
     return -1;
 #endif
@@ -115,7 +113,7 @@ _ssize_t _write(int fd, const void *data, size_t count)
 
 int _close(int fd)
 {
-    (void) fd;
+    (void)fd;
     errno = ENODEV;
     return -1;
 }
@@ -133,25 +131,25 @@ int _isatty(int fd)
 
 int _fstat(int fd, struct stat *st)
 {
-    (void) fd;
-    (void) st;
+    (void)fd;
+    (void)st;
     errno = ENODEV;
     return -1;
 }
 
 _off_t _lseek(int fd, _off_t pos, int dir)
 {
-    (void) fd;
-    (void) pos;
-    (void) dir;
+    (void)fd;
+    (void)pos;
+    (void)dir;
-    (void) name;
-    (void) flags;
-    (void) mode;
+    (void)name;
+    (void)flags;
+    (void)mode;
     errno = ENODEV;
     return -1;
 }
@@ -88,9 +86,9 @@ _ssize_t _read(int fd, void *buffer, size_t count)
     errno = EBADF;
     return -1;
 #else
-    (void) fd;
-    (void) buffer;
-    (void) count;
+    (void)fd;
+    (void)buffer;
+    (void)count;
     errno = ENODEV;
     return -1;
 #endif
@@ -105,9 +103,9 @@ _ssize_t _write(int fd, const void *data, size_t count)
     errno = EBADF;
     return -1;
 #else
-    (void) fd;
-    (void) data;
-    (void) count;
+    (void)fd;
+    (void)data;
+    (void)count;
```



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15778#pullrequestreview-569248009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210115/1e33f6d3/attachment-0001.htm>


More information about the notifications mailing list