lmkd: Remove unused variables and fix type mismatches am: ed715a3424 am: 8fa0ac5c64 am: 9fad9a82c7
Change-Id: Ief5e642d3ba5cf52a57dcfb5cdb931ea239fb578
This commit is contained in:
commit
5de46f6109
|
|
@ -55,7 +55,7 @@ int lmkd_unregister_proc(int sock, struct lmk_procremove *params) {
|
|||
|
||||
enum update_props_result lmkd_update_props(int sock) {
|
||||
LMKD_CTRL_PACKET packet;
|
||||
size_t size;
|
||||
int size;
|
||||
|
||||
size = lmkd_pack_set_update_props(packet);
|
||||
if (TEMP_FAILURE_RETRY(write(sock, packet, size)) < 0) {
|
||||
|
|
|
|||
11
lmkd.cpp
11
lmkd.cpp
|
|
@ -2125,7 +2125,6 @@ static int find_and_kill_process(int min_score_adj, int kill_reason, const char
|
|||
}
|
||||
|
||||
static int64_t get_memory_usage(struct reread_data *file_data) {
|
||||
int ret;
|
||||
int64_t mem_usage;
|
||||
char *buf;
|
||||
|
||||
|
|
@ -2289,8 +2288,8 @@ static void mp_event_psi(int data, uint32_t events, struct polling_params *poll_
|
|||
}
|
||||
|
||||
bool kill_pending = is_kill_pending();
|
||||
if (kill_pending &&
|
||||
(kill_timeout_ms == 0 || get_time_diff_ms(&last_kill_tm, &curr_tm) < kill_timeout_ms)) {
|
||||
if (kill_pending && (kill_timeout_ms == 0 ||
|
||||
get_time_diff_ms(&last_kill_tm, &curr_tm) < static_cast<long>(kill_timeout_ms))) {
|
||||
/* Skip while still killing a process */
|
||||
goto no_kill;
|
||||
}
|
||||
|
|
@ -2477,7 +2476,6 @@ no_kill:
|
|||
}
|
||||
|
||||
static void mp_event_common(int data, uint32_t events, struct polling_params *poll_params) {
|
||||
int ret;
|
||||
unsigned long long evcount;
|
||||
int64_t mem_usage, memsw_usage;
|
||||
int64_t mem_pressure;
|
||||
|
|
@ -2532,7 +2530,8 @@ static void mp_event_common(int data, uint32_t events, struct polling_params *po
|
|||
return;
|
||||
}
|
||||
|
||||
if (kill_timeout_ms && get_time_diff_ms(&last_kill_tm, &curr_tm) < kill_timeout_ms) {
|
||||
if (kill_timeout_ms &&
|
||||
get_time_diff_ms(&last_kill_tm, &curr_tm) < static_cast<long>(kill_timeout_ms)) {
|
||||
/*
|
||||
* If we're within the no-kill timeout, see if there's pending reclaim work
|
||||
* from the last killed process. If so, skip killing for now.
|
||||
|
|
@ -3158,8 +3157,6 @@ static void mainloop(void) {
|
|||
}
|
||||
|
||||
int issue_reinit() {
|
||||
LMKD_CTRL_PACKET packet;
|
||||
size_t size;
|
||||
int sock;
|
||||
|
||||
sock = lmkd_connect();
|
||||
|
|
|
|||
Loading…
Reference in New Issue