Skip to content

Commit f8ab455

Browse files
committed
Trivial: style
Signed-off-by: Lucy <lucyparker544@gmail.com>
1 parent 555485b commit f8ab455

12 files changed

Lines changed: 50 additions & 205 deletions

File tree

.github/workflows/push.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,3 @@ jobs:
3131
runs-on: ubuntu-latest
3232
steps:
3333
- uses: seL4/ci-actions/style@master
34-
with:
35-
diff_only: true

.github/workflows/trigger.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,3 @@ add_subdirectory(libvswitch)
1717
add_subdirectory(libfdtgen)
1818
add_subdirectory(libtx2bpmp)
1919
add_subdirectory(libplatsupportports)
20-
add_subdirectory(libsharedringbuffer)

libsharedringbuffer/CMakeLists.txt

Lines changed: 0 additions & 26 deletions
This file was deleted.

libsharedringbuffer/README.md

Lines changed: 0 additions & 66 deletions
This file was deleted.

libsharedringbuffer/include/shared_ringbuffer/shared_ringbuffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ static inline int dequeue_used(ring_handle_t *ring, uintptr_t *addr, size_t *len
211211
/**
212212
* Dequeue an element from a ring buffer.
213213
* This function is intended for use by the driver, to collect a pointer
214-
* into this structure to be passed around as a cookie.
214+
* into this structure to be passed around as a cookie.
215215
*
216216
* @param ring Ring buffer to dequeue from.
217217
* @param addr pointer to the address of where to store buffer address.

libsharedringbuffer/src/shared_ringbuffer.c

Lines changed: 0 additions & 20 deletions
This file was deleted.

libusbdrivers/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,4 @@ if(LibUSB)
2828
add_library(usbdrivers STATIC EXCLUDE_FROM_ALL ${deps})
2929
target_include_directories(usbdrivers PUBLIC include plat_include/${KernelPlatform})
3030
target_link_libraries(usbdrivers sel4 muslc platsupport usbdrivers_Config lwip_Config)
31-
if(LibLwip)
32-
target_link_libraries(usbdrivers lwip)
33-
endif()
3431
endif()

libusbdrivers/src/drivers/lan9730.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
#include <netif/etharp.h>
2424
#include <lwip/stats.h>
25-
#include <lwip/snmp.h>
2625

2726
#include "../services.h"
2827

libusbdrivers/src/services.h

Lines changed: 45 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
*/
66
#pragma once
77

8-
#include <platsupport/delay.h>
9-
#include <platsupport/io.h>
108
#include <stdlib.h>
11-
#include <usb/usb_host.h>
9+
#include <platsupport/io.h>
10+
#include <platsupport/delay.h>
1211
#include <utils/ansi.h>
1312
#include <utils/util.h>
1413
#include <utils/zf_log.h>
14+
#include <usb/usb_host.h>
1515

1616
void otg_irq(void);
1717

@@ -21,64 +21,65 @@ void otg_irq(void);
2121
extern ps_malloc_ops_t *ps_malloc_ops;
2222
static inline void *usb_malloc(size_t size)
2323
{
24-
int ret;
24+
int ret;
2525

26-
if (ps_malloc_ops && ps_malloc_ops->calloc) {
27-
void *ptr;
28-
ret = ps_calloc(ps_malloc_ops, 1, size, &ptr);
29-
if (0 != ret) {
30-
ZF_LOGF("Malloc error %d\n", ret);
31-
}
32-
return ptr;
33-
} else {
34-
return calloc(1, size);
35-
}
26+
if (ps_malloc_ops && ps_malloc_ops->calloc) {
27+
void *ptr;
28+
ret = ps_calloc(ps_malloc_ops, 1, size, &ptr);
29+
if (!ret) {
30+
ZF_LOGF("Malloc error\n");
31+
}
32+
return ptr;
33+
} else {
34+
return calloc(1, size);
35+
}
3636
}
3737

3838
static inline void usb_free(void *ptr)
3939
{
40-
int ret;
40+
int ret;
4141

42-
if (ps_malloc_ops && ps_malloc_ops->free) {
43-
ret = ps_free(ps_malloc_ops, 1, ptr);
44-
if (!ret) {
45-
ZF_LOGF("Free error\n");
46-
}
47-
} else {
48-
free(ptr);
49-
}
42+
if (ps_malloc_ops && ps_malloc_ops->free) {
43+
ret = ps_free(ps_malloc_ops, 1, ptr);
44+
if (!ret) {
45+
ZF_LOGF("Free error\n");
46+
}
47+
} else {
48+
free(ptr);
49+
}
5050
}
5151

5252
static inline void dsb()
5353
{
5454
#ifdef ARCH_ARM
55-
asm volatile("dsb");
55+
asm volatile("dsb");
5656
#else
57-
asm volatile("" ::
58-
: "memory");
57+
asm volatile ("" ::: "memory");
5958
#endif
6059
}
6160

62-
static inline void *ps_dma_alloc_pinned(ps_dma_man_t *dma_man, size_t size,
63-
int align, int cache,
64-
ps_mem_flags_t flags, uintptr_t *paddr)
61+
static inline void *ps_dma_alloc_pinned(ps_dma_man_t * dma_man, size_t size,
62+
int align, int cache,
63+
ps_mem_flags_t flags, uintptr_t * paddr)
6564
{
66-
void *addr;
67-
if (!dma_man) {
68-
ZF_LOGF("Invalid arguments\n");
69-
}
70-
addr = ps_dma_alloc(dma_man, size, align, cache, flags);
71-
if (addr != NULL) {
72-
*paddr = ps_dma_pin(dma_man, addr, size);
73-
}
74-
return addr;
65+
void *addr;
66+
if (!dma_man) {
67+
ZF_LOGF("Invalid arguments\n");
68+
}
69+
addr = ps_dma_alloc(dma_man, size, align, cache, flags);
70+
if (addr != NULL) {
71+
*paddr = ps_dma_pin(dma_man, addr, size);
72+
}
73+
return addr;
7574
}
7675

77-
static inline void ps_dma_free_pinned(ps_dma_man_t *dma_man, void *addr, size_t size)
76+
static inline void
77+
ps_dma_free_pinned(ps_dma_man_t * dma_man, void *addr, size_t size)
7878
{
79-
if (!dma_man) {
80-
ZF_LOGF("Invalid arguments\n");
81-
}
82-
ps_dma_unpin(dma_man, addr, size);
83-
ps_dma_free(dma_man, addr, size);
79+
if (!dma_man) {
80+
ZF_LOGF("Invalid arguments\n");
81+
}
82+
ps_dma_unpin(dma_man, addr, size);
83+
ps_dma_free(dma_man, addr, size);
8484
}
85+

0 commit comments

Comments
 (0)