Skip to content

Commit 4ae535f

Browse files
committed
thermal: netlink: Drop thermal_notify_tz_trip_add/delete()
Because thermal_notify_tz_trip_add/delete() are never used, drop them entirely along with the related code. The addition or removal of trip points is not supported by the thermal core and is unlikely to be supported in the future, so it is also unlikely that these functions will ever be needed. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
1 parent f52557e commit 4ae535f

2 files changed

Lines changed: 1 addition & 46 deletions

File tree

drivers/thermal/thermal_netlink.c

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ static int thermal_genl_event_tz_trip_up(struct param *p)
148148
return 0;
149149
}
150150

151-
static int thermal_genl_event_tz_trip_add(struct param *p)
151+
static int thermal_genl_event_tz_trip_change(struct param *p)
152152
{
153153
if (nla_put_u32(p->msg, THERMAL_GENL_ATTR_TZ_ID, p->tz_id) ||
154154
nla_put_u32(p->msg, THERMAL_GENL_ATTR_TZ_TRIP_ID, p->trip_id) ||
@@ -160,15 +160,6 @@ static int thermal_genl_event_tz_trip_add(struct param *p)
160160
return 0;
161161
}
162162

163-
static int thermal_genl_event_tz_trip_delete(struct param *p)
164-
{
165-
if (nla_put_u32(p->msg, THERMAL_GENL_ATTR_TZ_ID, p->tz_id) ||
166-
nla_put_u32(p->msg, THERMAL_GENL_ATTR_TZ_TRIP_ID, p->trip_id))
167-
return -EMSGSIZE;
168-
169-
return 0;
170-
}
171-
172163
static int thermal_genl_event_cdev_add(struct param *p)
173164
{
174165
if (nla_put_string(p->msg, THERMAL_GENL_ATTR_CDEV_NAME,
@@ -258,9 +249,6 @@ int thermal_genl_event_tz_disable(struct param *p)
258249
int thermal_genl_event_tz_trip_down(struct param *p)
259250
__attribute__((alias("thermal_genl_event_tz_trip_up")));
260251

261-
int thermal_genl_event_tz_trip_change(struct param *p)
262-
__attribute__((alias("thermal_genl_event_tz_trip_add")));
263-
264252
static cb_t event_cb[] = {
265253
[THERMAL_GENL_EVENT_TZ_CREATE] = thermal_genl_event_tz_create,
266254
[THERMAL_GENL_EVENT_TZ_DELETE] = thermal_genl_event_tz_delete,
@@ -269,8 +257,6 @@ static cb_t event_cb[] = {
269257
[THERMAL_GENL_EVENT_TZ_TRIP_UP] = thermal_genl_event_tz_trip_up,
270258
[THERMAL_GENL_EVENT_TZ_TRIP_DOWN] = thermal_genl_event_tz_trip_down,
271259
[THERMAL_GENL_EVENT_TZ_TRIP_CHANGE] = thermal_genl_event_tz_trip_change,
272-
[THERMAL_GENL_EVENT_TZ_TRIP_ADD] = thermal_genl_event_tz_trip_add,
273-
[THERMAL_GENL_EVENT_TZ_TRIP_DELETE] = thermal_genl_event_tz_trip_delete,
274260
[THERMAL_GENL_EVENT_CDEV_ADD] = thermal_genl_event_cdev_add,
275261
[THERMAL_GENL_EVENT_CDEV_DELETE] = thermal_genl_event_cdev_delete,
276262
[THERMAL_GENL_EVENT_CDEV_STATE_UPDATE] = thermal_genl_event_cdev_state_update,
@@ -366,23 +352,6 @@ int thermal_notify_tz_trip_up(const struct thermal_zone_device *tz,
366352
return thermal_genl_send_event(THERMAL_GENL_EVENT_TZ_TRIP_UP, &p);
367353
}
368354

369-
int thermal_notify_tz_trip_add(int tz_id, int trip_id, int trip_type,
370-
int trip_temp, int trip_hyst)
371-
{
372-
struct param p = { .tz_id = tz_id, .trip_id = trip_id,
373-
.trip_type = trip_type, .trip_temp = trip_temp,
374-
.trip_hyst = trip_hyst };
375-
376-
return thermal_genl_send_event(THERMAL_GENL_EVENT_TZ_TRIP_ADD, &p);
377-
}
378-
379-
int thermal_notify_tz_trip_delete(int tz_id, int trip_id)
380-
{
381-
struct param p = { .tz_id = tz_id, .trip_id = trip_id };
382-
383-
return thermal_genl_send_event(THERMAL_GENL_EVENT_TZ_TRIP_DELETE, &p);
384-
}
385-
386355
int thermal_notify_tz_trip_change(const struct thermal_zone_device *tz,
387356
const struct thermal_trip *trip)
388357
{

drivers/thermal/thermal_netlink.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ int thermal_notify_tz_trip_down(const struct thermal_zone_device *tz,
2525
const struct thermal_trip *trip);
2626
int thermal_notify_tz_trip_up(const struct thermal_zone_device *tz,
2727
const struct thermal_trip *trip);
28-
int thermal_notify_tz_trip_delete(int tz_id, int id);
29-
int thermal_notify_tz_trip_add(int tz_id, int id, int type,
30-
int temp, int hyst);
3128
int thermal_notify_tz_trip_change(const struct thermal_zone_device *tz,
3229
const struct thermal_trip *trip);
3330
int thermal_notify_cdev_state_update(int cdev_id, int state);
@@ -75,17 +72,6 @@ static inline int thermal_notify_tz_trip_up(const struct thermal_zone_device *tz
7572
return 0;
7673
}
7774

78-
static inline int thermal_notify_tz_trip_delete(int tz_id, int id)
79-
{
80-
return 0;
81-
}
82-
83-
static inline int thermal_notify_tz_trip_add(int tz_id, int id, int type,
84-
int temp, int hyst)
85-
{
86-
return 0;
87-
}
88-
8975
static inline int thermal_notify_tz_trip_change(const struct thermal_zone_device *tz,
9076
const struct thermal_trip *trip)
9177
{

0 commit comments

Comments
 (0)