All of lore.kernel.org
 help / color / mirror / Atom feed
* arch/arm/kernel/stacktrace.c:163:1: warning: Label 'here' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]
@ 2022-05-03  2:36 kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2022-05-03  2:36 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 5022 bytes --]

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
CC: Ard Biesheuvel <ardb@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   9050ba3a61a4b5bd84c2cde092a100404f814f31
commit: c46c2c9b43f4f08f20dc06417fbf7091e4ca6d34 ARM: unwind: set frame.pc correctly for current-thread unwinding
date:   8 weeks ago
:::::: branch date: 9 hours ago
:::::: commit date: 8 weeks ago
compiler: arm-linux-gnueabi-gcc (GCC) 11.3.0
reproduce (cppcheck warning):
        # apt-get install cppcheck
        git checkout c46c2c9b43f4f08f20dc06417fbf7091e4ca6d34
        cppcheck --quiet --enable=style,performance,portability --template=gcc FILE

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> arch/arm/kernel/stacktrace.c:163:1: warning: Label 'here' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]
   here:
   ^
>> arch/arm/kernel/stacktrace.c:133:61: warning: Parameter 'tsk' can be declared with const [constParameter]
   static noinline void __save_stack_trace(struct task_struct *tsk,
                                                               ^

vim +/here +163 arch/arm/kernel/stacktrace.c

f16fb1ecc5a1cb Russell King          2007-04-28  131  
3683f44c42e991 Russell King          2014-05-03  132  /* This must be noinline to so that our skip calculation works correctly */
3683f44c42e991 Russell King          2014-05-03 @133  static noinline void __save_stack_trace(struct task_struct *tsk,
3683f44c42e991 Russell King          2014-05-03  134  	struct stack_trace *trace, unsigned int nosched)
f16fb1ecc5a1cb Russell King          2007-04-28  135  {
f16fb1ecc5a1cb Russell King          2007-04-28  136  	struct stack_trace_data data;
2d7c11bfc91637 Catalin Marinas       2009-02-11  137  	struct stackframe frame;
f16fb1ecc5a1cb Russell King          2007-04-28  138  
f16fb1ecc5a1cb Russell King          2007-04-28  139  	data.trace = trace;
f16fb1ecc5a1cb Russell King          2007-04-28  140  	data.skip = trace->skip;
3683f44c42e991 Russell King          2014-05-03  141  	data.no_sched_functions = nosched;
f76e9154736e9a Nicolas Pitre         2008-04-24  142  
f76e9154736e9a Nicolas Pitre         2008-04-24  143  	if (tsk != current) {
f76e9154736e9a Nicolas Pitre         2008-04-24  144  #ifdef CONFIG_SMP
f76e9154736e9a Nicolas Pitre         2008-04-24  145  		/*
d5996b2ff0e26c Russell King          2011-01-15  146  		 * What guarantees do we have here that 'tsk' is not
d5996b2ff0e26c Russell King          2011-01-15  147  		 * running on another CPU?  For now, ignore it as we
d5996b2ff0e26c Russell King          2011-01-15  148  		 * can't guarantee we won't explode.
f76e9154736e9a Nicolas Pitre         2008-04-24  149  		 */
d5996b2ff0e26c Russell King          2011-01-15  150  		return;
f76e9154736e9a Nicolas Pitre         2008-04-24  151  #else
2d7c11bfc91637 Catalin Marinas       2009-02-11  152  		frame.fp = thread_saved_fp(tsk);
2d7c11bfc91637 Catalin Marinas       2009-02-11  153  		frame.sp = thread_saved_sp(tsk);
2d7c11bfc91637 Catalin Marinas       2009-02-11  154  		frame.lr = 0;		/* recovered from the stack */
2d7c11bfc91637 Catalin Marinas       2009-02-11  155  		frame.pc = thread_saved_pc(tsk);
f76e9154736e9a Nicolas Pitre         2008-04-24  156  #endif
f76e9154736e9a Nicolas Pitre         2008-04-24  157  	} else {
3683f44c42e991 Russell King          2014-05-03  158  		/* We don't want this function nor the caller */
3683f44c42e991 Russell King          2014-05-03  159  		data.skip += 2;
2d7c11bfc91637 Catalin Marinas       2009-02-11  160  		frame.fp = (unsigned long)__builtin_frame_address(0);
74dbeee0fcded9 Behan Webster         2014-09-27  161  		frame.sp = current_stack_pointer;
2d7c11bfc91637 Catalin Marinas       2009-02-11  162  		frame.lr = (unsigned long)__builtin_return_address(0);
c46c2c9b43f4f0 Russell King (Oracle  2022-03-09 @163) here:
c46c2c9b43f4f0 Russell King (Oracle  2022-03-09  164) 		frame.pc = (unsigned long)&&here;
f76e9154736e9a Nicolas Pitre         2008-04-24  165  	}
fed240d9c97438 Masami Hiramatsu      2021-10-21  166  #ifdef CONFIG_KRETPROBES
fed240d9c97438 Masami Hiramatsu      2021-10-21  167  	frame.kr_cur = NULL;
fed240d9c97438 Masami Hiramatsu      2021-10-21  168  	frame.tsk = tsk;
fed240d9c97438 Masami Hiramatsu      2021-10-21  169  #endif
f16fb1ecc5a1cb Russell King          2007-04-28  170  
2d7c11bfc91637 Catalin Marinas       2009-02-11  171  	walk_stackframe(&frame, save_trace, &data);
f76e9154736e9a Nicolas Pitre         2008-04-24  172  }
f76e9154736e9a Nicolas Pitre         2008-04-24  173  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

* arch/arm/kernel/stacktrace.c:163:1: warning: Label 'here' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]
@ 2022-07-28  6:41 kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2022-07-28  6:41 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 5315 bytes --]

:::::: 
:::::: Manual check reason: "low confidence static check warning: arch/arm/kernel/stacktrace.c:163:1: warning: Label 'here' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]"
:::::: 

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
CC: Ard Biesheuvel <ardb@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   6e7765cb477a9753670d4351d14de93f1e9dbbd4
commit: c46c2c9b43f4f08f20dc06417fbf7091e4ca6d34 ARM: unwind: set frame.pc correctly for current-thread unwinding
date:   5 months ago
:::::: branch date: 14 hours ago
:::::: commit date: 5 months ago
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
reproduce (cppcheck warning):
        # apt-get install cppcheck
        git checkout c46c2c9b43f4f08f20dc06417fbf7091e4ca6d34
        cppcheck --quiet --enable=style,performance,portability --template=gcc FILE

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> arch/arm/kernel/stacktrace.c:163:1: warning: Label 'here' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]
   here:
   ^
   arch/arm/kernel/stacktrace.c:133:61: warning: Parameter 'tsk' can be declared with const [constParameter]
   static noinline void __save_stack_trace(struct task_struct *tsk,
                                                               ^

vim +/here +163 arch/arm/kernel/stacktrace.c

f16fb1ecc5a1cb Russell King          2007-04-28  131  
3683f44c42e991 Russell King          2014-05-03  132  /* This must be noinline to so that our skip calculation works correctly */
3683f44c42e991 Russell King          2014-05-03  133  static noinline void __save_stack_trace(struct task_struct *tsk,
3683f44c42e991 Russell King          2014-05-03  134  	struct stack_trace *trace, unsigned int nosched)
f16fb1ecc5a1cb Russell King          2007-04-28  135  {
f16fb1ecc5a1cb Russell King          2007-04-28  136  	struct stack_trace_data data;
2d7c11bfc91637 Catalin Marinas       2009-02-11  137  	struct stackframe frame;
f16fb1ecc5a1cb Russell King          2007-04-28  138  
f16fb1ecc5a1cb Russell King          2007-04-28  139  	data.trace = trace;
f16fb1ecc5a1cb Russell King          2007-04-28  140  	data.skip = trace->skip;
3683f44c42e991 Russell King          2014-05-03  141  	data.no_sched_functions = nosched;
f76e9154736e9a Nicolas Pitre         2008-04-24  142  
f76e9154736e9a Nicolas Pitre         2008-04-24  143  	if (tsk != current) {
f76e9154736e9a Nicolas Pitre         2008-04-24  144  #ifdef CONFIG_SMP
f76e9154736e9a Nicolas Pitre         2008-04-24  145  		/*
d5996b2ff0e26c Russell King          2011-01-15  146  		 * What guarantees do we have here that 'tsk' is not
d5996b2ff0e26c Russell King          2011-01-15  147  		 * running on another CPU?  For now, ignore it as we
d5996b2ff0e26c Russell King          2011-01-15  148  		 * can't guarantee we won't explode.
f76e9154736e9a Nicolas Pitre         2008-04-24  149  		 */
d5996b2ff0e26c Russell King          2011-01-15  150  		return;
f76e9154736e9a Nicolas Pitre         2008-04-24  151  #else
2d7c11bfc91637 Catalin Marinas       2009-02-11  152  		frame.fp = thread_saved_fp(tsk);
2d7c11bfc91637 Catalin Marinas       2009-02-11  153  		frame.sp = thread_saved_sp(tsk);
2d7c11bfc91637 Catalin Marinas       2009-02-11  154  		frame.lr = 0;		/* recovered from the stack */
2d7c11bfc91637 Catalin Marinas       2009-02-11  155  		frame.pc = thread_saved_pc(tsk);
f76e9154736e9a Nicolas Pitre         2008-04-24  156  #endif
f76e9154736e9a Nicolas Pitre         2008-04-24  157  	} else {
3683f44c42e991 Russell King          2014-05-03  158  		/* We don't want this function nor the caller */
3683f44c42e991 Russell King          2014-05-03  159  		data.skip += 2;
2d7c11bfc91637 Catalin Marinas       2009-02-11  160  		frame.fp = (unsigned long)__builtin_frame_address(0);
74dbeee0fcded9 Behan Webster         2014-09-27  161  		frame.sp = current_stack_pointer;
2d7c11bfc91637 Catalin Marinas       2009-02-11  162  		frame.lr = (unsigned long)__builtin_return_address(0);
c46c2c9b43f4f0 Russell King (Oracle  2022-03-09 @163) here:
c46c2c9b43f4f0 Russell King (Oracle  2022-03-09  164) 		frame.pc = (unsigned long)&&here;
f76e9154736e9a Nicolas Pitre         2008-04-24  165  	}
fed240d9c97438 Masami Hiramatsu      2021-10-21  166  #ifdef CONFIG_KRETPROBES
fed240d9c97438 Masami Hiramatsu      2021-10-21  167  	frame.kr_cur = NULL;
fed240d9c97438 Masami Hiramatsu      2021-10-21  168  	frame.tsk = tsk;
fed240d9c97438 Masami Hiramatsu      2021-10-21  169  #endif
f16fb1ecc5a1cb Russell King          2007-04-28  170  
2d7c11bfc91637 Catalin Marinas       2009-02-11  171  	walk_stackframe(&frame, save_trace, &data);
f76e9154736e9a Nicolas Pitre         2008-04-24  172  }
f76e9154736e9a Nicolas Pitre         2008-04-24  173  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

* arch/arm/kernel/stacktrace.c:163:1: warning: Label 'here' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]
@ 2022-11-07  5:53 kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2022-11-07  5:53 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "low confidence static check warning: arch/arm/kernel/stacktrace.c:163:1: warning: Label 'here' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
CC: Ard Biesheuvel <ardb@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f0c4d9fc9cc9462659728d168387191387e903cc
commit: c46c2c9b43f4f08f20dc06417fbf7091e4ca6d34 ARM: unwind: set frame.pc correctly for current-thread unwinding
date:   8 months ago
:::::: branch date: 7 hours ago
:::::: commit date: 8 months ago
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
reproduce (cppcheck warning):
        # apt-get install cppcheck
        git checkout c46c2c9b43f4f08f20dc06417fbf7091e4ca6d34
        cppcheck --quiet --enable=style,performance,portability --template=gcc FILE

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> arch/arm/kernel/stacktrace.c:163:1: warning: Label 'here' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]
   here:
   ^
   arch/arm/kernel/stacktrace.c:133:61: warning: Parameter 'tsk' can be declared as pointer to const [constParameter]
   static noinline void __save_stack_trace(struct task_struct *tsk,
                                                               ^

vim +/here +163 arch/arm/kernel/stacktrace.c

f16fb1ecc5a1cb Russell King          2007-04-28  131  
3683f44c42e991 Russell King          2014-05-03  132  /* This must be noinline to so that our skip calculation works correctly */
3683f44c42e991 Russell King          2014-05-03  133  static noinline void __save_stack_trace(struct task_struct *tsk,
3683f44c42e991 Russell King          2014-05-03  134  	struct stack_trace *trace, unsigned int nosched)
f16fb1ecc5a1cb Russell King          2007-04-28  135  {
f16fb1ecc5a1cb Russell King          2007-04-28  136  	struct stack_trace_data data;
2d7c11bfc91637 Catalin Marinas       2009-02-11  137  	struct stackframe frame;
f16fb1ecc5a1cb Russell King          2007-04-28  138  
f16fb1ecc5a1cb Russell King          2007-04-28  139  	data.trace = trace;
f16fb1ecc5a1cb Russell King          2007-04-28  140  	data.skip = trace->skip;
3683f44c42e991 Russell King          2014-05-03  141  	data.no_sched_functions = nosched;
f76e9154736e9a Nicolas Pitre         2008-04-24  142  
f76e9154736e9a Nicolas Pitre         2008-04-24  143  	if (tsk != current) {
f76e9154736e9a Nicolas Pitre         2008-04-24  144  #ifdef CONFIG_SMP
f76e9154736e9a Nicolas Pitre         2008-04-24  145  		/*
d5996b2ff0e26c Russell King          2011-01-15  146  		 * What guarantees do we have here that 'tsk' is not
d5996b2ff0e26c Russell King          2011-01-15  147  		 * running on another CPU?  For now, ignore it as we
d5996b2ff0e26c Russell King          2011-01-15  148  		 * can't guarantee we won't explode.
f76e9154736e9a Nicolas Pitre         2008-04-24  149  		 */
d5996b2ff0e26c Russell King          2011-01-15  150  		return;
f76e9154736e9a Nicolas Pitre         2008-04-24  151  #else
2d7c11bfc91637 Catalin Marinas       2009-02-11  152  		frame.fp = thread_saved_fp(tsk);
2d7c11bfc91637 Catalin Marinas       2009-02-11  153  		frame.sp = thread_saved_sp(tsk);
2d7c11bfc91637 Catalin Marinas       2009-02-11  154  		frame.lr = 0;		/* recovered from the stack */
2d7c11bfc91637 Catalin Marinas       2009-02-11  155  		frame.pc = thread_saved_pc(tsk);
f76e9154736e9a Nicolas Pitre         2008-04-24  156  #endif
f76e9154736e9a Nicolas Pitre         2008-04-24  157  	} else {
3683f44c42e991 Russell King          2014-05-03  158  		/* We don't want this function nor the caller */
3683f44c42e991 Russell King          2014-05-03  159  		data.skip += 2;
2d7c11bfc91637 Catalin Marinas       2009-02-11  160  		frame.fp = (unsigned long)__builtin_frame_address(0);
74dbeee0fcded9 Behan Webster         2014-09-27  161  		frame.sp = current_stack_pointer;
2d7c11bfc91637 Catalin Marinas       2009-02-11  162  		frame.lr = (unsigned long)__builtin_return_address(0);
c46c2c9b43f4f0 Russell King (Oracle  2022-03-09 @163) here:
c46c2c9b43f4f0 Russell King (Oracle  2022-03-09  164) 		frame.pc = (unsigned long)&&here;
f76e9154736e9a Nicolas Pitre         2008-04-24  165  	}
fed240d9c97438 Masami Hiramatsu      2021-10-21  166  #ifdef CONFIG_KRETPROBES
fed240d9c97438 Masami Hiramatsu      2021-10-21  167  	frame.kr_cur = NULL;
fed240d9c97438 Masami Hiramatsu      2021-10-21  168  	frame.tsk = tsk;
fed240d9c97438 Masami Hiramatsu      2021-10-21  169  #endif
f16fb1ecc5a1cb Russell King          2007-04-28  170  
2d7c11bfc91637 Catalin Marinas       2009-02-11  171  	walk_stackframe(&frame, save_trace, &data);
f76e9154736e9a Nicolas Pitre         2008-04-24  172  }
f76e9154736e9a Nicolas Pitre         2008-04-24  173  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

* arch/arm/kernel/stacktrace.c:163:1: warning: Label 'here' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]
@ 2022-11-07  7:24 kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2022-11-07  7:24 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "low confidence static check warning: arch/arm/kernel/stacktrace.c:163:1: warning: Label 'here' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
CC: Ard Biesheuvel <ardb@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f0c4d9fc9cc9462659728d168387191387e903cc
commit: c46c2c9b43f4f08f20dc06417fbf7091e4ca6d34 ARM: unwind: set frame.pc correctly for current-thread unwinding
date:   8 months ago
:::::: branch date: 8 hours ago
:::::: commit date: 8 months ago
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
reproduce (cppcheck warning):
        # apt-get install cppcheck
        git checkout c46c2c9b43f4f08f20dc06417fbf7091e4ca6d34
        cppcheck --quiet --enable=style,performance,portability --template=gcc FILE

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> arch/arm/mm/fault.c:529:28: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    if (!inf->fn(addr, fsr & ~FSR_LNX_PF, regs))
                              ^
   arch/arm/mm/fault.c:559:28: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    if (!inf->fn(addr, ifsr | FSR_LNX_PF, regs))
                              ^
>> arch/arm/mm/fault.c:529:28: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
    if (!inf->fn(addr, fsr & ~FSR_LNX_PF, regs))
                              ^
   arch/arm/mm/fault.c:559:28: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
    if (!inf->fn(addr, ifsr | FSR_LNX_PF, regs))
                              ^
   arch/arm/mm/fault.c:269:12: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    if (fsr & FSR_LNX_PF) {
              ^
   arch/arm/mm/fault.c:269:12: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
    if (fsr & FSR_LNX_PF) {
              ^
--
>> arch/arm/kernel/stacktrace.c:163:1: warning: Label 'here' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]
   here:
   ^
   arch/arm/kernel/stacktrace.c:133:61: warning: Parameter 'tsk' can be declared as pointer to const [constParameter]
   static noinline void __save_stack_trace(struct task_struct *tsk,
                                                               ^
--
>> arch/arm/kernel/return_address.c:44:1: warning: Label 'here' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]
   here:
   ^

vim +/here +163 arch/arm/kernel/stacktrace.c

f16fb1ecc5a1cb Russell King          2007-04-28  131  
3683f44c42e991 Russell King          2014-05-03  132  /* This must be noinline to so that our skip calculation works correctly */
3683f44c42e991 Russell King          2014-05-03  133  static noinline void __save_stack_trace(struct task_struct *tsk,
3683f44c42e991 Russell King          2014-05-03  134  	struct stack_trace *trace, unsigned int nosched)
f16fb1ecc5a1cb Russell King          2007-04-28  135  {
f16fb1ecc5a1cb Russell King          2007-04-28  136  	struct stack_trace_data data;
2d7c11bfc91637 Catalin Marinas       2009-02-11  137  	struct stackframe frame;
f16fb1ecc5a1cb Russell King          2007-04-28  138  
f16fb1ecc5a1cb Russell King          2007-04-28  139  	data.trace = trace;
f16fb1ecc5a1cb Russell King          2007-04-28  140  	data.skip = trace->skip;
3683f44c42e991 Russell King          2014-05-03  141  	data.no_sched_functions = nosched;
f76e9154736e9a Nicolas Pitre         2008-04-24  142  
f76e9154736e9a Nicolas Pitre         2008-04-24  143  	if (tsk != current) {
f76e9154736e9a Nicolas Pitre         2008-04-24  144  #ifdef CONFIG_SMP
f76e9154736e9a Nicolas Pitre         2008-04-24  145  		/*
d5996b2ff0e26c Russell King          2011-01-15  146  		 * What guarantees do we have here that 'tsk' is not
d5996b2ff0e26c Russell King          2011-01-15  147  		 * running on another CPU?  For now, ignore it as we
d5996b2ff0e26c Russell King          2011-01-15  148  		 * can't guarantee we won't explode.
f76e9154736e9a Nicolas Pitre         2008-04-24  149  		 */
d5996b2ff0e26c Russell King          2011-01-15  150  		return;
f76e9154736e9a Nicolas Pitre         2008-04-24  151  #else
2d7c11bfc91637 Catalin Marinas       2009-02-11  152  		frame.fp = thread_saved_fp(tsk);
2d7c11bfc91637 Catalin Marinas       2009-02-11  153  		frame.sp = thread_saved_sp(tsk);
2d7c11bfc91637 Catalin Marinas       2009-02-11  154  		frame.lr = 0;		/* recovered from the stack */
2d7c11bfc91637 Catalin Marinas       2009-02-11  155  		frame.pc = thread_saved_pc(tsk);
f76e9154736e9a Nicolas Pitre         2008-04-24  156  #endif
f76e9154736e9a Nicolas Pitre         2008-04-24  157  	} else {
3683f44c42e991 Russell King          2014-05-03  158  		/* We don't want this function nor the caller */
3683f44c42e991 Russell King          2014-05-03  159  		data.skip += 2;
2d7c11bfc91637 Catalin Marinas       2009-02-11  160  		frame.fp = (unsigned long)__builtin_frame_address(0);
74dbeee0fcded9 Behan Webster         2014-09-27  161  		frame.sp = current_stack_pointer;
2d7c11bfc91637 Catalin Marinas       2009-02-11  162  		frame.lr = (unsigned long)__builtin_return_address(0);
c46c2c9b43f4f0 Russell King (Oracle  2022-03-09 @163) here:
c46c2c9b43f4f0 Russell King (Oracle  2022-03-09  164) 		frame.pc = (unsigned long)&&here;
f76e9154736e9a Nicolas Pitre         2008-04-24  165  	}
fed240d9c97438 Masami Hiramatsu      2021-10-21  166  #ifdef CONFIG_KRETPROBES
fed240d9c97438 Masami Hiramatsu      2021-10-21  167  	frame.kr_cur = NULL;
fed240d9c97438 Masami Hiramatsu      2021-10-21  168  	frame.tsk = tsk;
fed240d9c97438 Masami Hiramatsu      2021-10-21  169  #endif
f16fb1ecc5a1cb Russell King          2007-04-28  170  
2d7c11bfc91637 Catalin Marinas       2009-02-11  171  	walk_stackframe(&frame, save_trace, &data);
f76e9154736e9a Nicolas Pitre         2008-04-24  172  }
f76e9154736e9a Nicolas Pitre         2008-04-24  173  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

* arch/arm/kernel/stacktrace.c:163:1: warning: Label 'here' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]
@ 2022-11-07 13:38 kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2022-11-07 13:38 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "low confidence static check warning: arch/arm/kernel/stacktrace.c:163:1: warning: Label 'here' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
CC: Ard Biesheuvel <ardb@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f0c4d9fc9cc9462659728d168387191387e903cc
commit: c46c2c9b43f4f08f20dc06417fbf7091e4ca6d34 ARM: unwind: set frame.pc correctly for current-thread unwinding
date:   8 months ago
:::::: branch date: 14 hours ago
:::::: commit date: 8 months ago
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
reproduce (cppcheck warning):
        # apt-get install cppcheck
        git checkout c46c2c9b43f4f08f20dc06417fbf7091e4ca6d34
        cppcheck --quiet --enable=style,performance,portability --template=gcc FILE

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> arch/arm/mm/fault.c:529:28: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    if (!inf->fn(addr, fsr & ~FSR_LNX_PF, regs))
                              ^
   arch/arm/mm/fault.c:559:28: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    if (!inf->fn(addr, ifsr | FSR_LNX_PF, regs))
                              ^
>> arch/arm/mm/fault.c:529:28: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
    if (!inf->fn(addr, fsr & ~FSR_LNX_PF, regs))
                              ^
   arch/arm/mm/fault.c:559:28: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
    if (!inf->fn(addr, ifsr | FSR_LNX_PF, regs))
                              ^
   arch/arm/mm/fault.c:269:12: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    if (fsr & FSR_LNX_PF) {
              ^
   arch/arm/mm/fault.c:269:12: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
    if (fsr & FSR_LNX_PF) {
              ^
--
>> arch/arm/kernel/stacktrace.c:163:1: warning: Label 'here' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]
   here:
   ^
   arch/arm/kernel/stacktrace.c:133:61: warning: Parameter 'tsk' can be declared as pointer to const [constParameter]
   static noinline void __save_stack_trace(struct task_struct *tsk,
                                                               ^
--
>> arch/arm/kernel/return_address.c:44:1: warning: Label 'here' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]
   here:
   ^

vim +/here +163 arch/arm/kernel/stacktrace.c

f16fb1ecc5a1cb Russell King          2007-04-28  131  
3683f44c42e991 Russell King          2014-05-03  132  /* This must be noinline to so that our skip calculation works correctly */
3683f44c42e991 Russell King          2014-05-03  133  static noinline void __save_stack_trace(struct task_struct *tsk,
3683f44c42e991 Russell King          2014-05-03  134  	struct stack_trace *trace, unsigned int nosched)
f16fb1ecc5a1cb Russell King          2007-04-28  135  {
f16fb1ecc5a1cb Russell King          2007-04-28  136  	struct stack_trace_data data;
2d7c11bfc91637 Catalin Marinas       2009-02-11  137  	struct stackframe frame;
f16fb1ecc5a1cb Russell King          2007-04-28  138  
f16fb1ecc5a1cb Russell King          2007-04-28  139  	data.trace = trace;
f16fb1ecc5a1cb Russell King          2007-04-28  140  	data.skip = trace->skip;
3683f44c42e991 Russell King          2014-05-03  141  	data.no_sched_functions = nosched;
f76e9154736e9a Nicolas Pitre         2008-04-24  142  
f76e9154736e9a Nicolas Pitre         2008-04-24  143  	if (tsk != current) {
f76e9154736e9a Nicolas Pitre         2008-04-24  144  #ifdef CONFIG_SMP
f76e9154736e9a Nicolas Pitre         2008-04-24  145  		/*
d5996b2ff0e26c Russell King          2011-01-15  146  		 * What guarantees do we have here that 'tsk' is not
d5996b2ff0e26c Russell King          2011-01-15  147  		 * running on another CPU?  For now, ignore it as we
d5996b2ff0e26c Russell King          2011-01-15  148  		 * can't guarantee we won't explode.
f76e9154736e9a Nicolas Pitre         2008-04-24  149  		 */
d5996b2ff0e26c Russell King          2011-01-15  150  		return;
f76e9154736e9a Nicolas Pitre         2008-04-24  151  #else
2d7c11bfc91637 Catalin Marinas       2009-02-11  152  		frame.fp = thread_saved_fp(tsk);
2d7c11bfc91637 Catalin Marinas       2009-02-11  153  		frame.sp = thread_saved_sp(tsk);
2d7c11bfc91637 Catalin Marinas       2009-02-11  154  		frame.lr = 0;		/* recovered from the stack */
2d7c11bfc91637 Catalin Marinas       2009-02-11  155  		frame.pc = thread_saved_pc(tsk);
f76e9154736e9a Nicolas Pitre         2008-04-24  156  #endif
f76e9154736e9a Nicolas Pitre         2008-04-24  157  	} else {
3683f44c42e991 Russell King          2014-05-03  158  		/* We don't want this function nor the caller */
3683f44c42e991 Russell King          2014-05-03  159  		data.skip += 2;
2d7c11bfc91637 Catalin Marinas       2009-02-11  160  		frame.fp = (unsigned long)__builtin_frame_address(0);
74dbeee0fcded9 Behan Webster         2014-09-27  161  		frame.sp = current_stack_pointer;
2d7c11bfc91637 Catalin Marinas       2009-02-11  162  		frame.lr = (unsigned long)__builtin_return_address(0);
c46c2c9b43f4f0 Russell King (Oracle  2022-03-09 @163) here:
c46c2c9b43f4f0 Russell King (Oracle  2022-03-09  164) 		frame.pc = (unsigned long)&&here;
f76e9154736e9a Nicolas Pitre         2008-04-24  165  	}
fed240d9c97438 Masami Hiramatsu      2021-10-21  166  #ifdef CONFIG_KRETPROBES
fed240d9c97438 Masami Hiramatsu      2021-10-21  167  	frame.kr_cur = NULL;
fed240d9c97438 Masami Hiramatsu      2021-10-21  168  	frame.tsk = tsk;
fed240d9c97438 Masami Hiramatsu      2021-10-21  169  #endif
f16fb1ecc5a1cb Russell King          2007-04-28  170  
2d7c11bfc91637 Catalin Marinas       2009-02-11  171  	walk_stackframe(&frame, save_trace, &data);
f76e9154736e9a Nicolas Pitre         2008-04-24  172  }
f76e9154736e9a Nicolas Pitre         2008-04-24  173  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

* arch/arm/kernel/stacktrace.c:163:1: warning: Label 'here' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]
@ 2022-11-14  8:03 kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2022-11-14  8:03 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "low confidence static check warning: arch/arm/kernel/stacktrace.c:163:1: warning: Label 'here' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
CC: Ard Biesheuvel <ardb@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   094226ad94f471a9f19e8f8e7140a09c2625abaa
commit: c46c2c9b43f4f08f20dc06417fbf7091e4ca6d34 ARM: unwind: set frame.pc correctly for current-thread unwinding
date:   8 months ago
:::::: branch date: 11 hours ago
:::::: commit date: 8 months ago
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
reproduce (cppcheck warning):
        # apt-get install cppcheck
        git checkout c46c2c9b43f4f08f20dc06417fbf7091e4ca6d34
        cppcheck --quiet --enable=style,performance,portability --template=gcc FILE

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> arch/arm/mm/fault.c:529:28: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    if (!inf->fn(addr, fsr & ~FSR_LNX_PF, regs))
                              ^
   arch/arm/mm/fault.c:559:28: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    if (!inf->fn(addr, ifsr | FSR_LNX_PF, regs))
                              ^
>> arch/arm/mm/fault.c:529:28: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
    if (!inf->fn(addr, fsr & ~FSR_LNX_PF, regs))
                              ^
   arch/arm/mm/fault.c:559:28: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
    if (!inf->fn(addr, ifsr | FSR_LNX_PF, regs))
                              ^
   arch/arm/mm/fault.c:269:12: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    if (fsr & FSR_LNX_PF) {
              ^
   arch/arm/mm/fault.c:269:12: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
    if (fsr & FSR_LNX_PF) {
              ^
--
>> arch/arm/kernel/stacktrace.c:163:1: warning: Label 'here' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]
   here:
   ^
>> arch/arm/kernel/stacktrace.c:133:61: warning: Parameter 'tsk' can be declared as pointer to const [constParameter]
   static noinline void __save_stack_trace(struct task_struct *tsk,
                                                               ^

vim +/here +163 arch/arm/kernel/stacktrace.c

f16fb1ecc5a1cb Russell King          2007-04-28  131  
3683f44c42e991 Russell King          2014-05-03  132  /* This must be noinline to so that our skip calculation works correctly */
3683f44c42e991 Russell King          2014-05-03 @133  static noinline void __save_stack_trace(struct task_struct *tsk,
3683f44c42e991 Russell King          2014-05-03  134  	struct stack_trace *trace, unsigned int nosched)
f16fb1ecc5a1cb Russell King          2007-04-28  135  {
f16fb1ecc5a1cb Russell King          2007-04-28  136  	struct stack_trace_data data;
2d7c11bfc91637 Catalin Marinas       2009-02-11  137  	struct stackframe frame;
f16fb1ecc5a1cb Russell King          2007-04-28  138  
f16fb1ecc5a1cb Russell King          2007-04-28  139  	data.trace = trace;
f16fb1ecc5a1cb Russell King          2007-04-28  140  	data.skip = trace->skip;
3683f44c42e991 Russell King          2014-05-03  141  	data.no_sched_functions = nosched;
f76e9154736e9a Nicolas Pitre         2008-04-24  142  
f76e9154736e9a Nicolas Pitre         2008-04-24  143  	if (tsk != current) {
f76e9154736e9a Nicolas Pitre         2008-04-24  144  #ifdef CONFIG_SMP
f76e9154736e9a Nicolas Pitre         2008-04-24  145  		/*
d5996b2ff0e26c Russell King          2011-01-15  146  		 * What guarantees do we have here that 'tsk' is not
d5996b2ff0e26c Russell King          2011-01-15  147  		 * running on another CPU?  For now, ignore it as we
d5996b2ff0e26c Russell King          2011-01-15  148  		 * can't guarantee we won't explode.
f76e9154736e9a Nicolas Pitre         2008-04-24  149  		 */
d5996b2ff0e26c Russell King          2011-01-15  150  		return;
f76e9154736e9a Nicolas Pitre         2008-04-24  151  #else
2d7c11bfc91637 Catalin Marinas       2009-02-11  152  		frame.fp = thread_saved_fp(tsk);
2d7c11bfc91637 Catalin Marinas       2009-02-11  153  		frame.sp = thread_saved_sp(tsk);
2d7c11bfc91637 Catalin Marinas       2009-02-11  154  		frame.lr = 0;		/* recovered from the stack */
2d7c11bfc91637 Catalin Marinas       2009-02-11  155  		frame.pc = thread_saved_pc(tsk);
f76e9154736e9a Nicolas Pitre         2008-04-24  156  #endif
f76e9154736e9a Nicolas Pitre         2008-04-24  157  	} else {
3683f44c42e991 Russell King          2014-05-03  158  		/* We don't want this function nor the caller */
3683f44c42e991 Russell King          2014-05-03  159  		data.skip += 2;
2d7c11bfc91637 Catalin Marinas       2009-02-11  160  		frame.fp = (unsigned long)__builtin_frame_address(0);
74dbeee0fcded9 Behan Webster         2014-09-27  161  		frame.sp = current_stack_pointer;
2d7c11bfc91637 Catalin Marinas       2009-02-11  162  		frame.lr = (unsigned long)__builtin_return_address(0);
c46c2c9b43f4f0 Russell King (Oracle  2022-03-09 @163) here:
c46c2c9b43f4f0 Russell King (Oracle  2022-03-09  164) 		frame.pc = (unsigned long)&&here;
f76e9154736e9a Nicolas Pitre         2008-04-24  165  	}
fed240d9c97438 Masami Hiramatsu      2021-10-21  166  #ifdef CONFIG_KRETPROBES
fed240d9c97438 Masami Hiramatsu      2021-10-21  167  	frame.kr_cur = NULL;
fed240d9c97438 Masami Hiramatsu      2021-10-21  168  	frame.tsk = tsk;
fed240d9c97438 Masami Hiramatsu      2021-10-21  169  #endif
f16fb1ecc5a1cb Russell King          2007-04-28  170  
2d7c11bfc91637 Catalin Marinas       2009-02-11  171  	walk_stackframe(&frame, save_trace, &data);
f76e9154736e9a Nicolas Pitre         2008-04-24  172  }
f76e9154736e9a Nicolas Pitre         2008-04-24  173  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

* arch/arm/kernel/stacktrace.c:163:1: warning: Label 'here' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]
@ 2022-12-22  4:39 kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2022-12-22  4:39 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "low confidence static check warning: arch/arm/kernel/stacktrace.c:163:1: warning: Label 'here' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
CC: Ard Biesheuvel <ardb@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0a924817d2ed9396401e0557c6134276d2e26382
commit: c46c2c9b43f4f08f20dc06417fbf7091e4ca6d34 ARM: unwind: set frame.pc correctly for current-thread unwinding
date:   10 months ago
:::::: branch date: 10 hours ago
:::::: commit date: 10 months ago
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
reproduce (cppcheck warning):
        # apt-get install cppcheck
        git checkout c46c2c9b43f4f08f20dc06417fbf7091e4ca6d34
        cppcheck --quiet --enable=style,performance,portability --template=gcc FILE

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> arch/arm/vfp/vfpmodule.c:260:20: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    if (exceptions & (FPSCR_N|FPSCR_Z|FPSCR_C|FPSCR_V))
                      ^
   arch/arm/vfp/vfpmodule.c:261:14: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
     fpscr &= ~(FPSCR_N|FPSCR_Z|FPSCR_C|FPSCR_V);
                ^
>> arch/arm/vfp/vfpmodule.c:260:20: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
    if (exceptions & (FPSCR_N|FPSCR_Z|FPSCR_C|FPSCR_V))
                      ^
   arch/arm/vfp/vfpmodule.c:261:14: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
     fpscr &= ~(FPSCR_N|FPSCR_Z|FPSCR_C|FPSCR_V);
                ^
>> arch/arm/vfp/vfpmodule.c:728:22: warning: Syntax Error: AST broken, binary operator '|' doesn't have two operands. [internalAstError]
    fpexc = fmrx(FPEXC) | FPEXC_EN;
                        ^
--
>> arch/arm/mm/fault.c:529:28: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    if (!inf->fn(addr, fsr & ~FSR_LNX_PF, regs))
                              ^
   arch/arm/mm/fault.c:559:28: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    if (!inf->fn(addr, ifsr | FSR_LNX_PF, regs))
                              ^
>> arch/arm/mm/fault.c:529:28: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
    if (!inf->fn(addr, fsr & ~FSR_LNX_PF, regs))
                              ^
   arch/arm/mm/fault.c:559:28: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
    if (!inf->fn(addr, ifsr | FSR_LNX_PF, regs))
                              ^
   arch/arm/mm/fault.c:269:12: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    if (fsr & FSR_LNX_PF) {
              ^
   arch/arm/mm/fault.c:269:12: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
    if (fsr & FSR_LNX_PF) {
              ^
--
>> arch/arm/kernel/stacktrace.c:163:1: warning: Label 'here' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]
   here:
   ^
   arch/arm/kernel/stacktrace.c:133:61: warning: Parameter 'tsk' can be declared as pointer to const [constParameter]
   static noinline void __save_stack_trace(struct task_struct *tsk,
                                                               ^
--
>> arch/arm/kernel/return_address.c:44:1: warning: Label 'here' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]
   here:
   ^

vim +/here +163 arch/arm/kernel/stacktrace.c

f16fb1ecc5a1cb Russell King          2007-04-28  131  
3683f44c42e991 Russell King          2014-05-03  132  /* This must be noinline to so that our skip calculation works correctly */
3683f44c42e991 Russell King          2014-05-03  133  static noinline void __save_stack_trace(struct task_struct *tsk,
3683f44c42e991 Russell King          2014-05-03  134  	struct stack_trace *trace, unsigned int nosched)
f16fb1ecc5a1cb Russell King          2007-04-28  135  {
f16fb1ecc5a1cb Russell King          2007-04-28  136  	struct stack_trace_data data;
2d7c11bfc91637 Catalin Marinas       2009-02-11  137  	struct stackframe frame;
f16fb1ecc5a1cb Russell King          2007-04-28  138  
f16fb1ecc5a1cb Russell King          2007-04-28  139  	data.trace = trace;
f16fb1ecc5a1cb Russell King          2007-04-28  140  	data.skip = trace->skip;
3683f44c42e991 Russell King          2014-05-03  141  	data.no_sched_functions = nosched;
f76e9154736e9a Nicolas Pitre         2008-04-24  142  
f76e9154736e9a Nicolas Pitre         2008-04-24  143  	if (tsk != current) {
f76e9154736e9a Nicolas Pitre         2008-04-24  144  #ifdef CONFIG_SMP
f76e9154736e9a Nicolas Pitre         2008-04-24  145  		/*
d5996b2ff0e26c Russell King          2011-01-15  146  		 * What guarantees do we have here that 'tsk' is not
d5996b2ff0e26c Russell King          2011-01-15  147  		 * running on another CPU?  For now, ignore it as we
d5996b2ff0e26c Russell King          2011-01-15  148  		 * can't guarantee we won't explode.
f76e9154736e9a Nicolas Pitre         2008-04-24  149  		 */
d5996b2ff0e26c Russell King          2011-01-15  150  		return;
f76e9154736e9a Nicolas Pitre         2008-04-24  151  #else
2d7c11bfc91637 Catalin Marinas       2009-02-11  152  		frame.fp = thread_saved_fp(tsk);
2d7c11bfc91637 Catalin Marinas       2009-02-11  153  		frame.sp = thread_saved_sp(tsk);
2d7c11bfc91637 Catalin Marinas       2009-02-11  154  		frame.lr = 0;		/* recovered from the stack */
2d7c11bfc91637 Catalin Marinas       2009-02-11  155  		frame.pc = thread_saved_pc(tsk);
f76e9154736e9a Nicolas Pitre         2008-04-24  156  #endif
f76e9154736e9a Nicolas Pitre         2008-04-24  157  	} else {
3683f44c42e991 Russell King          2014-05-03  158  		/* We don't want this function nor the caller */
3683f44c42e991 Russell King          2014-05-03  159  		data.skip += 2;
2d7c11bfc91637 Catalin Marinas       2009-02-11  160  		frame.fp = (unsigned long)__builtin_frame_address(0);
74dbeee0fcded9 Behan Webster         2014-09-27  161  		frame.sp = current_stack_pointer;
2d7c11bfc91637 Catalin Marinas       2009-02-11  162  		frame.lr = (unsigned long)__builtin_return_address(0);
c46c2c9b43f4f0 Russell King (Oracle  2022-03-09 @163) here:
c46c2c9b43f4f0 Russell King (Oracle  2022-03-09  164) 		frame.pc = (unsigned long)&&here;
f76e9154736e9a Nicolas Pitre         2008-04-24  165  	}
fed240d9c97438 Masami Hiramatsu      2021-10-21  166  #ifdef CONFIG_KRETPROBES
fed240d9c97438 Masami Hiramatsu      2021-10-21  167  	frame.kr_cur = NULL;
fed240d9c97438 Masami Hiramatsu      2021-10-21  168  	frame.tsk = tsk;
fed240d9c97438 Masami Hiramatsu      2021-10-21  169  #endif
f16fb1ecc5a1cb Russell King          2007-04-28  170  
2d7c11bfc91637 Catalin Marinas       2009-02-11  171  	walk_stackframe(&frame, save_trace, &data);
f76e9154736e9a Nicolas Pitre         2008-04-24  172  }
f76e9154736e9a Nicolas Pitre         2008-04-24  173  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

end of thread, other threads:[~2022-12-22  4:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-07  7:24 arch/arm/kernel/stacktrace.c:163:1: warning: Label 'here' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration] kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2022-12-22  4:39 kernel test robot
2022-11-14  8:03 kernel test robot
2022-11-07 13:38 kernel test robot
2022-11-07  5:53 kernel test robot
2022-07-28  6:41 kernel test robot
2022-05-03  2:36 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.