diff options
| author | Christophe Leroy <[email protected]> | 2018-11-09 17:33:15 +0000 |
|---|---|---|
| committer | Michael Ellerman <[email protected]> | 2018-12-19 07:56:32 +0000 |
| commit | 45090c26614fe991d9d5a2cd08e65c4d6680549a (patch) | |
| tree | 24861232e955b06619550454f98d3fb3144e0072 /arch/powerpc/lib/code-patching.c | |
| parent | powerpc/mm: remove unused variable (diff) | |
| download | kernel-45090c26614fe991d9d5a2cd08e65c4d6680549a.tar.gz kernel-45090c26614fe991d9d5a2cd08e65c4d6680549a.zip | |
powerpc: simplify patch_instruction_site() and patch_branch_site()
Using patch_site_addr() helper, patch_instruction_site() and
patch_branch_site() can be simplified and inlined.
Signed-off-by: Christophe Leroy <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Diffstat (limited to 'arch/powerpc/lib/code-patching.c')
| -rw-r--r-- | arch/powerpc/lib/code-patching.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/arch/powerpc/lib/code-patching.c b/arch/powerpc/lib/code-patching.c index 89502cbccb1b..506413a2c25e 100644 --- a/arch/powerpc/lib/code-patching.c +++ b/arch/powerpc/lib/code-patching.c @@ -204,22 +204,6 @@ int patch_branch(unsigned int *addr, unsigned long target, int flags) return patch_instruction(addr, create_branch(addr, target, flags)); } -int patch_branch_site(s32 *site, unsigned long target, int flags) -{ - unsigned int *addr; - - addr = (unsigned int *)((unsigned long)site + *site); - return patch_instruction(addr, create_branch(addr, target, flags)); -} - -int patch_instruction_site(s32 *site, unsigned int instr) -{ - unsigned int *addr; - - addr = (unsigned int *)((unsigned long)site + *site); - return patch_instruction(addr, instr); -} - bool is_offset_in_branch_range(long offset) { /* |
