Skip to contentSkip to conversation

x86/alternatives: Mark text_poke_loc_init static

PATCH Applied Qiujun Huang 2 participants 2 messages Mar 3, 2020 – Mar 25, 2020 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/alternatives: Mark text_poke_loc_init static

Now, the function is only used in this file, so mark it with 'static'.

---
 arch/x86/kernel/alternative.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/alternative.c +1 -1
index 15ac0d5..600da3cb 100644
@@ -1167,7 +1167,7 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entries
 		atomic_cond_read_acquire(&desc.refs, !VAL);
 }
 
-void text_poke_loc_init(struct text_poke_loc *tp, void *addr,
+static void text_poke_loc_init(struct text_poke_loc *tp, void *addr,
 			const void *opcode, size_t len, const void *emulate)
 {
 	struct insn insn;
Signature · 1 line
1.8.3.1
merge bot Applied
#1 lore raw

[tip: x86/cleanups] x86/alternatives: Mark text_poke_loc_init() static

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:     244febbee876203d8505dfadcc6edb82a0e061b8
Gitweb:        https://git.kernel.org/tip/244febbee876203d8505dfadcc6edb82a0e061b8
Author:        Qiujun Huang <[email protected]>
AuthorDate:    Wed, 04 Mar 2020 00:42:12 +08:00
Committer:     Borislav Petkov <[email protected]>
CommitterDate: Wed, 25 Mar 2020 12:42:35 +01:00

x86/alternatives: Mark text_poke_loc_init() static

The function is only used in this file so make it static.

[ bp: Massage. ]

---
 arch/x86/kernel/alternative.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/alternative.c +2 -2
index 15ac0d5..7867dfb 100644
@@ -1167,8 +1167,8 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entries
 		atomic_cond_read_acquire(&desc.refs, !VAL);
 }
 
-void text_poke_loc_init(struct text_poke_loc *tp, void *addr,
-			const void *opcode, size_t len, const void *emulate)
+static void text_poke_loc_init(struct text_poke_loc *tp, void *addr,
+			       const void *opcode, size_t len, const void *emulate)
 {
 	struct insn insn;