mirror of https://github.com/thesofproject/sof.git
sof: check for missing prototypes
gcc -Wall is not enough, add -Wmissing-prototypes to align with kernel warnings. Add relevant includes and move functions without prototype as static Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This commit is contained in:
parent
0ffc585dff
commit
d46dd3567d
|
@ -18,7 +18,7 @@ AC_DEFINE_UNQUOTED([REEF_MINOR], reef_minor, [Reef minor version])
|
|||
AC_CANONICAL_HOST
|
||||
|
||||
# General compiler flags
|
||||
CFLAGS="${CFLAGS:+$CFLAGS } -O2 -g -Wall -Werror -Wl,-EL -fno-inline-functions -nostdlib"
|
||||
CFLAGS="${CFLAGS:+$CFLAGS } -O2 -g -Wall -Werror -Wl,-EL -fno-inline-functions -nostdlib -Wmissing-prototypes"
|
||||
|
||||
# Cross compiler tool libgcc and headers
|
||||
AC_ARG_WITH([root-dir],
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <reef/interrupt.h>
|
||||
#include <platform/platform.h>
|
||||
#include <reef/debug.h>
|
||||
#include <arch/task.h>
|
||||
#include <stdint.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
|
|
@ -52,21 +52,21 @@ int sof_rates[SOF_RATES_LENGTH] = {8000, 11025, 12000, 16000, 18900,
|
|||
192000};
|
||||
|
||||
/* Calculates the needed FIR delay line length */
|
||||
int src_fir_delay_length(struct src_stage *s)
|
||||
static int src_fir_delay_length(struct src_stage *s)
|
||||
{
|
||||
return s->subfilter_length + (s->num_of_subfilters - 1) * s->idm
|
||||
+ s->blk_in;
|
||||
}
|
||||
|
||||
/* Calculates the FIR output delay line length */
|
||||
int src_out_delay_length(struct src_stage *s)
|
||||
static int src_out_delay_length(struct src_stage *s)
|
||||
{
|
||||
|
||||
return (s->num_of_subfilters - 1) * s->odm + 1;
|
||||
}
|
||||
|
||||
/* Returns index of a matching sample rate */
|
||||
int src_find_fs(int fs_list[], int list_length, int fs)
|
||||
static int src_find_fs(int fs_list[], int list_length, int fs)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
|
@ -38,4 +38,6 @@ int main(int argc, char *argv[]);
|
|||
|
||||
int arch_init(struct reef *reef);
|
||||
|
||||
void __memmap_init(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -79,7 +79,7 @@ static inline void interrupt_global_enable(uint32_t flags)
|
|||
arch_interrupt_global_enable(flags);
|
||||
}
|
||||
|
||||
uint32_t platform_interrupt_get_enabled();
|
||||
uint32_t platform_interrupt_get_enabled(void);
|
||||
void platform_interrupt_clear(uint32_t irq, uint32_t mask);
|
||||
void platform_interrupt_mask(uint32_t irq, uint32_t mask);
|
||||
void platform_interrupt_unmask(uint32_t irq, uint32_t mask);
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include <reef/wait.h>
|
||||
#include <reef/trace.h>
|
||||
#include <platform/interrupt.h>
|
||||
#include <platform/pmc.h>
|
||||
#include <platform/shim.h>
|
||||
|
||||
|
||||
|
|
|
@ -159,7 +159,7 @@ static uint32_t sch_work(void *data, uint32_t delay)
|
|||
* Schedule task with the earliest deadline from task list.
|
||||
* Can run in IRQ context.
|
||||
*/
|
||||
struct task *schedule_edf(void)
|
||||
static struct task *schedule_edf(void)
|
||||
{
|
||||
struct task *task;
|
||||
struct task *next_plus1_task = NULL;
|
||||
|
@ -201,8 +201,9 @@ struct task *schedule_edf(void)
|
|||
return next_plus1_task;
|
||||
}
|
||||
|
||||
#if 0 /* FIXME: is this needed ? */
|
||||
/* delete task from scheduler */
|
||||
int schedule_task_del(struct task *task)
|
||||
static int schedule_task_del(struct task *task)
|
||||
{
|
||||
uint32_t flags;
|
||||
int ret = 0;
|
||||
|
@ -225,6 +226,7 @@ out:
|
|||
spin_unlock_irq(&sch->lock, flags);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Add a new task to the scheduler to be run and define a scheduling
|
||||
|
@ -285,7 +287,7 @@ void schedule_task_complete(struct task *task)
|
|||
spin_unlock_irq(&sch->lock, flags);
|
||||
}
|
||||
|
||||
void scheduler_run(void *unused)
|
||||
static void scheduler_run(void *unused)
|
||||
{
|
||||
struct task *next_task;
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include <reef/mailbox.h>
|
||||
#include <reef/dai.h>
|
||||
#include <reef/dma.h>
|
||||
#include <reef/interrupt.h>
|
||||
#include <reef/reef.h>
|
||||
#include <reef/work.h>
|
||||
#include <reef/clock.h>
|
||||
|
|
|
@ -44,7 +44,7 @@ struct timer_data {
|
|||
|
||||
static struct timer_data xtimer[1] = {};
|
||||
|
||||
void platform_timer_64_handler(void *arg)
|
||||
static void platform_timer_64_handler(void *arg)
|
||||
{
|
||||
struct timer *timer = arg;
|
||||
struct timer_data *tdata = timer->timer_data;
|
||||
|
|
Loading…
Reference in New Issue