All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sesterhenn / snakebyte <snakebyte@gmx.de>
To: kernel-janitors@vger.kernel.org
Subject: [KJ] [Patch] Fix warnings in intel_cacheinfo.c
Date: Thu, 08 Dec 2005 01:27:53 +0000	[thread overview]
Message-ID: <1134005274.19980.3.camel@alice> (raw)

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

This patch fixes two compiler warnings in intel_cacheinfo.c when sysfs is not defined.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
---

I hope the patch arrives unmangled and the format and the patch itself are ok.
Thanks for reviewing/forwarding. 
Eric

--- linux-2.6.15-rc5/arch/i386/kernel/cpu/intel_cacheinfo.c.orig	2005-12-08 01:21:58.000000000 +0100
+++ linux-2.6.15-rc5/arch/i386/kernel/cpu/intel_cacheinfo.c	2005-12-08 01:20:33.000000000 +0100
@@ -287,10 +287,13 @@ unsigned int __cpuinit init_intel_cachei
 }
 
 /* pointer to _cpuid4_info array (for each cache leaf) */
+#ifdef CONFIG_SYSFS
 static struct _cpuid4_info *cpuid4_info[NR_CPUS];
 #define CPUID4_INFO_IDX(x,y)    (&((cpuid4_info[x])[y]))
+#endif
 
 #ifdef CONFIG_SMP
+#ifdef CONFIG_SYSFS
 static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index)
 {
 	struct _cpuid4_info	*this_leaf, *sibling_leaf;
@@ -329,11 +332,13 @@ static void __devinit cache_remove_share
 		cpu_clear(cpu, sibling_leaf->shared_cpu_map);
 	}
 }
+#endif
 #else
 static void __init cache_shared_cpu_map_setup(unsigned int cpu, int index) {}
 static void __init cache_remove_shared_cpu_map(unsigned int cpu, int index) {}
 #endif
 
+#ifdef CONFIG_SYSFS
 static void free_cache_attributes(unsigned int cpu)
 {
 	kfree(cpuid4_info[cpu]);
@@ -378,6 +383,7 @@ out:
 		free_cache_attributes(cpu);
 	return retval;
 }
+#endif
 
 #ifdef CONFIG_SYSFS
 



[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

             reply	other threads:[~2005-12-08  1:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-08  1:27 Eric Sesterhenn / snakebyte [this message]
2005-12-14 15:59 ` [KJ] [Patch] Fix warnings in intel_cacheinfo.c Alexey Dobriyan

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=1134005274.19980.3.camel@alice \
    --to=snakebyte@gmx.de \
    --cc=kernel-janitors@vger.kernel.org \
    /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 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.