|
From: Manfred S. <man...@gm...> - 2014-10-18 14:27:19
|
The pointer to bp stack-frame is no longer used. Removed it.
This also removes a corresponding compiler-warning.
Signed-off-by: Manfred Schlaegl <man...@gm...>
---
arch/um/kernel/sysrq.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/arch/um/kernel/sysrq.c b/arch/um/kernel/sysrq.c
index 894c8d3..aa1b56f 100644
--- a/arch/um/kernel/sysrq.c
+++ b/arch/um/kernel/sysrq.c
@@ -29,7 +29,7 @@ static const struct stacktrace_ops stackops = {
void show_stack(struct task_struct *task, unsigned long *stack)
{
- unsigned long *sp = stack, bp = 0;
+ unsigned long *sp = stack;
struct pt_regs *segv_regs = current->thread.segv_regs;
int i;
@@ -39,10 +39,6 @@ void show_stack(struct task_struct *task, unsigned long *stack)
return;
}
-#ifdef CONFIG_FRAME_POINTER
- bp = get_frame_pointer(task, segv_regs);
-#endif
-
if (!stack)
sp = get_stack_pointer(task, segv_regs);
-- 1.7.10.4
|
|
From: Richard W. <ri...@no...> - 2014-10-18 14:42:30
|
Am 18.10.2014 um 16:23 schrieb Manfred Schlaegl: > The pointer to bp stack-frame is no longer used. Removed it. Good catch! > This also removes a corresponding compiler-warning. Which warning exactly? Thanks, //richard |
|
From: Richard W. <ri...@no...> - 2014-10-18 15:19:39
|
Am 18.10.2014 um 17:12 schrieb Manfred Schlaegl: > On 2014-10-18 16:42, Richard Weinberger wrote: >> Am 18.10.2014 um 16:23 schrieb Manfred Schlaegl: >>> The pointer to bp stack-frame is no longer used. Removed it. >> >> Good catch! > Thank you. > >> >>> This also removes a corresponding compiler-warning. >> >> Which warning exactly? > > On "normal" (defconfig) builds the warning does not show up because CONFIG_FRAME_POINTER is set. > I've found the unused bp because CONFIG_FRAME_POINTER was not set in my configuration. > > CC arch/um/kernel/sysrq.o > arch/um/kernel/sysrq.c: In function ‘show_stack’: > arch/um/kernel/sysrq.c:32:29: warning: unused variable ‘bp’ [-Wunused-variable] Looks like my gcc need's an upgrade. :D Thanks, //richard |
|
From: Manfred S. <man...@gm...> - 2014-10-18 15:28:52
|
On 2014-10-18 17:19, Richard Weinberger wrote: > Am 18.10.2014 um 17:12 schrieb Manfred Schlaegl: >> On 2014-10-18 16:42, Richard Weinberger wrote: >>> Am 18.10.2014 um 16:23 schrieb Manfred Schlaegl: >>>> The pointer to bp stack-frame is no longer used. Removed it. >>> >>> Good catch! >> Thank you. >> >>> >>>> This also removes a corresponding compiler-warning. >>> >>> Which warning exactly? >> >> On "normal" (defconfig) builds the warning does not show up because CONFIG_FRAME_POINTER is set. >> I've found the unused bp because CONFIG_FRAME_POINTER was not set in my configuration. >> >> CC arch/um/kernel/sysrq.o >> arch/um/kernel/sysrq.c: In function ‘show_stack’: >> arch/um/kernel/sysrq.c:32:29: warning: unused variable ‘bp’ [-Wunused-variable] > > Looks like my gcc need's an upgrade. :D > > Thanks, > //richard > I'm using gcc version 4.7.2 (Debian 4.7.2-5). -> not THAT new ;-) best regards manfred |
|
From: Richard W. <ri...@no...> - 2014-10-18 15:40:51
|
Am 18.10.2014 um 17:24 schrieb Manfred Schlaegl: > On 2014-10-18 17:19, Richard Weinberger wrote: >> Am 18.10.2014 um 17:12 schrieb Manfred Schlaegl: >>> On 2014-10-18 16:42, Richard Weinberger wrote: >>>> Am 18.10.2014 um 16:23 schrieb Manfred Schlaegl: >>>>> The pointer to bp stack-frame is no longer used. Removed it. >>>> >>>> Good catch! >>> Thank you. >>> >>>> >>>>> This also removes a corresponding compiler-warning. >>>> >>>> Which warning exactly? >>> >>> On "normal" (defconfig) builds the warning does not show up because CONFIG_FRAME_POINTER is set. >>> I've found the unused bp because CONFIG_FRAME_POINTER was not set in my configuration. >>> >>> CC arch/um/kernel/sysrq.o >>> arch/um/kernel/sysrq.c: In function ‘show_stack’: >>> arch/um/kernel/sysrq.c:32:29: warning: unused variable ‘bp’ [-Wunused-variable] >> >> Looks like my gcc need's an upgrade. :D >> >> Thanks, >> //richard >> > > I'm using gcc version 4.7.2 (Debian 4.7.2-5). -> not THAT new ;-) With a cup of coffee applied I managed it to read your mail correctly. The warning triggers only with CONFIG_FRAME_POINTER=n. Now it makes sense. Thanks, //richard |
|
From: Manfred S. <man...@gm...> - 2014-10-19 17:32:14
|
On 2014-10-18 17:40, Richard Weinberger wrote: > Am 18.10.2014 um 17:24 schrieb Manfred Schlaegl: >> On 2014-10-18 17:19, Richard Weinberger wrote: >>> Am 18.10.2014 um 17:12 schrieb Manfred Schlaegl: >>>> On 2014-10-18 16:42, Richard Weinberger wrote: >>>>> Am 18.10.2014 um 16:23 schrieb Manfred Schlaegl: >>>>>> The pointer to bp stack-frame is no longer used. Removed it. >>>>> >>>>> Good catch! >>>> Thank you. >>>> >>>>> >>>>>> This also removes a corresponding compiler-warning. >>>>> >>>>> Which warning exactly? >>>> >>>> On "normal" (defconfig) builds the warning does not show up because CONFIG_FRAME_POINTER is set. >>>> I've found the unused bp because CONFIG_FRAME_POINTER was not set in my configuration. >>>> >>>> CC arch/um/kernel/sysrq.o >>>> arch/um/kernel/sysrq.c: In function ‘show_stack’: >>>> arch/um/kernel/sysrq.c:32:29: warning: unused variable ‘bp’ [-Wunused-variable] >>> >>> Looks like my gcc need's an upgrade. :D >>> >>> Thanks, >>> //richard >>> >> >> I'm using gcc version 4.7.2 (Debian 4.7.2-5). -> not THAT new ;-) > > With a cup of coffee applied I managed it to read your mail correctly. > The warning triggers only with CONFIG_FRAME_POINTER=n. Now it makes sense. Misunderstanding solved! Miracle cure caffeine ;-) greetings manfred |
|
From: Manfred S. <man...@gm...> - 2014-10-18 15:16:35
|
On 2014-10-18 16:42, Richard Weinberger wrote: > Am 18.10.2014 um 16:23 schrieb Manfred Schlaegl: >> The pointer to bp stack-frame is no longer used. Removed it. > > Good catch! Thank you. > >> This also removes a corresponding compiler-warning. > > Which warning exactly? On "normal" (defconfig) builds the warning does not show up because CONFIG_FRAME_POINTER is set. I've found the unused bp because CONFIG_FRAME_POINTER was not set in my configuration. CC arch/um/kernel/sysrq.o arch/um/kernel/sysrq.c: In function ‘show_stack’: arch/um/kernel/sysrq.c:32:29: warning: unused variable ‘bp’ [-Wunused-variable] It's reproducible on linus-tree (0429fbc0b) by make mrproper make tinyconfig ARCH=um SUBARCH=i386 make ARCH=um SUBARCH=i386 > > Thanks, > //richard > best regards, manfred |