return_VALUE(-EINVAL); 
return; 
static int acpi_thermal_passive(struct acpi_thermal *tz){	int result = 0;	struct acpi_thermal_passive *passive = NULL;	int trend = 0;	int i = 0;	ACPI_FUNCTION_TRACE("acpi_thermal_passive");	if (!tz || !tz->trips.passive.flags.valid)		return_VALUE(-EINVAL);	passive = &(tz->trips.passive);	/*	 * Above Trip?	 * -----------	 * Calculate the thermal trend (using the passive cooling equation)	 * and modify the performance limit for all passive cooling devices	 * accordingly.  Note that we assume symmetry.	 */	if (tz->temperature >= passive->temperature) {		trend =		    (passive->tc1 * (tz->temperature - tz->last_temperature)) +		    (passive->tc2 * (tz->temperature - passive->temperature));		ACPI_DEBUG_PRINT((ACPI_DB_INFO,				  "trend[%d]=(tc1[%lu]*(tmp[%lu]-last[%lu]))+(tc2[%lu]*(tmp[%lu]-psv[%lu]))\n",				  trend, passive->tc1, tz->temperature,				  tz->last_temperature, passive->tc2,				  tz->temperature, passive->temperature));		tz->trips.passive.flags.enabled = 1;		/* Heating up? */		if (trend > 0)			for (i = 0; i < passive->devices.count; i++)				acpi_processor_set_thermal_limit(passive->								 devices.								 handles[i],								 ACPI_PROCESSOR_LIMIT_INCREMENT);		/* Cooling off? */		else if (trend < 0)			for (i = 0; i < passive->devices.count; i++)				acpi_processor_set_thermal_limit(passive->								 devices.								 handles[i],								 ACPI_PROCESSOR_LIMIT_DECREMENT);	}	/*	 * Below Trip?	 * -----------	 * Implement passive cooling hysteresis to slowly increase performance	 * and avoid thrashing around the passive trip point.  Note that we	 * assume symmetry.	 */	else if (tz->trips.passive.flags.enabled) {		for (i = 0; i < passive->devices.count; i++)			result =			    acpi_processor_set_thermal_limit(passive->devices.							     handles[i],							     ACPI_PROCESSOR_LIMIT_DECREMENT);		if (result == 1) {			tz->trips.passive.flags.enabled = 0;			ACPI_DEBUG_PRINT((ACPI_DB_INFO,					  "Disabling passive cooling (zone is cool)\n"));		}	}	return_VALUE(0);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/1cbf4c563c0eaaf11c552a88b374e213181c6ddd/thermal.c/buggy/drivers/acpi/thermal.c