linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] powerpc64/ftrace: Drop pointless static qualifier in is_b_op()
@ 2018-11-13 13:56 YueHaibing
  2018-11-13 14:26 ` Naveen N. Rao
  2018-11-27  9:22 ` [-next] " Michael Ellerman
  0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2018-11-13 13:56 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Nicholas Piggin, Naveen N. Rao, Kate Stewart,
	Steven Rostedt (VMware),
	Greg Kroah-Hartman
  Cc: linuxppc-dev, kernel-janitors, YueHaibing, linux-kernel

There is no need to have the 'intoffset' variable static since new value
always be assigned before use it.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 arch/powerpc/kernel/trace/ftrace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/trace/ftrace.c b/arch/powerpc/kernel/trace/ftrace.c
index 4bf051d..65248d4 100644
--- a/arch/powerpc/kernel/trace/ftrace.c
+++ b/arch/powerpc/kernel/trace/ftrace.c
@@ -107,7 +107,7 @@ static int is_b_op(unsigned int op)
 
 static unsigned long find_bl_target(unsigned long ip, unsigned int op)
 {
-	static int offset;
+	int offset;
 
 	offset = (op & 0x03fffffc);
 	/* make it signed */




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

* Re: [PATCH -next] powerpc64/ftrace: Drop pointless static qualifier in is_b_op()
  2018-11-13 13:56 [PATCH -next] powerpc64/ftrace: Drop pointless static qualifier in is_b_op() YueHaibing
@ 2018-11-13 14:26 ` Naveen N. Rao
  2018-11-27  9:22 ` [-next] " Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Naveen N. Rao @ 2018-11-13 14:26 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Greg Kroah-Hartman, Kate Stewart,
	Michael Ellerman, Nicholas Piggin, Paul Mackerras,
	Steven Rostedt (VMware),
	YueHaibing
  Cc: linuxppc-dev, kernel-janitors, linux-kernel

YueHaibing wrote:
> There is no need to have the 'intoffset' variable static since new value
> always be assigned before use it.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  arch/powerpc/kernel/trace/ftrace.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/kernel/trace/ftrace.c b/arch/powerpc/kernel/trace/ftrace.c
> index 4bf051d..65248d4 100644
> --- a/arch/powerpc/kernel/trace/ftrace.c
> +++ b/arch/powerpc/kernel/trace/ftrace.c
> @@ -107,7 +107,7 @@ static int is_b_op(unsigned int op)
> 
>  static unsigned long find_bl_target(unsigned long ip, unsigned int op)
>  {
> -	static int offset;
> +	int offset;

That seems to go all the way back to the original commit by Steven.
Good catch.
Reviewed-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>

- Naveen



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

* Re: [-next] powerpc64/ftrace: Drop pointless static qualifier in is_b_op()
  2018-11-13 13:56 [PATCH -next] powerpc64/ftrace: Drop pointless static qualifier in is_b_op() YueHaibing
  2018-11-13 14:26 ` Naveen N. Rao
@ 2018-11-27  9:22 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2018-11-27  9:22 UTC (permalink / raw)
  To: YueHaibing, Benjamin Herrenschmidt, Paul Mackerras,
	Nicholas Piggin, Naveen N. Rao, Kate Stewart,
	Steven Rostedt (VMware),
	Greg Kroah-Hartman
  Cc: kernel-janitors, YueHaibing, linuxppc-dev, linux-kernel

On Tue, 2018-11-13 at 13:56:56 UTC, YueHaibing wrote:
> There is no need to have the 'intoffset' variable static since new value
> always be assigned before use it.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> Reviewed-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/d64cf54e89c86487c1369991af79d8

cheers

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

end of thread, other threads:[~2018-11-27  9:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-13 13:56 [PATCH -next] powerpc64/ftrace: Drop pointless static qualifier in is_b_op() YueHaibing
2018-11-13 14:26 ` Naveen N. Rao
2018-11-27  9:22 ` [-next] " Michael Ellerman

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).