Skip to contentSkip to conversation

x86/tsc: Make art_related_clocksource static

PATCH Applied Chen Lifu 2 participants 3 messages Aug 23, 2022 – Oct 17, 2022 x86

lore
Share & tools
lore

Chen Lifu

author
#0 lore raw

PATCH 1/1 x86/tsc: Make art_related_clocksource static

The symbol is not used outside of the file, so mark it static.

Fixes the following warning:

arch/x86/kernel/tsc.c:53:20: warning:
symbol 'art_related_clocksource' was not declared. Should it be static?

---
 arch/x86/kernel/tsc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/tsc.c +1 -1
index cafacb2e58cc..a78e73da4a74 100644
@@ -49,11 +49,11 @@ static DEFINE_STATIC_KEY_FALSE(__use_tsc);
 int tsc_clocksource_reliable;
 
 static u32 art_to_tsc_numerator;
 static u32 art_to_tsc_denominator;
 static u64 art_to_tsc_offset;
-struct clocksource *art_related_clocksource;
+static struct clocksource *art_related_clocksource;
 
 struct cyc2ns {
 	struct cyc2ns_data data[2];	/*  0 + 2*16 = 32 */
 	seqcount_latch_t   seq;		/* 32 + 4    = 36 */
 
Signature · 1 line
2.37.1
author
#1 lore raw
Quoted 19 lines · Chen Lifu

The symbol is not used outside of the file, so mark it static.

Fixes the following warning:

arch/x86/kernel/tsc.c:53:20: warning:
symbol 'art_related_clocksource' was not declared. Should it be static?

---
  arch/x86/kernel/tsc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/tsc.c +0 -0
index cafacb2e58cc..a78e73da4a74 100644
@@ -49,11 +49,11 @@ static DEFINE_STATIC_KEY_FALSE(__use_tsc);
  int tsc_clocksource_reliable;
 

arch/x86/kernel/tsc.c static DEFINE_STATIC_KEY_FALSE(__use_tsc); · line 59

Quoted 10 lines
arch/x86/kernel/tsc.c +1 -1
  static u32 art_to_tsc_numerator;
  static u32 art_to_tsc_denominator;
  static u64 art_to_tsc_offset;
-struct clocksource *art_related_clocksource;
+static struct clocksource *art_related_clocksource;
 
  struct cyc2ns {
  	struct cyc2ns_data data[2];	/*  0 + 2*16 = 32 */
  	seqcount_latch_t   seq;		/* 32 + 4    = 36 */
 

friendly ping ...

merge bot Applied
#2 lore raw
In reply to Chen Lifu
The following commit has been merged into the x86/cleanups branch of tip:

The following commit has been merged into the x86/cleanups branch of tip:

Commit-ID:     3548eda8ae284d6d412d59f11cd20fc7df05362b
Gitweb:        https://git.kernel.org/tip/3548eda8ae284d6d412d59f11cd20fc7df05362b
Author:        Chen Lifu <[email protected]>
AuthorDate:    Tue, 23 Aug 2022 10:18:21 +08:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Mon, 17 Oct 2022 16:20:48 +02:00

x86/tsc: Make art_related_clocksource static

The symbol is not used outside of the file, so mark it static.

Fixes the following warning:

arch/x86/kernel/tsc.c:53:20: warning:
symbol 'art_related_clocksource' was not declared. Should it be static?

---
 arch/x86/kernel/tsc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/tsc.c +1 -1
index cafacb2..a78e73d 100644
@@ -51,7 +51,7 @@ int tsc_clocksource_reliable;
 static u32 art_to_tsc_numerator;
 static u32 art_to_tsc_denominator;
 static u64 art_to_tsc_offset;
-struct clocksource *art_related_clocksource;
+static struct clocksource *art_related_clocksource;
 
 struct cyc2ns {
 	struct cyc2ns_data data[2];	/*  0 + 2*16 = 32 */