Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib/system/nuttx: fix undeclared parameter compile error #315

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/system/nuttx/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@

int metal_generic_dev_sys_open(struct metal_device *dev)
{
metal_unused(dev);
return 0;
}
1 change: 1 addition & 0 deletions lib/system/nuttx/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ int metal_sys_init(const struct metal_init_params *params)
{
int ret = metal_cntr_irq_init();

metal_unused(params);
if (ret >= 0)
ret = metal_bus_register(&metal_generic_bus);
return ret;
Expand Down
6 changes: 6 additions & 0 deletions lib/system/nuttx/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ static uint64_t metal_io_read_(struct metal_io_region *io,
{
uint64_t value = 0;

metal_unused(order);
metal_io_block_read(io, offset, &value, width);
return value;
}
Expand All @@ -25,6 +26,7 @@ static void metal_io_write_(struct metal_io_region *io,
memory_order order,
int width)
{
metal_unused(order);
metal_io_block_write(io, offset, &value, width);
}

Expand All @@ -36,6 +38,7 @@ static int metal_io_block_read_(struct metal_io_region *io,
{
void *va = metal_io_virt(io, offset);

metal_unused(order);
metal_cache_invalidate(va, len);
if (len == 1)
*(uint8_t *)dst = *(uint8_t *)va;
Expand All @@ -60,6 +63,7 @@ static int metal_io_block_write_(struct metal_io_region *io,
{
void *va = metal_io_virt(io, offset);

metal_unused(order);
if (len == 1)
*(uint8_t *)va = *(uint8_t *)src;
else if (len == 2)
Expand All @@ -85,12 +89,14 @@ static void metal_io_block_set_(struct metal_io_region *io,
{
void *va = metal_io_virt(io, offset);

metal_unused(order);
memset(va, value, len);
metal_cache_flush(va, len);
}

static void metal_io_close_(struct metal_io_region *io)
{
metal_unused(io);
}

static metal_phys_addr_t metal_io_offset_to_phys_(struct metal_io_region *io,
Expand Down
3 changes: 3 additions & 0 deletions lib/system/nuttx/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#ifndef __METAL_NUTTX_IO__H__
#define __METAL_NUTTX_IO__H__

#include <metal/utilities.h>

#ifdef __cplusplus
extern "C" {
#endif
Expand All @@ -39,6 +41,7 @@ struct metal_io_region *metal_io_get_region(void);
*/
static inline void metal_sys_io_mem_map(struct metal_io_region *io)
{
metal_unused(io);
}
#endif

Expand Down
Loading