bsps/shared/*: Address unused parameter warnings

Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
This commit is contained in:
Joel Sherrill
2025-10-10 14:18:59 -05:00
committed by Gedare Bloom
parent 1339ef1b10
commit bc959e983f
39 changed files with 234 additions and 0 deletions

View File

@@ -47,6 +47,8 @@
bool __atomic_test_and_set( volatile void *mem, int access )
{
(void) access;
volatile uint8_t *lock = (volatile uint8_t *) mem;
rtems_interrupt_level level;
uint8_t value;

View File

@@ -181,6 +181,9 @@ rtems_cache_flush_multiple_data_lines( const void * d_addr, size_t n_bytes )
d_addr = (void *)((size_t)d_addr + CPU_DATA_CACHE_ALIGNMENT);
}
#endif
#else
(void) d_addr;
(void) n_bytes;
#endif
}
@@ -215,6 +218,9 @@ rtems_cache_invalidate_multiple_data_lines( const void * d_addr, size_t n_bytes
d_addr = (void *)((size_t)d_addr + CPU_DATA_CACHE_ALIGNMENT);
}
#endif
#else
(void) d_addr;
(void) n_bytes;
#endif
}
@@ -268,6 +274,8 @@ rtems_cache_get_data_cache_size( uint32_t level )
#if defined(CPU_CACHE_SUPPORT_PROVIDES_CACHE_SIZE_FUNCTIONS)
return _CPU_cache_get_data_cache_size( level );
#else
(void) level;
return 0;
#endif
}
@@ -406,6 +414,9 @@ rtems_cache_invalidate_multiple_instruction_lines(
#else
_CPU_cache_invalidate_instruction_range( i_addr, n_bytes );
#endif
#else
(void) i_addr;
(void) n_bytes;
#endif
}
@@ -444,6 +455,8 @@ rtems_cache_get_instruction_cache_size( uint32_t level )
#if defined(CPU_CACHE_SUPPORT_PROVIDES_CACHE_SIZE_FUNCTIONS)
return _CPU_cache_get_instruction_cache_size( level );
#else
(void) level;
return 0;
#endif
}

View File

@@ -46,6 +46,8 @@ static struct timecounter raspberrypi_tc;
static uint32_t raspberrypi_clock_get_timecount(struct timecounter *tc)
{
(void) tc;
return BCM2835_REG(BCM2835_GPU_TIMER_CLO);
}

View File

@@ -36,6 +36,8 @@ void *clock_driver_sim_idle_body(
uintptr_t ignored
)
{
(void) ignored;
for( ; ; ) {
Per_CPU_Control *cpu = _Thread_Dispatch_disable();
_ISR_Nest_level++;

View File

@@ -13,6 +13,7 @@
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
@@ -529,6 +530,8 @@ static rtems_timer_service_routine disp_hcms29xx_timer_sr
| <none used> |
\*=========================================================================*/
{
(void) id;
disp_hcms29xx_drv_t *softc_ptr = arg;
rtems_event_send(softc_ptr->disp_param.task_id, DISP_HCMS29XX_EVENT_TIMER);
@@ -552,6 +555,8 @@ static rtems_task disp_hcms29xx_update_task
| <never exits> |
\*=========================================================================*/
{
(void) argument;
rtems_event_set my_events;
rtems_status_code rc = RTEMS_SUCCESSFUL;
int disp_offset = 0;
@@ -748,6 +753,10 @@ rtems_device_driver disp_hcms29xx_dev_initialize
* Initialize and register the device
*/
{
(void) major;
(void) minor;
(void) arg;
rtems_status_code rc = RTEMS_SUCCESSFUL;
disp_hcms29xx_drv_t *softc_ptr = &disp_hcms29xx_drv_tbl;
@@ -825,6 +834,10 @@ rtems_device_driver disp_hcms29xx_dev_open
| rtems_status_code |
\*=========================================================================*/
{
(void) major;
(void) minor;
(void) arg;
disp_hcms29xx_drv_t *softc_ptr = &disp_hcms29xx_drv_tbl;
/*
* ensure, that disp_hcms29xx device is assumed to be empty
@@ -854,6 +867,9 @@ rtems_device_driver disp_hcms29xx_dev_write
| rtems_status_code |
\*=========================================================================*/
{
(void) major;
(void) minor;
rtems_libio_rw_args_t *args = arg;
uint32_t cnt;
disp_hcms29xx_drv_t *softc_ptr = &disp_hcms29xx_drv_tbl;
@@ -909,6 +925,9 @@ rtems_device_driver disp_hcms29xx_dev_close
| rtems_status_code |
\*=========================================================================*/
{
(void) major;
(void) minor;
(void) arg;
return RTEMS_SUCCESSFUL;
}

View File

@@ -150,6 +150,8 @@ static void fsl_edma_interrupt_handler(void *arg)
static void edma_interrupt_error_handler(void *arg)
{
(void) arg;
rtems_chain_control *chain = &edma_channel_chain;
rtems_chain_node *node = rtems_chain_first(chain);
@@ -351,6 +353,8 @@ static rtems_status_code fsl_edma_install_obtained_channel(
ctx
);
#elif defined(LIBBSP_ARM_IMXRT_BSP_H)
(void) irq_priority;
sc = rtems_interrupt_handler_install(
DMA0_DMA16_IRQn + (channel_index % 16),
"eDMA Channel",

View File

@@ -83,6 +83,8 @@ static rtems_status_code
i2c_2b_eeprom_write (rtems_device_major_number major,
rtems_device_minor_number minor, void *arg)
{
(void) major;
rtems_libio_rw_args_t *rwargs = arg;
unsigned off = rwargs->offset;
int cnt = rwargs->count;
@@ -131,6 +133,8 @@ static rtems_status_code
i2c_2b_eeprom_read (rtems_device_major_number major,
rtems_device_minor_number minor, void *arg)
{
(void) major;
int sc;
rtems_libio_rw_args_t *rwargs = arg;

View File

@@ -60,6 +60,9 @@ static rtems_status_code
ds1621_init (rtems_device_major_number major, rtems_device_minor_number minor,
void *arg)
{
(void) major;
(void) arg;
int sc;
unsigned char csr[2] = { DS1621_CMD_CSR_ACCESS, 0 }, cmd;
@@ -97,6 +100,8 @@ static rtems_status_code
ds1621_read (rtems_device_major_number major, rtems_device_minor_number minor,
void *arg)
{
(void) major;
int sc;
rtems_libio_rw_args_t *rwargs = arg;
unsigned char cmd = DS1621_CMD_READ_TEMP;

View File

@@ -43,6 +43,8 @@ static rtems_status_code i2c_sc620_write(
void *arg
)
{
(void) major;
rtems_status_code sc = RTEMS_IO_ERROR;
rtems_libio_rw_args_t *rw = arg;
unsigned char *buf = (unsigned char *) &rw->buffer[0];
@@ -69,6 +71,8 @@ static rtems_status_code i2c_sc620_read(
void *arg
)
{
(void) major;
rtems_status_code sc = RTEMS_IO_ERROR;
rtems_libio_rw_args_t *rw = arg;
unsigned char *buf = (unsigned char *) &rw->buffer[0];

View File

@@ -135,6 +135,8 @@ rtems_status_code spi_memdrv_write
| o = ok or error code |
\*=========================================================================*/
{
(void) major;
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *rwargs = arg;
off_t off = rwargs->offset;
@@ -321,6 +323,8 @@ rtems_status_code spi_memdrv_read
| o = ok or error code |
\*=========================================================================*/
{
(void) major;
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *rwargs = arg;
off_t off = rwargs->offset;

View File

@@ -514,6 +514,8 @@ ata_non_data_request_done(ata_req_t *areq,
rtems_device_minor_number ctrl_minor,
rtems_status_code status, int info)
{
(void) ctrl_minor;
#if ATA_DEBUG
ata_printf("ata_non_data_request_done: entry\n");
#endif
@@ -629,6 +631,7 @@ static void ata_interrupt_handler(rtems_irq_hdl_param handle)
static void ata_interrupt_on(const rtems_irq_connect_data *ptr)
{
(void) ptr;
/* enable ATA device interrupt */
ide_controller_write_register(0,
@@ -640,6 +643,7 @@ static void ata_interrupt_on(const rtems_irq_connect_data *ptr)
static void ata_interrupt_off(const rtems_irq_connect_data *ptr)
{
(void) ptr;
/* disable ATA device interrupt */
ide_controller_write_register(0,
@@ -651,6 +655,8 @@ static void ata_interrupt_off(const rtems_irq_connect_data *ptr)
static int ata_interrupt_isOn(const rtems_irq_connect_data *ptr)
{
(void) ptr;
uint16_t byte; /* emphasize that only 8 low bits is meaningful */
/* return int. status od ATA device */
@@ -794,6 +800,8 @@ ata_pio_out_protocol(rtems_device_minor_number ctrl_minor, ata_req_t *areq)
static rtems_task
ata_queue_task(rtems_task_argument arg)
{
(void) arg;
ata_queue_msg_t msg;
size_t size;
ata_req_t *areq;
@@ -1060,6 +1068,8 @@ static void ata_execute_device_diagnostic(
else
#endif
{
(void) sector_buffer;
ATA_DEV_INFO(ctrl_minor, 0).present = true;
ATA_DEV_INFO(ctrl_minor,1).present = true;
}
@@ -1083,6 +1093,10 @@ rtems_ata_initialize(rtems_device_major_number major,
rtems_device_minor_number minor_arg,
void *args)
{
(void) major;
(void) minor_arg;
(void) args;
uint32_t ctrl_minor;
rtems_status_code status;
uint16_t *buffer;

View File

@@ -48,6 +48,10 @@ ide_controller_initialize(rtems_device_major_number major,
rtems_device_minor_number minor_arg,
void *args)
{
(void) major;
(void) minor_arg;
(void) args;
unsigned long minor;
/* FIXME: may be it should be done on compilation phase */

View File

@@ -295,6 +295,8 @@ static void i2c_rtc_init(int minor)
bool i2c_rtc_probe(int minor)
{
(void) minor;
return true;
}

View File

@@ -60,6 +60,8 @@ static void m48t08_initialize(
int minor
)
{
(void) minor;
}
/*

View File

@@ -60,6 +60,10 @@ rtems_device_driver rtc_initialize(
void *arg
)
{
(void) major;
(void) minor_arg;
(void) arg;
rtems_device_minor_number minor;
rtems_status_code status;
@@ -132,6 +136,9 @@ rtems_device_driver rtc_read(
void *arg
)
{
(void) major;
(void) minor;
int rv = 0;
rtems_libio_rw_args_t *rw = arg;
rtems_time_of_day *tod = (rtems_time_of_day *) rw->buffer;
@@ -166,6 +173,9 @@ rtems_device_driver rtc_write(
void *arg
)
{
(void) major;
(void) minor;
int rv = 0;
rtems_libio_rw_args_t *rw = arg;
const rtems_time_of_day *tod = (const rtems_time_of_day *) rw->buffer;
@@ -200,6 +210,10 @@ rtems_device_driver rtc_open(
void *arg
)
{
(void) major;
(void) minor;
(void) arg;
return RTEMS_SUCCESSFUL;
}
@@ -209,6 +223,10 @@ rtems_device_driver rtc_close(
void *arg
)
{
(void) major;
(void) minor;
(void) arg;
return RTEMS_SUCCESSFUL;
}
@@ -218,6 +236,10 @@ rtems_device_driver rtc_control(
void *arg
)
{
(void) major;
(void) minor;
(void) arg;
return RTEMS_NOT_IMPLEMENTED;
}

View File

@@ -36,5 +36,7 @@ bool rtc_probe(
int minor
)
{
(void) minor;
return true;
}

View File

@@ -77,6 +77,9 @@ rtems_device_driver console_initialize(
void *arg
)
{
(void) minor;
(void) arg;
rtems_status_code status;
/*
@@ -131,6 +134,10 @@ rtems_device_driver console_close(
void * arg
)
{
(void) major;
(void) minor;
(void) arg;
return rtems_termios_close( arg );
}
@@ -140,6 +147,10 @@ rtems_device_driver console_read(
void * arg
)
{
(void) major;
(void) minor;
(void) arg;
return rtems_termios_read( arg );
}
@@ -149,6 +160,10 @@ rtems_device_driver console_write(
void * arg
)
{
(void) major;
(void) minor;
(void) arg;
return rtems_termios_write( arg );
}
@@ -158,5 +173,9 @@ rtems_device_driver console_control(
void * arg
)
{
(void) major;
(void) minor;
(void) arg;
return rtems_termios_ioctl( arg );
}

View File

@@ -45,6 +45,9 @@ rtems_device_driver console_initialize(
void *arg
)
{
(void) major;
(void) arg;
bool console_device_done = false;
rtems_termios_initialize();

View File

@@ -60,5 +60,8 @@ rtems_device_driver console_control(
void * arg
)
{
(void) major;
(void) minor;
return rtems_termios_ioctl (arg);
}

View File

@@ -298,6 +298,8 @@ rtems_device_driver console_close(
void * arg
)
{
(void) major;
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *current_tty;
console_tbl *cptr;
@@ -332,6 +334,10 @@ rtems_device_driver console_initialize(
void *arg
)
{
(void) major;
(void) minor_arg;
(void) arg;
rtems_status_code status;
rtems_device_minor_number minor;
console_tbl *port;
@@ -407,6 +413,9 @@ rtems_device_driver console_read(
void * arg
)
{
(void) major;
(void) minor;
return rtems_termios_read (arg);
}
@@ -421,5 +430,8 @@ rtems_device_driver console_write(
void * arg
)
{
(void) major;
(void) minor;
return rtems_termios_write (arg);
}

View File

@@ -290,6 +290,9 @@ MC68681_STATIC int mc68681_open(
void *arg
)
{
(void) major;
(void) arg;
uint32_t pMC68681;
uint32_t pMC68681_port;
unsigned int baud;
@@ -347,6 +350,9 @@ MC68681_STATIC int mc68681_close(
void *arg
)
{
(void) major;
(void) arg;
uint32_t pMC68681_port;
setRegister_f setReg;

View File

@@ -427,6 +427,10 @@ static void ns16550_initialize_interrupts(
rtems_fatal_error_occurred( 0xdeadbeef);
}
}
#else
(void) tty;
(void) ctx;
(void) isr;
#endif
}
@@ -441,6 +445,9 @@ static bool ns16550_open(
rtems_libio_open_close_args_t *args
)
{
(void) term;
(void) args;
ns16550_context *ctx = (ns16550_context *) base;
ctx->tty = tty;
@@ -490,6 +497,10 @@ static void ns16550_cleanup_interrupts(
printk("%s: Error: Remove interrupt handler\n", __func__);
rtems_fatal_error_occurred(0xdeadbeef);
}
#else
(void) tty;
(void) ctx;
(void) isr;
#endif
}
@@ -503,6 +514,8 @@ static void ns16550_close(
rtems_libio_open_close_args_t *args
)
{
(void) args;
ns16550_context *ctx = (ns16550_context *) base;
ns16550_enable_interrupts(ctx, NS16550_DISABLE_ALL_INTR);

View File

@@ -311,6 +311,9 @@ int ns16550_open(
void *arg
)
{
(void) major;
(void) arg;
rtems_libio_open_close_args_t *oc = (rtems_libio_open_close_args_t *) arg;
struct rtems_termios_tty *tty = (struct rtems_termios_tty *) oc->iop->data1;
console_tbl *c = Console_Port_Tbl [minor];
@@ -344,6 +347,9 @@ int ns16550_close(
void * arg
)
{
(void) major;
(void) arg;
console_tbl *c = Console_Port_Tbl [minor];
/*
@@ -792,6 +798,8 @@ NS16550_STATIC void ns16550_initialize_interrupts( int minor)
rtems_fatal_error_occurred( 0xdeadbeef);
}
}
#else
(void) minor;
#endif
}
@@ -824,6 +832,8 @@ NS16550_STATIC void ns16550_cleanup_interrupts(int minor)
printk("%s: Error: Remove interrupt handler\n", __func__);
rtems_fatal_error_occurred(0xdeadbeef);
}
#else
(void) minor;
#endif
}

View File

@@ -43,6 +43,8 @@
static void BSP_output_char_f(char c)
{
(void) c;
/* the character just needs to disappear */
}

View File

@@ -4,6 +4,8 @@
bool libchip_serial_default_probe(int minor)
{
(void) minor;
/*
* If the configuration dependent probe has located the device then
* assume it is there

View File

@@ -215,6 +215,8 @@ Z85C30_STATIC int z85c30_open(
void *arg
)
{
(void) major;
(void) arg;
z85c30_initialize_port(minor);
@@ -239,6 +241,9 @@ Z85C30_STATIC int z85c30_close(
void *arg
)
{
(void) major;
(void) arg;
/*
* Negate DTR
*/

View File

@@ -67,6 +67,9 @@ static bool zynq_uart_first_open(
rtems_libio_open_close_args_t *args
)
{
(void) term;
(void) args;
zynq_uart_context *ctx = (zynq_uart_context *) base;
volatile zynq_uart *regs = ctx->regs;
#ifdef ZYNQ_CONSOLE_USE_INTERRUPTS
@@ -103,6 +106,8 @@ static void zynq_uart_last_close(
rtems_libio_open_close_args_t *args
)
{
(void) args;
zynq_uart_context *ctx = (zynq_uart_context *) base;
rtems_interrupt_handler_remove(ctx->irq, zynq_uart_interrupt, tty);

View File

@@ -302,6 +302,8 @@ static int cadence_spi_check_messages(
const spi_ioc_transfer *msg,
uint32_t size)
{
(void) bus;
while(size > 0) {
if (msg->bits_per_word != 8) {
return -EINVAL;

View File

@@ -41,6 +41,8 @@ static int xqspi_get_flash_type(
rtems_flashdev_flash_type *type
)
{
(void) flash;
*type = RTEMS_FLASHDEV_NOR;
return 0;
}
@@ -52,6 +54,8 @@ static int xqspi_read_wrapper(
void *buffer
)
{
(void) flash;
XQspiPsu *flash_driver = (XQspiPsu*)flash->driver;
return QspiPsu_NOR_Read(flash_driver, (uint32_t)offset, (uint32_t)count, buffer);
}

View File

@@ -275,6 +275,10 @@ static void QspiPsuHandler(
unsigned int ByteCount
)
{
(void) CallBackRef;
(void) StatusEvent;
(void) ByteCount;
/* Indicate the transfer on the QSPIPSU bus is no longer in progress */
if (StatusEvent == XST_SPI_TRANSFER_DONE) {
(void) rtems_event_transient_send(TransferTask);
@@ -2331,5 +2335,7 @@ u32 QspiPsu_NOR_Get_Page_Size(XQspiPsu *QspiPsuPtr)
u32 QspiPsu_NOR_Get_JEDEC_ID(XQspiPsu *QspiPsuPtr)
{
(void) QspiPsuPtr;
return Flash_Config_Table[FCTIndex].jedec_id;
}

View File

@@ -42,6 +42,9 @@ rtems_status_code bsp_interrupt_get_attributes(
rtems_interrupt_attributes *attributes
)
{
(void) vector;
(void) attributes;
return RTEMS_SUCCESSFUL;
}
@@ -50,6 +53,8 @@ rtems_status_code bsp_interrupt_is_pending(
bool *pending
)
{
(void) vector;
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
bsp_interrupt_assert(pending != NULL);
*pending = false;
@@ -58,12 +63,16 @@ rtems_status_code bsp_interrupt_is_pending(
rtems_status_code bsp_interrupt_raise(rtems_vector_number vector)
{
(void) vector;
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
return RTEMS_UNSATISFIED;
}
rtems_status_code bsp_interrupt_clear(rtems_vector_number vector)
{
(void) vector;
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
return RTEMS_UNSATISFIED;
}
@@ -73,6 +82,8 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
bool *enabled
)
{
(void) vector;
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
bsp_interrupt_assert(enabled != NULL);
*enabled = false;
@@ -98,6 +109,9 @@ rtems_status_code bsp_interrupt_set_priority(
uint32_t priority
)
{
(void) vector;
(void) priority;
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
return RTEMS_UNSATISFIED;
}
@@ -107,6 +121,9 @@ rtems_status_code bsp_interrupt_get_priority(
uint32_t *priority
)
{
(void) vector;
(void) priority;
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
bsp_interrupt_assert(priority != NULL);
return RTEMS_UNSATISFIED;

View File

@@ -127,6 +127,8 @@ int BSP_remove_rtems_irq_handler(const rtems_irq_connect_data *cd)
*/
int BSP_rtems_irq_mngt_set(rtems_irq_global_settings *config)
{
(void) config;
return 0;
}

View File

@@ -112,6 +112,8 @@ static void bsp_interrupt_server_per_handler_routine(
void *handler_arg
)
{
(void) info;
if (handler == bsp_interrupt_server_trigger) {
bsp_interrupt_server_iterate_entry *ie = iterate_arg;
@@ -379,6 +381,8 @@ rtems_status_code rtems_interrupt_server_handler_install(
void *arg
)
{
(void) info;
rtems_status_code sc;
rtems_interrupt_server_control *s;

View File

@@ -43,6 +43,9 @@
static int bsp_interrupt_shell_main(int argc, char **argv)
{
(void) argc;
(void) argv;
rtems_printer printer;
rtems_print_printer_printf(&printer);
bsp_interrupt_report_with_plugin(&printer);

View File

@@ -511,6 +511,8 @@ static phandle_t rtems_ofw_get_effective_phandle(
phandle_t xref
)
{
(void) node;
phandle_t child;
phandle_t ref;
int node_offset;

View File

@@ -43,6 +43,9 @@ void MPCI_Fatal(
rtems_fatal_code error
)
{
(void) source;
(void) always_set_to_false;
/* Eventually need to attempt to broadcast a K_FATAL message
* without checking for all possible errors (do not want to
* recurse).

View File

@@ -50,6 +50,8 @@ void bsp_fatal_extension(
rtems_fatal_code code
)
{
(void) always_set_to_false;
#if defined(RTEMS_SMP)
if (
source == RTEMS_FATAL_SOURCE_SMP &&

View File

@@ -42,6 +42,8 @@
void * sbrk(ptrdiff_t incr)
{
(void) incr;
errno = ENOMEM;
return (void *)-1;
}

View File

@@ -45,6 +45,8 @@ static Heap_Control bsp_stack_heap;
void bsp_stack_allocate_init(size_t stack_space_size)
{
(void) stack_space_size;
_Heap_Initialize(
&bsp_stack_heap,
bsp_section_stack_begin,