Patches contributed by Eötvös Lorand University


commit c7cc77307669336a08928ab8668bdb3f3bcc021b
Merge: 0bfc24559d79 d144d5ee6a26 437f24fb897d f3f47a6768a2
Author: Ingo Molnar <mingo@elte.hu>
Date:   Thu Nov 27 10:56:13 2008 +0100

    Merge branches 'tracing/blktrace', 'tracing/ftrace', 'tracing/function-graph-tracer' and 'tracing/power-tracer' into tracing/core

diff --cc include/linux/ftrace.h
index 7854d87b97b2,7854d87b97b2,f9792c0d73f6,0df288666201..afba918c623c
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@@@@ -311,7 -311,7 -316,15 -311,36 +316,44 @@@@@ ftrace_init_module(struct module *mod
    		   unsigned long *start, unsigned long *end) { }
    #endif
    
+++ enum {
+++ 	POWER_NONE = 0,
+++ 	POWER_CSTATE = 1,
+++ 	POWER_PSTATE = 2,
+++ };
+++ 
+++ struct power_trace {
+++ #ifdef CONFIG_POWER_TRACER
+++ 	ktime_t			stamp;
+++ 	ktime_t			end;
+++ 	int			type;
+++ 	int			state;
+++ #endif
+++ };
+++ 
+++ #ifdef CONFIG_POWER_TRACER
+++ extern void trace_power_start(struct power_trace *it, unsigned int type,
+++ 					unsigned int state);
+++ extern void trace_power_mark(struct power_trace *it, unsigned int type,
+++ 					unsigned int state);
+++ extern void trace_power_end(struct power_trace *it);
+++ #else
+++ static inline void trace_power_start(struct power_trace *it, unsigned int type,
+++ 					unsigned int state) { }
+++ static inline void trace_power_mark(struct power_trace *it, unsigned int type,
+++ 					unsigned int state) { }
+++ static inline void trace_power_end(struct power_trace *it) { }
+++ #endif
+++ 
++  
++ +/*
++ + * Structure that defines an entry function trace.
++ + */
++ +struct ftrace_graph_ent {
++ +	unsigned long func; /* Current function */
++ +	int depth;
++ +};
   +
    /*
     * Structure that defines a return function trace.
     */
diff --cc kernel/trace/Makefile
index cef4bcb4e822,cef4bcb4e822,08c5fe6ddc09,acaa06553eca..62dc561b6676
--- a/kernel/trace/Makefile
+++ b/kernel/trace/Makefile
@@@@@ -29,8 -29,8 -29,8 -29,9 +29,9 @@@@@ obj-$(CONFIG_NOP_TRACER) += trace_nop.
    obj-$(CONFIG_STACK_TRACER) += trace_stack.o
    obj-$(CONFIG_MMIOTRACE) += trace_mmiotrace.o
    obj-$(CONFIG_BOOT_TRACER) += trace_boot.o
-- -obj-$(CONFIG_FUNCTION_RET_TRACER) += trace_functions_return.o
++ +obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += trace_functions_graph.o
    obj-$(CONFIG_TRACE_BRANCH_PROFILING) += trace_branch.o
    obj-$(CONFIG_BTS_TRACER) += trace_bts.o
+++ obj-$(CONFIG_POWER_TRACER) += trace_power.o
    
    libftrace-y := ftrace.o
diff --cc kernel/trace/trace.h
index 3abd645e8af2,3abd645e8af2,7adacf349ef7,4c453778a6ab..f96f4e787ff3
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@@@@ -25,9 -25,9 -25,10 -25,10 +25,11 @@@@@ enum trace_type 
    	TRACE_BRANCH,
    	TRACE_BOOT_CALL,
    	TRACE_BOOT_RET,
-- -	TRACE_FN_RET,
++ +	TRACE_GRAPH_RET,
++ +	TRACE_GRAPH_ENT,
    	TRACE_USER_STACK,
    	TRACE_BTS,
+++ 	TRACE_POWER,
    
    	__TRACE_LAST_TYPE
    };
@@@@@ -264,8 -264,8 -267,11 -270,9 +273,12 @@@@@ extern void __ftrace_bad_type(void)
    		IF_ASSIGN(var, ent, struct trace_boot_call, TRACE_BOOT_CALL);\
    		IF_ASSIGN(var, ent, struct trace_boot_ret, TRACE_BOOT_RET);\
    		IF_ASSIGN(var, ent, struct trace_branch, TRACE_BRANCH); \
-- -		IF_ASSIGN(var, ent, struct ftrace_ret_entry, TRACE_FN_RET);\
++ +		IF_ASSIGN(var, ent, struct ftrace_graph_ent_entry,	\
++ +			  TRACE_GRAPH_ENT);		\
++ +		IF_ASSIGN(var, ent, struct ftrace_graph_ret_entry,	\
++ +			  TRACE_GRAPH_RET);		\
    		IF_ASSIGN(var, ent, struct bts_entry, TRACE_BTS);\
+++  		IF_ASSIGN(var, ent, struct trace_power, TRACE_POWER); \
    		__ftrace_bad_type();					\
    	} while (0)
    

commit 1c39194878c09bd88ffc9c9d4c2f01c3397c7aed
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Nov 26 14:13:42 2008 +0100

    sched: convert struct root_domain to cpumask_var_t, fix
    
    Mathieu Desnoyers reported this build failure on powerpc:
    
     kernel/sched.c: In function 'sd_init_NODE':
     kernel/sched.c:7319: error: non-static initialization of a flexible array member
     kernel/sched.c:7319: error: (near initialization for '(anonymous)')
    
    this happens because .span changed to cpumask_var_t, hence
    the static CPU_MASK_NONE initializers in the SD_*_INIT
    templates are not type-correct anymore.
    
    Remove them, as they default to empty anyway.
    
    Also remove them from IA64, MIPS and SH.
    
    Reported-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/arch/ia64/include/asm/topology.h b/arch/ia64/include/asm/topology.h
index 35bcb641c9e5..a3cc9f65f954 100644
--- a/arch/ia64/include/asm/topology.h
+++ b/arch/ia64/include/asm/topology.h
@@ -55,7 +55,6 @@
 void build_cpu_to_node_map(void);
 
 #define SD_CPU_INIT (struct sched_domain) {		\
-	.span			= CPU_MASK_NONE,	\
 	.parent			= NULL,			\
 	.child			= NULL,			\
 	.groups			= NULL,			\
@@ -80,7 +79,6 @@ void build_cpu_to_node_map(void);
 
 /* sched_domains SD_NODE_INIT for IA64 NUMA machines */
 #define SD_NODE_INIT (struct sched_domain) {		\
-	.span			= CPU_MASK_NONE,	\
 	.parent			= NULL,			\
 	.child			= NULL,			\
 	.groups			= NULL,			\
diff --git a/arch/mips/include/asm/mach-ip27/topology.h b/arch/mips/include/asm/mach-ip27/topology.h
index 7785bec732f2..1fb959f98982 100644
--- a/arch/mips/include/asm/mach-ip27/topology.h
+++ b/arch/mips/include/asm/mach-ip27/topology.h
@@ -37,7 +37,6 @@ extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES];
 
 /* sched_domains SD_NODE_INIT for SGI IP27 machines */
 #define SD_NODE_INIT (struct sched_domain) {		\
-	.span			= CPU_MASK_NONE,	\
 	.parent			= NULL,			\
 	.child			= NULL,			\
 	.groups			= NULL,			\
diff --git a/arch/powerpc/include/asm/topology.h b/arch/powerpc/include/asm/topology.h
index c32da6f97999..373fca394a54 100644
--- a/arch/powerpc/include/asm/topology.h
+++ b/arch/powerpc/include/asm/topology.h
@@ -48,7 +48,6 @@ static inline int pcibus_to_node(struct pci_bus *bus)
 
 /* sched_domains SD_NODE_INIT for PPC64 machines */
 #define SD_NODE_INIT (struct sched_domain) {		\
-	.span			= CPU_MASK_NONE,	\
 	.parent			= NULL,			\
 	.child			= NULL,			\
 	.groups			= NULL,			\
diff --git a/arch/sh/include/asm/topology.h b/arch/sh/include/asm/topology.h
index 95f0085e098a..279d9cc4a007 100644
--- a/arch/sh/include/asm/topology.h
+++ b/arch/sh/include/asm/topology.h
@@ -5,7 +5,6 @@
 
 /* sched_domains SD_NODE_INIT for sh machines */
 #define SD_NODE_INIT (struct sched_domain) {		\
-	.span			= CPU_MASK_NONE,	\
 	.parent			= NULL,			\
 	.child			= NULL,			\
 	.groups			= NULL,			\

commit 0bfc24559d7945506184d86739fe365a181f06b7
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Nov 26 11:59:56 2008 +0100

    blktrace: port to tracepoints, update
    
    Port to the new tracepoints API: split DEFINE_TRACE() and DECLARE_TRACE()
    sites. Spread them out to the usage sites, as suggested by
    Mathieu Desnoyers.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Acked-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>

diff --git a/block/blk-core.c b/block/blk-core.c
index 04267d66a2b9..0c06cf5aaaf8 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -32,6 +32,19 @@
 
 #include "blk.h"
 
+DEFINE_TRACE(block_plug);
+DEFINE_TRACE(block_unplug_io);
+DEFINE_TRACE(block_unplug_timer);
+DEFINE_TRACE(block_getrq);
+DEFINE_TRACE(block_sleeprq);
+DEFINE_TRACE(block_rq_requeue);
+DEFINE_TRACE(block_bio_backmerge);
+DEFINE_TRACE(block_bio_frontmerge);
+DEFINE_TRACE(block_bio_queue);
+DEFINE_TRACE(block_rq_complete);
+DEFINE_TRACE(block_remap);	/* Also used in drivers/md/dm.c */
+EXPORT_TRACEPOINT_SYMBOL_GPL(block_remap);
+
 static int __make_request(struct request_queue *q, struct bio *bio);
 
 /*
diff --git a/block/elevator.c b/block/elevator.c
index 530fcfe2ef07..e5677fe4f412 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -42,6 +42,8 @@
 static DEFINE_SPINLOCK(elv_list_lock);
 static LIST_HEAD(elv_list);
 
+DEFINE_TRACE(block_rq_abort);
+
 /*
  * Merge hash stuff.
  */
@@ -53,6 +55,9 @@ static const int elv_hash_shift = 6;
 #define rq_hash_key(rq)		((rq)->sector + (rq)->nr_sectors)
 #define ELV_ON_HASH(rq)		(!hlist_unhashed(&(rq)->hash))
 
+DEFINE_TRACE(block_rq_insert);
+DEFINE_TRACE(block_rq_issue);
+
 /*
  * Query io scheduler to see if the current process issuing bio may be
  * merged with rq.
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index d23fda178163..343094c3feeb 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -52,6 +52,8 @@ struct dm_target_io {
 	union map_info info;
 };
 
+DEFINE_TRACE(block_bio_complete);
+
 union map_info *dm_get_mapinfo(struct bio *bio)
 {
 	if (bio && bio->bi_private)
diff --git a/fs/bio.c b/fs/bio.c
index 060859c69092..df99c882b807 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -29,6 +29,8 @@
 #include <trace/block.h>
 #include <scsi/sg.h>		/* for struct sg_iovec */
 
+DEFINE_TRACE(block_split);
+
 static struct kmem_cache *bio_slab __read_mostly;
 
 static mempool_t *bio_split_pool __read_mostly;
diff --git a/include/trace/block.h b/include/trace/block.h
index 3cc2675ebf01..25c6a1fd5b77 100644
--- a/include/trace/block.h
+++ b/include/trace/block.h
@@ -4,57 +4,73 @@
 #include <linux/blkdev.h>
 #include <linux/tracepoint.h>
 
-DEFINE_TRACE(block_rq_abort,
+DECLARE_TRACE(block_rq_abort,
 	TPPROTO(struct request_queue *q, struct request *rq),
-	TPARGS(q, rq));
-DEFINE_TRACE(block_rq_insert,
+		TPARGS(q, rq));
+
+DECLARE_TRACE(block_rq_insert,
 	TPPROTO(struct request_queue *q, struct request *rq),
-	TPARGS(q, rq));
-DEFINE_TRACE(block_rq_issue,
+		TPARGS(q, rq));
+
+DECLARE_TRACE(block_rq_issue,
 	TPPROTO(struct request_queue *q, struct request *rq),
-	TPARGS(q, rq));
-DEFINE_TRACE(block_rq_requeue,
+		TPARGS(q, rq));
+
+DECLARE_TRACE(block_rq_requeue,
 	TPPROTO(struct request_queue *q, struct request *rq),
-	TPARGS(q, rq));
-DEFINE_TRACE(block_rq_complete,
+		TPARGS(q, rq));
+
+DECLARE_TRACE(block_rq_complete,
 	TPPROTO(struct request_queue *q, struct request *rq),
-	TPARGS(q, rq));
-DEFINE_TRACE(block_bio_bounce,
+		TPARGS(q, rq));
+
+DECLARE_TRACE(block_bio_bounce,
 	TPPROTO(struct request_queue *q, struct bio *bio),
-	TPARGS(q, bio));
-DEFINE_TRACE(block_bio_complete,
+		TPARGS(q, bio));
+
+DECLARE_TRACE(block_bio_complete,
 	TPPROTO(struct request_queue *q, struct bio *bio),
-	TPARGS(q, bio));
-DEFINE_TRACE(block_bio_backmerge,
+		TPARGS(q, bio));
+
+DECLARE_TRACE(block_bio_backmerge,
 	TPPROTO(struct request_queue *q, struct bio *bio),
-	TPARGS(q, bio));
-DEFINE_TRACE(block_bio_frontmerge,
+		TPARGS(q, bio));
+
+DECLARE_TRACE(block_bio_frontmerge,
 	TPPROTO(struct request_queue *q, struct bio *bio),
-	TPARGS(q, bio));
-DEFINE_TRACE(block_bio_queue,
+		TPARGS(q, bio));
+
+DECLARE_TRACE(block_bio_queue,
 	TPPROTO(struct request_queue *q, struct bio *bio),
-	TPARGS(q, bio));
-DEFINE_TRACE(block_getrq,
+		TPARGS(q, bio));
+
+DECLARE_TRACE(block_getrq,
 	TPPROTO(struct request_queue *q, struct bio *bio, int rw),
-	TPARGS(q, bio, rw));
-DEFINE_TRACE(block_sleeprq,
+		TPARGS(q, bio, rw));
+
+DECLARE_TRACE(block_sleeprq,
 	TPPROTO(struct request_queue *q, struct bio *bio, int rw),
-	TPARGS(q, bio, rw));
-DEFINE_TRACE(block_plug,
+		TPARGS(q, bio, rw));
+
+DECLARE_TRACE(block_plug,
 	TPPROTO(struct request_queue *q),
-	TPARGS(q));
-DEFINE_TRACE(block_unplug_timer,
+		TPARGS(q));
+
+DECLARE_TRACE(block_unplug_timer,
 	TPPROTO(struct request_queue *q),
-	TPARGS(q));
-DEFINE_TRACE(block_unplug_io,
+		TPARGS(q));
+
+DECLARE_TRACE(block_unplug_io,
 	TPPROTO(struct request_queue *q),
-	TPARGS(q));
-DEFINE_TRACE(block_split,
+		TPARGS(q));
+
+DECLARE_TRACE(block_split,
 	TPPROTO(struct request_queue *q, struct bio *bio, unsigned int pdu),
-	TPARGS(q, bio, pdu));
-DEFINE_TRACE(block_remap,
+		TPARGS(q, bio, pdu));
+
+DECLARE_TRACE(block_remap,
 	TPPROTO(struct request_queue *q, struct bio *bio, dev_t dev,
 		sector_t from, sector_t to),
-	TPARGS(q, bio, dev, from, to));
+		TPARGS(q, bio, dev, from, to));
 
 #endif
diff --git a/mm/bounce.c b/mm/bounce.c
index bd1caaa582b8..bf0cf7c8387b 100644
--- a/mm/bounce.c
+++ b/mm/bounce.c
@@ -22,6 +22,8 @@
 
 static mempool_t *page_pool, *isa_page_pool;
 
+DEFINE_TRACE(block_bio_bounce);
+
 #ifdef CONFIG_HIGHMEM
 static __init int init_emergency_pool(void)
 {

commit 3ae7020543db0b769538e64d1ce8d51fceff60ca
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Nov 26 10:02:00 2008 +0100

    debugobjects: add boot parameter default value
    
    Impact: add .config driven boot parameter default value
    
    Right now debugobjects can only be activated if the debug_objects
    boot parameter is passed in via the boot command line.
    
    Make this more convenient (and randomizable) by also providing
    a .config method. Enable it by default. (DEBUG_OBJECTS itself
    is default-off)
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index b0f239e443bc..124ece1e67ad 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -252,6 +252,14 @@ config DEBUG_OBJECTS_TIMERS
 	  timer routines to track the life time of timer objects and
 	  validate the timer operations.
 
+config DEBUG_OBJECTS_ENABLE_DEFAULT
+	int "debug_objects bootup default value (0-1)"
+        range 0 1
+        default "1"
+        depends on DEBUG_OBJECTS
+        help
+          Debug objects boot parameter default value
+
 config DEBUG_SLAB
 	bool "Debug slab memory allocations"
 	depends on DEBUG_KERNEL && SLAB
diff --git a/lib/debugobjects.c b/lib/debugobjects.c
index e3ab374e1334..5d99be1fd988 100644
--- a/lib/debugobjects.c
+++ b/lib/debugobjects.c
@@ -45,7 +45,9 @@ static struct kmem_cache	*obj_cache;
 static int			debug_objects_maxchain __read_mostly;
 static int			debug_objects_fixups __read_mostly;
 static int			debug_objects_warnings __read_mostly;
-static int			debug_objects_enabled __read_mostly;
+static int			debug_objects_enabled __read_mostly
+				= CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT;
+
 static struct debug_obj_descr	*descr_test  __read_mostly;
 
 static int __init enable_object_debug(char *str)

commit 7fbb8759eff9a348efa5f352ffaa51c364837c4b
Merge: 6003ab0bad4c 13d428afc007
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Nov 26 08:22:50 2008 +0100

    Merge commit 'v2.6.28-rc6' into core/debug

commit c2324b694fa8ffee382a124198c68754088e483c
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Nov 26 03:10:01 2008 +0100

    tracing: function graph tracer, fix
    
    fix return-tracer => graph-tracer namespace rename fallout.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index 2b1f0f081a6b..7def9fd5c1e6 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -1189,7 +1189,7 @@ ENTRY(mcount)
 	cmpl $ftrace_stub, ftrace_trace_function
 	jnz trace
 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
-	cmpl $ftrace_stub, ftrace_graph_function
+	cmpl $ftrace_stub, ftrace_graph_return
 	jnz ftrace_graph_caller
 #endif
 .globl ftrace_stub

commit 46a8494a9de6b88a126993e6012322752f997b88
Author: Ingo Molnar <mingo@elte.hu>
Date:   Tue Nov 25 17:02:20 2008 -0800

    3c523: fix warning in drivers/net/3c523.c
    
    fix warning:
    
      drivers/net/3c523.c:582: warning: ‘cleanup_card’ defined but not used
    
    No code changed:
    
    md5:
       ebe4a1b27d3f21b0b12a78c58463b0d7  3c523.o.before.asm
       ebe4a1b27d3f21b0b12a78c58463b0d7  3c523.o.after.asm
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: David S. Miller <davem@davemloft.net>

diff --git a/drivers/net/3c523.c b/drivers/net/3c523.c
index 59ea2910bcac..d9c9481a59a5 100644
--- a/drivers/net/3c523.c
+++ b/drivers/net/3c523.c
@@ -576,14 +576,14 @@ static int __init do_elmc_probe(struct net_device *dev)
 	return retval;
 }
 
+#ifdef MODULE
 static void cleanup_card(struct net_device *dev)
 {
 	mca_set_adapter_procfn(((struct priv *)netdev_priv(dev))->slot,
 				NULL, NULL);
 	release_region(dev->base_addr, ELMC_IO_EXTENT);
 }
-
-#ifndef MODULE
+#else
 struct net_device * __init elmc_probe(int unit)
 {
 	struct net_device *dev = alloc_etherdev(sizeof(struct priv));

commit 99da1a8a6dc549630733e1cc246265d282fc214e
Author: Ingo Molnar <mingo@elte.hu>
Date:   Tue Nov 25 17:00:39 2008 -0800

    depca: fix warning in drivers/net/depca.c
    
    fix warning:
    
      drivers/net/depca.c: In function ‘depca_eisa_probe’:
      drivers/net/depca.c:1564: warning: ‘mem_start’ may be used uninitialized in this function
    
    this seems to be a real bug - depca_eisa_probe() does not check
    for failure. Add it, symmetric to depca_isa_probe().
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: David S. Miller <davem@davemloft.net>

diff --git a/drivers/net/depca.c b/drivers/net/depca.c
index ec34f03cb982..e4cef491dc73 100644
--- a/drivers/net/depca.c
+++ b/drivers/net/depca.c
@@ -1556,6 +1556,7 @@ static int __init depca_isa_probe (struct platform_device *device)
 #ifdef CONFIG_EISA
 static int __init depca_eisa_probe (struct device *device)
 {
+	enum depca_type adapter = unknown;
 	struct eisa_device *edev;
 	struct net_device *dev;
 	struct depca_private *lp;
@@ -1574,7 +1575,11 @@ static int __init depca_eisa_probe (struct device *device)
 	 * the EISA configuration structures (yet... :-), just rely on
 	 * the ISA probing to sort it out... */
 
-	depca_shmem_probe (&mem_start);
+	adapter = depca_shmem_probe (&mem_start);
+	if (adapter == unknown) {
+		status = -ENODEV;
+		goto out_free;
+	}
 
 	dev->base_addr = ioaddr;
 	dev->irq = irq;

commit a098397d562e2ce5aca7b9b007a4954d88ef8f5e
Author: Ingo Molnar <mingo@elte.hu>
Date:   Tue Nov 25 17:00:05 2008 -0800

    atlx: fix warning in drivers/net/atlx/atl2.c
    
    fix this warning:
    
      drivers/net/atlx/atl2.c: In function ‘atl2_request_irq’:
      drivers/net/atlx/atl2.c:644: warning: unused variable ‘err’
    
    'err' is unused in the !CONFIG_PCI_MSI case.
    
    Instead of further increasing the #ifdeffery in this function,
    restructure the code a bit and get rid of the #ifdef. This
    relies on the fact that pci_enable_msi() will always fail in
    the !CONFIG_PCI_MSI case.
    
    There should be no change in driver behavior.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: David S. Miller <davem@davemloft.net>

diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c
index 0326a84503e3..bc394491b63b 100644
--- a/drivers/net/atlx/atl2.c
+++ b/drivers/net/atlx/atl2.c
@@ -644,7 +644,6 @@ static int atl2_request_irq(struct atl2_adapter *adapter)
 	int flags, err = 0;
 
 	flags = IRQF_SHARED;
-#ifdef CONFIG_PCI_MSI
 	adapter->have_msi = true;
 	err = pci_enable_msi(adapter->pdev);
 	if (err)
@@ -652,7 +651,6 @@ static int atl2_request_irq(struct atl2_adapter *adapter)
 
 	if (adapter->have_msi)
 		flags &= ~IRQF_SHARED;
-#endif
 
 	return request_irq(adapter->pdev->irq, &atl2_intr, flags, netdev->name,
 		netdev);

commit 45555c0ed436b8b06eeaa5c524a3377e6d24fb45
Author: Ingo Molnar <mingo@elte.hu>
Date:   Tue Nov 25 16:59:21 2008 -0800

    bluetooth: fix warning in net/bluetooth/rfcomm/sock.c
    
    fix this warning:
    
      net/bluetooth/rfcomm/sock.c: In function ‘rfcomm_sock_ioctl’:
      net/bluetooth/rfcomm/sock.c:795: warning: unused variable ‘sk’
    
    perhaps BT_DEBUG() should be improved to do printf format checking
    instead of the #ifdef, but that looks quite intrusive: each bluetooth
    .c file undefines the macro.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: David S. Miller <davem@davemloft.net>

diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c
index 8a972b6ba85f..bc0d4a7ce6ae 100644
--- a/net/bluetooth/rfcomm/sock.c
+++ b/net/bluetooth/rfcomm/sock.c
@@ -792,7 +792,9 @@ static int rfcomm_sock_getsockopt(struct socket *sock, int level, int optname, c
 
 static int rfcomm_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
 {
+#if defined(CONFIG_BT_RFCOMM_TTY) || defined(CONFIG_BT_RFCOMM_DEBUG)
 	struct sock *sk = sock->sk;
+#endif
 	int err;
 
 	BT_DBG("sk %p cmd %x arg %lx", sk, cmd, arg);