Skip to contentSkip to conversation

intel_idle: silence a sparse warning

PATCH New Dan Carpenter 1 participant 1 message Nov 16, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 intel_idle: silence a sparse warning

Sparse complains when you cast ints to a 64 bit pointer so I've made this function return a long instead of an int. Here is the Sparse warning:

drivers/idle/intel_idle.c: In function ‘intel_idle_cpuidle_devices_init’:
drivers/idle/intel_idle.c:525:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

drivers/idle/intel_idle.c +1 -1
index 38da9f8..2f38391 100644
@@ -197,7 +197,7 @@ static struct cpuidle_state atom_cstates[MWAIT_MAX_NUM_CSTATES] = {
 		.enter = &intel_idle },
 };
 
-static int get_driver_data(int cstate)
+static long get_driver_data(int cstate)
 {
 	int driver_data;
 	switch (cstate) {