* [PATCH 2/3] ACPI/Thermal: Remove unused macro in the driver/acpi/thermal.c
2013-08-14 13:00 [PATCH 1/3] ACPI/Thermal: Remove the unused lock of struct acpi_thermal tianyu.lan
@ 2013-08-14 13:00 ` tianyu.lan
2013-08-14 13:00 ` [PATCH 3/3] ACPI/Thermal: Use THERMAL_TRIPS_NONE macro to replace number tianyu.lan
2013-08-14 17:05 ` [PATCH 1/3] ACPI/Thermal: Remove the unused lock of struct acpi_thermal R, Durgadoss
2 siblings, 0 replies; 6+ messages in thread
From: tianyu.lan @ 2013-08-14 13:00 UTC (permalink / raw)
To: rjw, lenb; +Cc: Lan Tianyu, linux-acpi, rui.zhang
From: Lan Tianyu <tianyu.lan@intel.com>
The ACPI_THERMAL_FILE* macros are not used now and so remove them.
Acked-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
---
drivers/acpi/thermal.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 850818d..71ab083 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -50,11 +50,6 @@
#define ACPI_THERMAL_CLASS "thermal_zone"
#define ACPI_THERMAL_DEVICE_NAME "Thermal Zone"
-#define ACPI_THERMAL_FILE_STATE "state"
-#define ACPI_THERMAL_FILE_TEMPERATURE "temperature"
-#define ACPI_THERMAL_FILE_TRIP_POINTS "trip_points"
-#define ACPI_THERMAL_FILE_COOLING_MODE "cooling_mode"
-#define ACPI_THERMAL_FILE_POLLING_FREQ "polling_frequency"
#define ACPI_THERMAL_NOTIFY_TEMPERATURE 0x80
#define ACPI_THERMAL_NOTIFY_THRESHOLDS 0x81
#define ACPI_THERMAL_NOTIFY_DEVICES 0x82
--
1.8.4.rc0.1.g8f6a3e5.dirty
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] ACPI/Thermal: Use THERMAL_TRIPS_NONE macro to replace number
2013-08-14 13:00 [PATCH 1/3] ACPI/Thermal: Remove the unused lock of struct acpi_thermal tianyu.lan
2013-08-14 13:00 ` [PATCH 2/3] ACPI/Thermal: Remove unused macro in the driver/acpi/thermal.c tianyu.lan
@ 2013-08-14 13:00 ` tianyu.lan
2013-08-14 17:05 ` [PATCH 1/3] ACPI/Thermal: Remove the unused lock of struct acpi_thermal R, Durgadoss
2 siblings, 0 replies; 6+ messages in thread
From: tianyu.lan @ 2013-08-14 13:00 UTC (permalink / raw)
To: rjw, lenb; +Cc: Lan Tianyu, linux-acpi, rui.zhang
From: Lan Tianyu <tianyu.lan@intel.com>
It's unreadable to pass "-1" as trip param directly to thermal_zone_bind_cooling_device.
So use THERMAL_TRIPS_NONE to replace it.
Acked-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
---
drivers/acpi/thermal.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 71ab083..9063239 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -833,12 +833,13 @@ static int acpi_thermal_cooling_device_cb(struct thermal_zone_device *thermal,
if (ACPI_SUCCESS(status) && (dev == device)) {
if (bind)
result = thermal_zone_bind_cooling_device
- (thermal, -1, cdev,
- THERMAL_NO_LIMIT,
+ (thermal, THERMAL_TRIPS_NONE,
+ cdev, THERMAL_NO_LIMIT,
THERMAL_NO_LIMIT);
else
result = thermal_zone_unbind_cooling_device
- (thermal, -1, cdev);
+ (thermal, THERMAL_TRIPS_NONE,
+ cdev);
if (result)
goto failed;
}
--
1.8.4.rc0.1.g8f6a3e5.dirty
^ permalink raw reply related [flat|nested] 6+ messages in thread* RE: [PATCH 1/3] ACPI/Thermal: Remove the unused lock of struct acpi_thermal
2013-08-14 13:00 [PATCH 1/3] ACPI/Thermal: Remove the unused lock of struct acpi_thermal tianyu.lan
2013-08-14 13:00 ` [PATCH 2/3] ACPI/Thermal: Remove unused macro in the driver/acpi/thermal.c tianyu.lan
2013-08-14 13:00 ` [PATCH 3/3] ACPI/Thermal: Use THERMAL_TRIPS_NONE macro to replace number tianyu.lan
@ 2013-08-14 17:05 ` R, Durgadoss
2013-08-15 0:28 ` Lan Tianyu
2 siblings, 1 reply; 6+ messages in thread
From: R, Durgadoss @ 2013-08-14 17:05 UTC (permalink / raw)
To: rjw@sisk.pl, lenb@kernel.org
Cc: Lan, Tianyu, linux-acpi@vger.kernel.org, Zhang, Rui
> -----Original Message-----
> From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi-
> owner@vger.kernel.org] On Behalf Of tianyu.lan@intel.com
> Sent: Wednesday, August 14, 2013 6:31 PM
> To: rjw@sisk.pl; lenb@kernel.org
> Cc: Lan, Tianyu; linux-acpi@vger.kernel.org; Zhang, Rui
> Subject: [PATCH 1/3] ACPI/Thermal: Remove the unused lock of struct
> acpi_thermal
>
> From: Lan Tianyu <tianyu.lan@intel.com>
>
> The acpi_thermal->lock now just is initialized when thermal zone device
> is added and destroyed when thermal zone is removed. Never being used
> any other places. So remove it.
>
Hi Tianyu,
Very Nice catch. All three patches look fine to me.
For all three,
Acked-by: Durgadoss R <durgadoss.r@intel.com>
Thanks,
Durga
> Acked-by: Zhang Rui <rui.zhang@intel.com>
> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
> ---
> drivers/acpi/thermal.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
> index a3e38a0..850818d 100644
> --- a/drivers/acpi/thermal.c
> +++ b/drivers/acpi/thermal.c
> @@ -190,7 +190,6 @@ struct acpi_thermal {
> struct thermal_zone_device *thermal_zone;
> int tz_enabled;
> int kelvin_offset;
> - struct mutex lock;
> };
>
> /* --------------------------------------------------------------------------
> @@ -1088,8 +1087,6 @@ static int acpi_thermal_add(struct acpi_device *device)
> strcpy(acpi_device_name(device), ACPI_THERMAL_DEVICE_NAME);
> strcpy(acpi_device_class(device), ACPI_THERMAL_CLASS);
> device->driver_data = tz;
> - mutex_init(&tz->lock);
> -
>
> result = acpi_thermal_get_info(tz);
> if (result)
> @@ -1122,7 +1119,6 @@ static int acpi_thermal_remove(struct acpi_device
> *device)
> tz = acpi_driver_data(device);
>
> acpi_thermal_unregister_thermal_zone(tz);
> - mutex_destroy(&tz->lock);
> kfree(tz);
> return 0;
> }
> --
> 1.8.4.rc0.1.g8f6a3e5.dirty
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 1/3] ACPI/Thermal: Remove the unused lock of struct acpi_thermal
2013-08-14 17:05 ` [PATCH 1/3] ACPI/Thermal: Remove the unused lock of struct acpi_thermal R, Durgadoss
@ 2013-08-15 0:28 ` Lan Tianyu
2013-08-19 23:39 ` Rafael J. Wysocki
0 siblings, 1 reply; 6+ messages in thread
From: Lan Tianyu @ 2013-08-15 0:28 UTC (permalink / raw)
To: R, Durgadoss
Cc: rjw@sisk.pl, lenb@kernel.org, linux-acpi@vger.kernel.org,
Zhang, Rui
On 2013年08月15日 01:05, R, Durgadoss wrote:
>
>> -----Original Message-----
>> From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi-
>> owner@vger.kernel.org] On Behalf Of tianyu.lan@intel.com
>> Sent: Wednesday, August 14, 2013 6:31 PM
>> To: rjw@sisk.pl; lenb@kernel.org
>> Cc: Lan, Tianyu; linux-acpi@vger.kernel.org; Zhang, Rui
>> Subject: [PATCH 1/3] ACPI/Thermal: Remove the unused lock of struct
>> acpi_thermal
>>
>> From: Lan Tianyu <tianyu.lan@intel.com>
>>
>> The acpi_thermal->lock now just is initialized when thermal zone device
>> is added and destroyed when thermal zone is removed. Never being used
>> any other places. So remove it.
>>
>
> Hi Tianyu,
>
> Very Nice catch. All three patches look fine to me.
> For all three,
> Acked-by: Durgadoss R <durgadoss.r@intel.com>
Thanks for Acks.
>
> Thanks,
> Durga
>
>> Acked-by: Zhang Rui <rui.zhang@intel.com>
>> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
>> ---
>> drivers/acpi/thermal.c | 4 ----
>> 1 file changed, 4 deletions(-)
>>
>> diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
>> index a3e38a0..850818d 100644
>> --- a/drivers/acpi/thermal.c
>> +++ b/drivers/acpi/thermal.c
>> @@ -190,7 +190,6 @@ struct acpi_thermal {
>> struct thermal_zone_device *thermal_zone;
>> int tz_enabled;
>> int kelvin_offset;
>> - struct mutex lock;
>> };
>>
>> /* --------------------------------------------------------------------------
>> @@ -1088,8 +1087,6 @@ static int acpi_thermal_add(struct acpi_device *device)
>> strcpy(acpi_device_name(device), ACPI_THERMAL_DEVICE_NAME);
>> strcpy(acpi_device_class(device), ACPI_THERMAL_CLASS);
>> device->driver_data = tz;
>> - mutex_init(&tz->lock);
>> -
>>
>> result = acpi_thermal_get_info(tz);
>> if (result)
>> @@ -1122,7 +1119,6 @@ static int acpi_thermal_remove(struct acpi_device
>> *device)
>> tz = acpi_driver_data(device);
>>
>> acpi_thermal_unregister_thermal_zone(tz);
>> - mutex_destroy(&tz->lock);
>> kfree(tz);
>> return 0;
>> }
>> --
>> 1.8.4.rc0.1.g8f6a3e5.dirty
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Best regards
Tianyu Lan
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 1/3] ACPI/Thermal: Remove the unused lock of struct acpi_thermal
2013-08-15 0:28 ` Lan Tianyu
@ 2013-08-19 23:39 ` Rafael J. Wysocki
0 siblings, 0 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2013-08-19 23:39 UTC (permalink / raw)
To: Lan Tianyu
Cc: R, Durgadoss, lenb@kernel.org, linux-acpi@vger.kernel.org,
Zhang, Rui
On Thursday, August 15, 2013 08:28:58 AM Lan Tianyu wrote:
> On 2013年08月15日 01:05, R, Durgadoss wrote:
> >
> >> -----Original Message-----
> >> From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi-
> >> owner@vger.kernel.org] On Behalf Of tianyu.lan@intel.com
> >> Sent: Wednesday, August 14, 2013 6:31 PM
> >> To: rjw@sisk.pl; lenb@kernel.org
> >> Cc: Lan, Tianyu; linux-acpi@vger.kernel.org; Zhang, Rui
> >> Subject: [PATCH 1/3] ACPI/Thermal: Remove the unused lock of struct
> >> acpi_thermal
> >>
> >> From: Lan Tianyu <tianyu.lan@intel.com>
> >>
> >> The acpi_thermal->lock now just is initialized when thermal zone device
> >> is added and destroyed when thermal zone is removed. Never being used
> >> any other places. So remove it.
> >>
> >
> > Hi Tianyu,
> >
> > Very Nice catch. All three patches look fine to me.
> > For all three,
> > Acked-by: Durgadoss R <durgadoss.r@intel.com>
>
> Thanks for Acks.
Whole series queued up for 3.12.
Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread