* [PATCH -next] powerpc/perf/hv-24x7: Make some symbols static
@ 2021-04-09 9:01 Bixuan Cui
2021-04-12 14:17 ` kajoljain
2021-04-19 3:59 ` Michael Ellerman
0 siblings, 2 replies; 3+ messages in thread
From: Bixuan Cui @ 2021-04-09 9:01 UTC (permalink / raw)
To: cuibixuan, Michael Ellerman, Kajol Jain, Gautham R. Shenoy,
Madhavan Srinivasan
Cc: linuxppc-dev, linux-kernel, kernel-janitors
The sparse tool complains as follows:
arch/powerpc/perf/hv-24x7.c:229:1: warning:
symbol '__pcpu_scope_hv_24x7_txn_flags' was not declared. Should it be static?
arch/powerpc/perf/hv-24x7.c:230:1: warning:
symbol '__pcpu_scope_hv_24x7_txn_err' was not declared. Should it be static?
arch/powerpc/perf/hv-24x7.c:236:1: warning:
symbol '__pcpu_scope_hv_24x7_hw' was not declared. Should it be static?
arch/powerpc/perf/hv-24x7.c:244:1: warning:
symbol '__pcpu_scope_hv_24x7_reqb' was not declared. Should it be static?
arch/powerpc/perf/hv-24x7.c:245:1: warning:
symbol '__pcpu_scope_hv_24x7_resb' was not declared. Should it be static?
This symbol is not used outside of hv-24x7.c, so this
commit marks it static.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
---
arch/powerpc/perf/hv-24x7.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c
index e5eb33255066..1816f560a465 100644
--- a/arch/powerpc/perf/hv-24x7.c
+++ b/arch/powerpc/perf/hv-24x7.c
@@ -226,14 +226,14 @@ static struct attribute_group event_long_desc_group = {
static struct kmem_cache *hv_page_cache;
-DEFINE_PER_CPU(int, hv_24x7_txn_flags);
-DEFINE_PER_CPU(int, hv_24x7_txn_err);
+static DEFINE_PER_CPU(int, hv_24x7_txn_flags);
+static DEFINE_PER_CPU(int, hv_24x7_txn_err);
struct hv_24x7_hw {
struct perf_event *events[255];
};
-DEFINE_PER_CPU(struct hv_24x7_hw, hv_24x7_hw);
+static DEFINE_PER_CPU(struct hv_24x7_hw, hv_24x7_hw);
/*
* request_buffer and result_buffer are not required to be 4k aligned,
@@ -241,8 +241,8 @@ DEFINE_PER_CPU(struct hv_24x7_hw, hv_24x7_hw);
* the simplest way to ensure that.
*/
#define H24x7_DATA_BUFFER_SIZE 4096
-DEFINE_PER_CPU(char, hv_24x7_reqb[H24x7_DATA_BUFFER_SIZE]) __aligned(4096);
-DEFINE_PER_CPU(char, hv_24x7_resb[H24x7_DATA_BUFFER_SIZE]) __aligned(4096);
+static DEFINE_PER_CPU(char, hv_24x7_reqb[H24x7_DATA_BUFFER_SIZE]) __aligned(4096);
+static DEFINE_PER_CPU(char, hv_24x7_resb[H24x7_DATA_BUFFER_SIZE]) __aligned(4096);
static unsigned int max_num_requests(int interface_version)
{
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] powerpc/perf/hv-24x7: Make some symbols static
2021-04-09 9:01 [PATCH -next] powerpc/perf/hv-24x7: Make some symbols static Bixuan Cui
@ 2021-04-12 14:17 ` kajoljain
2021-04-19 3:59 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: kajoljain @ 2021-04-12 14:17 UTC (permalink / raw)
To: Bixuan Cui, Michael Ellerman, Gautham R. Shenoy, Madhavan Srinivasan
Cc: linuxppc-dev, linux-kernel, kernel-janitors
On 4/9/21 2:31 PM, Bixuan Cui wrote:
> The sparse tool complains as follows:
>
> arch/powerpc/perf/hv-24x7.c:229:1: warning:
> symbol '__pcpu_scope_hv_24x7_txn_flags' was not declared. Should it be static?
> arch/powerpc/perf/hv-24x7.c:230:1: warning:
> symbol '__pcpu_scope_hv_24x7_txn_err' was not declared. Should it be static?
> arch/powerpc/perf/hv-24x7.c:236:1: warning:
> symbol '__pcpu_scope_hv_24x7_hw' was not declared. Should it be static?
> arch/powerpc/perf/hv-24x7.c:244:1: warning:
> symbol '__pcpu_scope_hv_24x7_reqb' was not declared. Should it be static?
> arch/powerpc/perf/hv-24x7.c:245:1: warning:
> symbol '__pcpu_scope_hv_24x7_resb' was not declared. Should it be static?
>
> This symbol is not used outside of hv-24x7.c, so this
> commit marks it static.
Patch looks good to me.
Reviewed-By: Kajol Jain<kjain@linux.ibm.com>
Thanks,
Kajol jain
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
> ---
> arch/powerpc/perf/hv-24x7.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c
> index e5eb33255066..1816f560a465 100644
> --- a/arch/powerpc/perf/hv-24x7.c
> +++ b/arch/powerpc/perf/hv-24x7.c
> @@ -226,14 +226,14 @@ static struct attribute_group event_long_desc_group = {
>
> static struct kmem_cache *hv_page_cache;
>
> -DEFINE_PER_CPU(int, hv_24x7_txn_flags);
> -DEFINE_PER_CPU(int, hv_24x7_txn_err);
> +static DEFINE_PER_CPU(int, hv_24x7_txn_flags);
> +static DEFINE_PER_CPU(int, hv_24x7_txn_err);
>
> struct hv_24x7_hw {
> struct perf_event *events[255];
> };
>
> -DEFINE_PER_CPU(struct hv_24x7_hw, hv_24x7_hw);
> +static DEFINE_PER_CPU(struct hv_24x7_hw, hv_24x7_hw);
>
> /*
> * request_buffer and result_buffer are not required to be 4k aligned,
> @@ -241,8 +241,8 @@ DEFINE_PER_CPU(struct hv_24x7_hw, hv_24x7_hw);
> * the simplest way to ensure that.
> */
> #define H24x7_DATA_BUFFER_SIZE 4096
> -DEFINE_PER_CPU(char, hv_24x7_reqb[H24x7_DATA_BUFFER_SIZE]) __aligned(4096);
> -DEFINE_PER_CPU(char, hv_24x7_resb[H24x7_DATA_BUFFER_SIZE]) __aligned(4096);
> +static DEFINE_PER_CPU(char, hv_24x7_reqb[H24x7_DATA_BUFFER_SIZE]) __aligned(4096);
> +static DEFINE_PER_CPU(char, hv_24x7_resb[H24x7_DATA_BUFFER_SIZE]) __aligned(4096);
>
> static unsigned int max_num_requests(int interface_version)
> {
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] powerpc/perf/hv-24x7: Make some symbols static
2021-04-09 9:01 [PATCH -next] powerpc/perf/hv-24x7: Make some symbols static Bixuan Cui
2021-04-12 14:17 ` kajoljain
@ 2021-04-19 3:59 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2021-04-19 3:59 UTC (permalink / raw)
To: Madhavan Srinivasan, Bixuan Cui, Michael Ellerman, Kajol Jain,
Gautham R. Shenoy
Cc: kernel-janitors, linuxppc-dev, linux-kernel
On Fri, 9 Apr 2021 17:01:24 +0800, Bixuan Cui wrote:
> The sparse tool complains as follows:
>
> arch/powerpc/perf/hv-24x7.c:229:1: warning:
> symbol '__pcpu_scope_hv_24x7_txn_flags' was not declared. Should it be static?
> arch/powerpc/perf/hv-24x7.c:230:1: warning:
> symbol '__pcpu_scope_hv_24x7_txn_err' was not declared. Should it be static?
> arch/powerpc/perf/hv-24x7.c:236:1: warning:
> symbol '__pcpu_scope_hv_24x7_hw' was not declared. Should it be static?
> arch/powerpc/perf/hv-24x7.c:244:1: warning:
> symbol '__pcpu_scope_hv_24x7_reqb' was not declared. Should it be static?
> arch/powerpc/perf/hv-24x7.c:245:1: warning:
> symbol '__pcpu_scope_hv_24x7_resb' was not declared. Should it be static?
>
> [...]
Applied to powerpc/next.
[1/1] powerpc/perf/hv-24x7: Make some symbols static
https://git.kernel.org/powerpc/c/cc331eee03eadd750af1fb957d020b3f24e5e056
cheers
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-04-19 4:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09 9:01 [PATCH -next] powerpc/perf/hv-24x7: Make some symbols static Bixuan Cui
2021-04-12 14:17 ` kajoljain
2021-04-19 3:59 ` 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).