mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Peter Huewe <peterhuewe@gmx.de>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	a.p.zijlstra@chello.nl, peterhuewe@gmx.de, jolsa@redhat.com,
	yuanhan.liu@linux.intel.com, tglx@linutronix.de
Subject: [tip:perf/core] perf/x86: Fix sparse warnings
Date: Tue, 30 Oct 2012 05:24:44 -0700	[thread overview]
Message-ID: <tip-95d18aa2b6c05351181934b3bc34ce038cc7b637@git.kernel.org> (raw)

Commit-ID:  95d18aa2b6c05351181934b3bc34ce038cc7b637
Gitweb:     http://git.kernel.org/tip/95d18aa2b6c05351181934b3bc34ce038cc7b637
Author:     Peter Huewe <peterhuewe@gmx.de>
AuthorDate: Mon, 29 Oct 2012 21:48:17 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 30 Oct 2012 10:10:52 +0100

perf/x86: Fix sparse warnings

FYI, there are new sparse warnings:

 arch/x86/kernel/cpu/perf_event.c:1356:18: sparse: symbol 'events_attr' was not declared. Should it be static?

This patch makes it static and also adds the static keyword to
fix arch/x86/kernel/cpu/perf_event.c:1344:9: warning: symbol
'events_sysfs_show' was not declared.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: fengguang.wu@intel.com
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/n/tip-lerdpXlnruh0yvWs2owwuizl@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/cpu/perf_event.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index 0a55ab2..4428fd1 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -1341,7 +1341,7 @@ static void __init filter_events(struct attribute **attrs)
 	}
 }
 
-ssize_t events_sysfs_show(struct device *dev, struct device_attribute *attr,
+static ssize_t events_sysfs_show(struct device *dev, struct device_attribute *attr,
 			  char *page)
 {
 	struct perf_pmu_events_attr *pmu_attr = \
@@ -1373,7 +1373,7 @@ EVENT_ATTR(ref-cycles,			REF_CPU_CYCLES		);
 
 static struct attribute *empty_attrs;
 
-struct attribute *events_attr[] = {
+static struct attribute *events_attr[] = {
 	EVENT_PTR(CPU_CYCLES),
 	EVENT_PTR(INSTRUCTIONS),
 	EVENT_PTR(CACHE_REFERENCES),

                 reply	other threads:[~2012-10-30 12:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-95d18aa2b6c05351181934b3bc34ce038cc7b637@git.kernel.org \
    --to=peterhuewe@gmx.de \
    --cc=a.p.zijlstra@chello.nl \
    --cc=hpa@zytor.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=yuanhan.liu@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome