Skip to content

Commit

Permalink
platform: (cosmetic) make all timer objects static
Browse files Browse the repository at this point in the history
All platform.c files contain timer objects, and some also arch_timers
and most platforms define those objects as global. Make them static.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
  • Loading branch information
lyakh authored and lgirdwood committed Sep 7, 2021
1 parent ac5ba21 commit 36cb5b3
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/platform/amd/renoir/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static const struct sof_ipc_fw_ready ready
.flags = DEBUG_SET_FW_READY_FLAGS,
};

SHARED_DATA struct timer timer = {
static SHARED_DATA struct timer timer = {
.id = TIMER0,
.irq = IRQ_NUM_TIMER0,
};
Expand Down
2 changes: 1 addition & 1 deletion src/platform/haswell/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const struct ext_man_windows xsram_window
},
};

SHARED_DATA struct timer timer = {
static SHARED_DATA struct timer timer = {
.id = TIMER1, /* internal timer */
.irq = IRQ_NUM_TIMER2,
};
Expand Down
2 changes: 1 addition & 1 deletion src/platform/imx8/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const struct ext_man_windows xsram_window
}
};

SHARED_DATA struct timer timer = {
static SHARED_DATA struct timer timer = {
.id = TIMER0, /* internal timer */
.irq = IRQ_NUM_TIMER0,
};
Expand Down
2 changes: 1 addition & 1 deletion src/platform/imx8m/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const struct ext_man_windows xsram_window
},
};

SHARED_DATA struct timer timer = {
static SHARED_DATA struct timer timer = {
.id = TIMER0, /* internal timer */
.irq = IRQ_NUM_TIMER0,
};
Expand Down
2 changes: 1 addition & 1 deletion src/platform/imx8ulp/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const struct ext_man_windows xsram_window
}
};

SHARED_DATA struct timer timer = {
static SHARED_DATA struct timer timer = {
.id = TIMER0, /* internal timer */
.irq = IRQ_NUM_TIMER0,
};
Expand Down
4 changes: 2 additions & 2 deletions src/platform/intel/cavs/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,13 @@ const int n_iomux = ARRAY_SIZE(iomux_data);

#endif

SHARED_DATA struct timer timer = {
static SHARED_DATA struct timer timer = {
.id = TIMER3, /* external timer */
.irq = IRQ_EXT_TSTAMP0_LVL2,
.irq_name = irq_name_level2,
};

SHARED_DATA struct timer arch_timers[CONFIG_CORE_COUNT];
static SHARED_DATA struct timer arch_timers[CONFIG_CORE_COUNT];

#if CONFIG_DW_SPI

Expand Down
2 changes: 1 addition & 1 deletion src/platform/library/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <sof/lib/mailbox.h>
#include <sof/lib/dai.h>

SHARED_DATA struct timer timer = {};
static SHARED_DATA struct timer timer = {};

static uint8_t mailbox[MAILBOX_DSPBOX_SIZE +
MAILBOX_HOSTBOX_SIZE +
Expand Down

0 comments on commit 36cb5b3

Please sign in to comment.