drm_hwcomposer: CI: Set clang-tidy level to NORMAL for some files
Some of files require small adjustments to move into NORMAL checks list.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
diff --git a/utils/autolock.cpp b/utils/autolock.cpp
index 3342e46..3afe488 100644
--- a/utils/autolock.cpp
+++ b/utils/autolock.cpp
@@ -33,7 +33,7 @@
return -EINVAL;
}
int ret = pthread_mutex_lock(mutex_);
- if (ret) {
+ if (ret != 0) {
ALOGE("Failed to acquire %s lock %d", name_, ret);
return ret;
}
@@ -47,7 +47,7 @@
return -EINVAL;
}
int ret = pthread_mutex_unlock(mutex_);
- if (ret) {
+ if (ret != 0) {
ALOGE("Failed to release %s lock %d", name_, ret);
return ret;
}
diff --git a/utils/hwcutils.cpp b/utils/hwcutils.cpp
index 5a46e9b..c537b99 100644
--- a/utils/hwcutils.cpp
+++ b/utils/hwcutils.cpp
@@ -17,30 +17,28 @@
#define ATRACE_TAG ATRACE_TAG_GRAPHICS
#define LOG_TAG "hwc-drm-utils"
-#include <log/log.h>
-#include <ui/Gralloc.h>
-#include <ui/GraphicBufferMapper.h>
+#include <utils/log.h>
+
+#include <cerrno>
#include "bufferinfo/BufferInfoGetter.h"
#include "drm/DrmFbImporter.h"
#include "drmhwcomposer.h"
-#define UNUSED(x) (void)(x)
-
namespace android {
-int DrmHwcLayer::ImportBuffer(DrmDevice *drmDevice) {
+int DrmHwcLayer::ImportBuffer(DrmDevice *drm_device) {
buffer_info = hwc_drm_bo_t{};
int ret = BufferInfoGetter::GetInstance()->ConvertBoInfo(sf_handle,
&buffer_info);
- if (ret) {
+ if (ret != 0) {
ALOGE("Failed to convert buffer info %d", ret);
return ret;
}
- FbIdHandle = drmDevice->GetDrmFbImporter().GetOrCreateFbId(&buffer_info);
- if (!FbIdHandle) {
+ fb_id_handle = drm_device->GetDrmFbImporter().GetOrCreateFbId(&buffer_info);
+ if (!fb_id_handle) {
ALOGE("Failed to import buffer");
return -EINVAL;
}