Skip to content

Commit b45e4c4

Browse files
Colin Ian KingIngo Molnar
authored andcommitted
x86: Mark various structures and functions as 'static'
Mark a couple of structures and functions as 'static', pointed out by Sparse: warning: symbol 'bts_pmu' was not declared. Should it be static? warning: symbol 'p4_event_aliases' was not declared. Should it be static? warning: symbol 'rapl_attr_groups' was not declared. Should it be static? symbol 'process_uv2_message' was not declared. Should it be static? Signed-off-by: Colin Ian King <[email protected]> Acked-by: Andrew Banman <[email protected]> # for the UV change Cc: Alexander Shishkin <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Sebastian Andrzej Siewior <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Will Deacon <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 5442c26 commit b45e4c4

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

arch/x86/events/intel/bts.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ struct bts_buffer {
6969
struct bts_phys buf[0];
7070
};
7171

72-
struct pmu bts_pmu;
72+
static struct pmu bts_pmu;
7373

7474
static size_t buf_size(struct page *page)
7575
{

arch/x86/events/intel/p4.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ static __initconst const u64 p4_hw_cache_event_ids
587587
* P4_CONFIG_ALIASABLE or bits for P4_PEBS_METRIC, they are
588588
* either up to date automatically or not applicable at all.
589589
*/
590-
struct p4_event_alias {
590+
static struct p4_event_alias {
591591
u64 original;
592592
u64 alternative;
593593
} p4_event_aliases[] = {

arch/x86/events/intel/rapl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ static struct attribute_group rapl_pmu_format_group = {
559559
.attrs = rapl_formats_attr,
560560
};
561561

562-
const struct attribute_group *rapl_attr_groups[] = {
562+
static const struct attribute_group *rapl_attr_groups[] = {
563563
&rapl_pmu_attr_group,
564564
&rapl_pmu_format_group,
565565
&rapl_pmu_events_group,

arch/x86/platform/uv/tlb_uv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
static struct bau_operations ops __ro_after_init;
2727

2828
/* timeouts in nanoseconds (indexed by UVH_AGING_PRESCALE_SEL urgency7 30:28) */
29-
static int timeout_base_ns[] = {
29+
static const int timeout_base_ns[] = {
3030
20,
3131
160,
3232
1280,
@@ -1216,7 +1216,7 @@ static struct bau_pq_entry *find_another_by_swack(struct bau_pq_entry *msg,
12161216
* set a bit in the UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE register.
12171217
* Such a message must be ignored.
12181218
*/
1219-
void process_uv2_message(struct msg_desc *mdp, struct bau_control *bcp)
1219+
static void process_uv2_message(struct msg_desc *mdp, struct bau_control *bcp)
12201220
{
12211221
unsigned long mmr_image;
12221222
unsigned char swack_vec;

0 commit comments

Comments
 (0)