summaryrefslogtreecommitdiffstats
path: root/arch/arm64
diff options
context:
space:
mode:
authorDave Martin2019-07-02 15:07:27 +0200
committerWill Deacon2019-07-22 12:44:00 +0200
commit8caa6e2be72313c170f2b30e8475323526dd7ed1 (patch)
tree9905ea3e16c62ecf93cabf679fadf94efc090f1f /arch/arm64
parentarm64: vdso: Cleanup Makefiles (diff)
downloadkernel-qcow2-linux-8caa6e2be72313c170f2b30e8475323526dd7ed1.tar.gz
kernel-qcow2-linux-8caa6e2be72313c170f2b30e8475323526dd7ed1.tar.xz
kernel-qcow2-linux-8caa6e2be72313c170f2b30e8475323526dd7ed1.zip
arm64: stacktrace: Constify stacktrace.h functions
on_accessible_stack() and on_task_stack() shouldn't (and don't) modify their task argument, so it can be const. This patch adds the appropriate modifiers. Whitespace violations in the parameter lists are fixed at the same time. No functional change. Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Dave Martin <dave.martin@arm.com> [Mark: fixup const location, whitespace] Signed-off-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64')
-rw-r--r--arch/arm64/include/asm/stacktrace.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/arm64/include/asm/stacktrace.h b/arch/arm64/include/asm/stacktrace.h
index df45af931459..1e0c5a7cdce5 100644
--- a/arch/arm64/include/asm/stacktrace.h
+++ b/arch/arm64/include/asm/stacktrace.h
@@ -64,8 +64,9 @@ static inline bool on_irq_stack(unsigned long sp,
return true;
}
-static inline bool on_task_stack(struct task_struct *tsk, unsigned long sp,
- struct stack_info *info)
+static inline bool on_task_stack(const struct task_struct *tsk,
+ unsigned long sp,
+ struct stack_info *info)
{
unsigned long low = (unsigned long)task_stack_page(tsk);
unsigned long high = low + THREAD_SIZE;
@@ -112,9 +113,9 @@ static inline bool on_overflow_stack(unsigned long sp,
* We can only safely access per-cpu stacks from current in a non-preemptible
* context.
*/
-static inline bool on_accessible_stack(struct task_struct *tsk,
- unsigned long sp,
- struct stack_info *info)
+static inline bool on_accessible_stack(const struct task_struct *tsk,
+ unsigned long sp,
+ struct stack_info *info)
{
if (on_task_stack(tsk, sp, info))
return true;