lmkd: Remove unused variables and fix type mismatches am: dd7ec447ab am: 9cc5e9624f

Change-Id: I811f18d5574be6a09045d4e8d5d15b4d33166612
This commit is contained in:
Suren Baghdasaryan 2020-05-20 00:54:05 +00:00 committed by Automerger Merge Worker
commit aabfa71492
2 changed files with 5 additions and 8 deletions

View File

@ -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) {

View File

@ -2124,7 +2124,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;
@ -2279,8 +2278,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;
}
@ -2457,7 +2456,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;
@ -2512,7 +2510,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.
@ -3138,8 +3137,6 @@ static void mainloop(void) {
}
int issue_reinit() {
LMKD_CTRL_PACKET packet;
size_t size;
int sock;
sock = lmkd_connect();