From: Alexander Beregalov <a.beregalov@gmail.com>
To: mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: [PATCH] x86/intel_cacheinfo: fix warning defined but not used
Date: Wed, 15 Oct 2008 21:16:24 +0400 [thread overview]
Message-ID: <20081015171624.GA30703@orion> (raw)
arch/x86/kernel/cpu/intel_cacheinfo.c:527: warning: 'free_cache_attributes' defined but not used
arch/x86/kernel/cpu/intel_cacheinfo.c:538: warning: 'detect_cache_attributes' defined but not used
Compile tested with and without sysfs.
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
---
arch/x86/kernel/cpu/intel_cacheinfo.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
index 3f46afb..a8c226d 100644
--- a/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -475,6 +475,12 @@ unsigned int __cpuinit init_intel_cacheinfo(struct cpuinfo_x86 *c)
return l2;
}
+
+#ifdef CONFIG_SYSFS
+
+#include <linux/kobject.h>
+#include <linux/sysfs.h>
+
/* pointer to _cpuid4_info array (for each cache leaf) */
static DEFINE_PER_CPU(struct _cpuid4_info *, cpuid4_info);
#define CPUID4_INFO_IDX(x, y) (&((per_cpu(cpuid4_info, x))[y]))
@@ -521,7 +527,7 @@ static void __cpuinit cache_remove_shared_cpu_map(unsigned int cpu, int index)
#else
static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) {}
static void __cpuinit cache_remove_shared_cpu_map(unsigned int cpu, int index) {}
-#endif
+#endif /* !CONFIG_SMP */
static void __cpuinit free_cache_attributes(unsigned int cpu)
{
@@ -578,11 +584,6 @@ out:
return retval;
}
-#ifdef CONFIG_SYSFS
-
-#include <linux/kobject.h>
-#include <linux/sysfs.h>
-
extern struct sysdev_class cpu_sysdev_class; /* from drivers/base/cpu.c */
/* pointer to kobject for cpuX/cache */
reply other threads:[~2008-10-15 17:16 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=20081015171624.GA30703@orion \
--to=a.beregalov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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