livepatch: Make 'klp_stack_entries' static

Message ID 5115752fca6537720700f4bf5b178959dfbca41a.1685488550.git.jpoimboe@kernel.org
State New
Headers
Series livepatch: Make 'klp_stack_entries' static |

Commit Message

Josh Poimboeuf May 30, 2023, 11:15 p.m. UTC
  The 'klp_stack_entries' percpu array is only used in transition.c.  Make
it static.

Fixes: e92606fa172f ("livepatch: Convert stack entries array to percpu")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202305171329.i0UQ4TJa-lkp@intel.com/
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
---
 kernel/livepatch/transition.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Petr Mladek May 31, 2023, 8:07 a.m. UTC | #1
On Tue 2023-05-30 16:15:58, Josh Poimboeuf wrote:
> The 'klp_stack_entries' percpu array is only used in transition.c.  Make
> it static.
> 
> Fixes: e92606fa172f ("livepatch: Convert stack entries array to percpu")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202305171329.i0UQ4TJa-lkp@intel.com/
> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>

Reviewed-by: Petr Mladek <pmladek@suse.com>

Best Regards,
Petr
  
Petr Mladek June 5, 2023, 2:47 p.m. UTC | #2
On Tue 2023-05-30 16:15:58, Josh Poimboeuf wrote:
> The 'klp_stack_entries' percpu array is only used in transition.c.  Make
> it static.
> 
> Fixes: e92606fa172f ("livepatch: Convert stack entries array to percpu")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202305171329.i0UQ4TJa-lkp@intel.com/
> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>

JFYI, the patch has been committed into livepatching.git, branch
for-6.5/core.

Best Regards,
Petr
  

Patch

diff --git a/kernel/livepatch/transition.c b/kernel/livepatch/transition.c
index e9fd83a02228..e54c3d60a904 100644
--- a/kernel/livepatch/transition.c
+++ b/kernel/livepatch/transition.c
@@ -15,7 +15,7 @@ 
 #include "transition.h"
 
 #define MAX_STACK_ENTRIES  100
-DEFINE_PER_CPU(unsigned long[MAX_STACK_ENTRIES], klp_stack_entries);
+static DEFINE_PER_CPU(unsigned long[MAX_STACK_ENTRIES], klp_stack_entries);
 
 #define STACK_ERR_BUF_SIZE 128