1
0
Fork 0

drm_hwcomposer: CI: Bump-up clang toolchain to v15

Address new clang-tidy findings, in most cases 'misc-const-correctness'
check was addressed by adding 'const' modifier, or in some cases changed
to 'auto' (where it's better for formatting).

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
This commit is contained in:
Roman Stratiienko 2022-10-20 13:18:57 +03:00
parent ce2ce75a36
commit a7913de518
30 changed files with 117 additions and 96 deletions

View file

@ -68,7 +68,7 @@ std::optional<BufferUniqueId> BufferInfoGetter::GetUniqueId(
}
int LegacyBufferInfoGetter::Init() {
int ret = hw_get_module(
const int ret = hw_get_module(
GRALLOC_HARDWARE_MODULE_ID,
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
reinterpret_cast<const hw_module_t **>(&gralloc_));

View file

@ -154,7 +154,7 @@ bool BufferInfoLibdrm::GetYuvPlaneInfo(uint32_t hal_format, int num_fds,
if (num_fds == 1) {
bo->prime_fds[2] = bo->prime_fds[1] = bo->prime_fds[0];
} else {
int expected_planes = (ycbcr.chroma_step == 2) ? 2 : 3;
const int expected_planes = (ycbcr.chroma_step == 2) ? 2 : 3;
if (num_fds != expected_planes)
return false;
}

View file

@ -77,7 +77,7 @@ auto BufferInfoMaliHisi::GetBoInfo(buffer_handle_t handle)
if (!(hnd->usage & GRALLOC_USAGE_HW_FB))
return {};
uint32_t fmt = ConvertHalFormatToDrm(hnd->req_format);
const uint32_t fmt = ConvertHalFormatToDrm(hnd->req_format);
if (fmt == DRM_FORMAT_INVALID)
return {};
@ -100,10 +100,10 @@ auto BufferInfoMaliHisi::GetBoInfo(buffer_handle_t handle)
if (hnd->usage &
(GRALLOC_USAGE_SW_READ_MASK | GRALLOC_USAGE_SW_WRITE_MASK))
align = 16;
int adjusted_height = MALI_ALIGN(hnd->height, 2);
int y_size = adjusted_height * hnd->byte_stride;
int vu_stride = MALI_ALIGN(hnd->byte_stride / 2, align);
int v_size = vu_stride * (adjusted_height / 2);
const int adjusted_height = MALI_ALIGN(hnd->height, 2);
const int y_size = adjusted_height * hnd->byte_stride;
const int vu_stride = MALI_ALIGN(hnd->byte_stride / 2, align);
const int v_size = vu_stride * (adjusted_height / 2);
/* V plane*/
bi.prime_fds[1] = hnd->share_fd;

View file

@ -38,7 +38,7 @@ auto BufferInfoMaliMediatek::GetBoInfo(buffer_handle_t handle)
if (!hnd)
return {};
uint32_t fmt = ConvertHalFormatToDrm(hnd->req_format);
const uint32_t fmt = ConvertHalFormatToDrm(hnd->req_format);
if (fmt == DRM_FORMAT_INVALID)
return {};

View file

@ -70,7 +70,7 @@ auto BufferInfoMaliMeson::GetBoInfo(buffer_handle_t handle)
if (!(hnd->usage & GRALLOC_USAGE_HW_FB))
return {};
uint32_t fmt = ConvertHalFormatToDrm(hnd->req_format);
const uint32_t fmt = ConvertHalFormatToDrm(hnd->req_format);
if (fmt == DRM_FORMAT_INVALID)
return {};