linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] um: Remove unused bp stack-frame pointer
@ 2014-10-18 14:23 Manfred Schlaegl
  2014-10-18 14:42 ` Richard Weinberger
  0 siblings, 1 reply; 7+ messages in thread
From: Manfred Schlaegl @ 2014-10-18 14:23 UTC (permalink / raw)
  To: Jeff Dike, Richard Weinberger
  Cc: Daniel Walter, Manfred Schlaegl, Randy Dunlap,
	user-mode-linux-devel, user-mode-linux-user, linux-kernel

The pointer to bp stack-frame is no longer used. Removed it.
This also removes a corresponding compiler-warning.

Signed-off-by: Manfred Schlaegl <manfred.schlaegl@gmx.at>
---
 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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] um: Remove unused bp stack-frame pointer
  2014-10-18 14:23 [PATCH] um: Remove unused bp stack-frame pointer Manfred Schlaegl
@ 2014-10-18 14:42 ` Richard Weinberger
  2014-10-18 15:12   ` Manfred Schlaegl
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Weinberger @ 2014-10-18 14:42 UTC (permalink / raw)
  To: Manfred Schlaegl, Jeff Dike
  Cc: Daniel Walter, Randy Dunlap, user-mode-linux-devel,
	user-mode-linux-user, linux-kernel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] um: Remove unused bp stack-frame pointer
  2014-10-18 14:42 ` Richard Weinberger
@ 2014-10-18 15:12   ` Manfred Schlaegl
  2014-10-18 15:19     ` Richard Weinberger
  0 siblings, 1 reply; 7+ messages in thread
From: Manfred Schlaegl @ 2014-10-18 15:12 UTC (permalink / raw)
  To: Richard Weinberger, Jeff Dike
  Cc: Daniel Walter, Randy Dunlap, user-mode-linux-devel,
	user-mode-linux-user, linux-kernel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] um: Remove unused bp stack-frame pointer
  2014-10-18 15:12   ` Manfred Schlaegl
@ 2014-10-18 15:19     ` Richard Weinberger
  2014-10-18 15:24       ` Manfred Schlaegl
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Weinberger @ 2014-10-18 15:19 UTC (permalink / raw)
  To: Manfred Schlaegl, Jeff Dike
  Cc: Daniel Walter, Randy Dunlap, user-mode-linux-devel,
	user-mode-linux-user, linux-kernel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] um: Remove unused bp stack-frame pointer
  2014-10-18 15:19     ` Richard Weinberger
@ 2014-10-18 15:24       ` Manfred Schlaegl
  2014-10-18 15:40         ` Richard Weinberger
  0 siblings, 1 reply; 7+ messages in thread
From: Manfred Schlaegl @ 2014-10-18 15:24 UTC (permalink / raw)
  To: Richard Weinberger, Jeff Dike
  Cc: Daniel Walter, Randy Dunlap, user-mode-linux-devel,
	user-mode-linux-user, linux-kernel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] um: Remove unused bp stack-frame pointer
  2014-10-18 15:24       ` Manfred Schlaegl
@ 2014-10-18 15:40         ` Richard Weinberger
  2014-10-19 17:28           ` Manfred Schlaegl
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Weinberger @ 2014-10-18 15:40 UTC (permalink / raw)
  To: Manfred Schlaegl, Jeff Dike
  Cc: Daniel Walter, Randy Dunlap, user-mode-linux-devel,
	user-mode-linux-user, linux-kernel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] um: Remove unused bp stack-frame pointer
  2014-10-18 15:40         ` Richard Weinberger
@ 2014-10-19 17:28           ` Manfred Schlaegl
  0 siblings, 0 replies; 7+ messages in thread
From: Manfred Schlaegl @ 2014-10-19 17:28 UTC (permalink / raw)
  To: Richard Weinberger, Jeff Dike
  Cc: Daniel Walter, Randy Dunlap, user-mode-linux-devel,
	user-mode-linux-user, linux-kernel

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-10-19 17:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-18 14:23 [PATCH] um: Remove unused bp stack-frame pointer Manfred Schlaegl
2014-10-18 14:42 ` Richard Weinberger
2014-10-18 15:12   ` Manfred Schlaegl
2014-10-18 15:19     ` Richard Weinberger
2014-10-18 15:24       ` Manfred Schlaegl
2014-10-18 15:40         ` Richard Weinberger
2014-10-19 17:28           ` Manfred Schlaegl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).