Skip to contentSkip to conversation

delete unnecessary BUG_ON !policy->cur

RFC PATCH In review Luming Yu 1 participant 2 messages Sep 22, 2009 CPU frequency scaling framework

lore
Share & tools
lore

Luming Yu

author
#0 lore raw

RFC PATCH 1/1 delete unnecessary BUG_ON !policy->cur

Hi there,

When testing upstream Git tree, there is a BUG_ON hit on a IA64 system with RHEL 5 user space installed.
Please review the patch below, If make sense, please apply.

Ps. The patch is enclosed in attachment. The inlined one is c&p of it for reading.

Thanks,
Luming

 cpufreq_userspace.c |    1 -
 1 file changed, 1 deletion(-)
(quoted diff) +0 -0

b/drivers/cpufreq/cpufreq_userspace.c
index 66d2d1d..63bd232 100644

drivers/cpufreq/cpufreq_userspace.c +0 -1
@@ -119,7 +119,6 @@ static int cpufreq_governor_userspace(st
 	case CPUFREQ_GOV_START:
 		if (!cpu_online(cpu))
 			return -EINVAL;
-		BUG_ON(!policy->cur);
 		mutex_lock(&userspace_mutex);
 
 		if (cpus_using_userspace_governor == 0) {
author
#1 lore raw

Patch attached!

Quoted 30 lines · Luming Yu

Hi there,

When testing upstream Git tree, there is a BUG_ON hit on a IA64 system with RHEL 5 user space installed.
Please review the patch below, If make sense, please apply.

Ps. The patch is enclosed in attachment. The inlined one is c&p of it for reading.

Thanks,
Luming

 cpufreq_userspace.c |    1 -

 1 file changed, 1 deletion(-)
drivers/cpufreq/cpufreq_userspace.c +0 -0
index 66d2d1d..63bd232 100644
@@ -119,7 +119,6 @@ static int cpufreq_governor_userspace(st

       case CPUFREQ_GOV_START:
               if (!cpu_online(cpu))
                       return -EINVAL;
-               BUG_ON(!policy->cur);
               mutex_lock(&userspace_mutex);

Quoted 2 lines

               if (cpus_using_userspace_governor == 0) {

drivers/cpufreq/cpufreq_userspace.c +0 -1
index 66d2d1d..63bd232 100644
@@ -119,7 +119,6 @@ static int cpufreq_governor_userspace(st
 	case CPUFREQ_GOV_START:
 		if (!cpu_online(cpu))
 			return -EINVAL;
-		BUG_ON(!policy->cur);
 		mutex_lock(&userspace_mutex);
 
 		if (cpus_using_userspace_governor == 0) {