Skip to content

Commit

Permalink
raphael: libqti-perfd-client: Clean up
Browse files Browse the repository at this point in the history
* Run clang-format
* Add newlines between functions
* Use elvis operator `?:` for return value

Change-Id: I920044df12c99d32ddd2ef3fb5edf24bcd0c7360
Signed-off-by: Pranav Vashi <[email protected]>
  • Loading branch information
luk1337 authored and kondors1995 committed Apr 7, 2024
1 parent 9cc05ea commit 76980f2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion libqti-perfd-client/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cc_library_shared {
"-Wall",
],
shared_libs: [
"libutils",
"liblog",
"libutils",
],
}
27 changes: 16 additions & 11 deletions libqti-perfd-client/client.c
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
/*
* Copyright (C) 2021-2024 The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/

#define LOG_TAG "libqti-perfd-client"

#include <stdint.h>
#include <log/log.h>
#include <stdint.h>

void perf_get_feedback() {}

void perf_hint() {}
int perf_lock_acq(int handle, int duration, int arg3[], int arg4) {
ALOGI("perf_lock_acq: handle: %d, duration: %d, arg3[0]: %d, arg4: %d",
handle, duration, arg3[0], arg4);
if (handle > 0)
return handle;

return 233;
int perf_lock_acq(int handle, int duration, int arg3[], int arg4) {
ALOGI("perf_lock_acq: handle: %d, duration: %d, arg3[0]: %d, arg4: %d", handle, duration,
arg3[0], arg4);
return handle ?: 233;
}

void perf_lock_cmd() {}

int perf_lock_rel(int handle) {
ALOGI("perf_lock_rel: handle: %d", handle);
if (handle > 0)
return handle;

return 233;
return handle ?: 233;
}

void perf_lock_use_profile() {}

0 comments on commit 76980f2

Please sign in to comment.