projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
639214f
)
unwind: Simplify unwind_user_next_fp() alignment check
author
Peter Zijlstra
<peterz@infradead.org>
Tue, 23 Sep 2025 11:04:09 +0000
(13:04 +0200)
committer
Peter Zijlstra
<peterz@infradead.org>
Wed, 29 Oct 2025 09:29:57 +0000
(10:29 +0100)
2^log_2(n) == n
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Link:
https://patch.msgid.link/20250924080119.497867836@infradead.org
kernel/unwind/user.c
patch
|
blob
|
history
diff --git
a/kernel/unwind/user.c
b/kernel/unwind/user.c
index
97a8415
..
9dcde79
100644
(file)
--- a/
kernel/unwind/user.c
+++ b/
kernel/unwind/user.c
@@
-19,7
+19,6
@@
static int unwind_user_next_fp(struct unwind_user_state *state)
{
const struct unwind_user_frame *frame = &fp_frame;
unsigned long cfa, fp, ra;
- unsigned int shift;
if (frame->use_fp) {
if (state->fp < state->sp)
@@
-37,8
+36,7
@@
static int unwind_user_next_fp(struct unwind_user_state *state)
return -EINVAL;
/* Make sure that the address is word aligned */
- shift = sizeof(long) == 4 ? 2 : 3;
- if (cfa & ((1 << shift) - 1))
+ if (cfa & (sizeof(long) - 1))
return -EINVAL;
/* Find the Return Address (RA) */