Rather than use `clang-format` from $PATH (which changes between devs), use `cros format` which has a pinned version for all people. Add *.cpp to the include list as not all C++ files use *.cc. Then run format on the files to fix latent issues. BUG=None TEST=./presubmit.sh Change-Id: I28e167d454a7b089bb79e932b7265fa87e4c331f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/6475964 Commit-Queue: Mike Frysinger <vapier@chromium.org> Tested-by: Ryan Neph <ryanneph@google.com> Tested-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Reviewed-by: Dominik Behr <dbehr@chromium.org> Bug: None Test: lunch brya-trunk_staging-userdebug && m libminigbm_gralloc Change-Id: I23022dbb536ade53951fe61014c5056e114f4bbc
20 lines
626 B
C
20 lines
626 B
C
/*
|
|
* Copyright 2014 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#ifndef UTIL_H
|
|
#define UTIL_H
|
|
|
|
#define MAX(A, B) ((A) > (B) ? (A) : (B))
|
|
#define ARRAY_SIZE(A) (sizeof(A) / sizeof(*(A)))
|
|
#define PUBLIC __attribute__((visibility("default")))
|
|
#define ALIGN(A, B) (((A) + (B)-1) & ~((B)-1))
|
|
#define IS_ALIGNED(A, B) (ALIGN((A), (B)) == (A))
|
|
#define DIV_ROUND_UP(n, d) (((n) + (d)-1) / (d))
|
|
#define STRINGIZE_NO_EXPANSION(x) #x
|
|
#define STRINGIZE(x) STRINGIZE_NO_EXPANSION(x)
|
|
#define BITFIELD_BIT(b) (1u << (b))
|
|
|
|
#endif
|