Running the presubmit.sh script will apply our rules to every file in the repo. Exclude gbm.h from the formatting requirements since this file was taken from other open-source projects, and diffing will be easier without our formatting rules. In addition, special case drivers where the order of includes matters. BUG=none TEST=Verified the following commands succeed: emerge-cyan minigbm/arc-cros-gralloc emerge-oak minigbm/arc-cros-gralloc emerge-veyron_minnie-cheets minigbm/arc-cros-gralloc emerge-peach_pi minigbm emerge-nyan_big minigbm emerge-jadeite minigbm Change-Id: I6ce93fb1930da254d13d5017766c17341870ccc9 Reviewed-on: https://chromium-review.googlesource.com/447319 Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org> Tested-by: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
16 lines
457 B
C
16 lines
457 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) * (B))
|
|
#define DIV_ROUND_UP(n, d) (((n) + (d)-1) / (d))
|
|
|
|
#endif
|