diff --git a/graphics/allocator/2.0/default/Gralloc.cpp b/graphics/allocator/2.0/default/Gralloc.cpp
index 273d3f5..af578e8 100644
--- a/graphics/allocator/2.0/default/Gralloc.cpp
+++ b/graphics/allocator/2.0/default/Gralloc.cpp
@@ -49,9 +49,9 @@
     }
 }
 
-} // namespace implementation
-} // namespace V2_0
-} // namespace allocator
-} // namespace graphics
-} // namespace hardware
-} // namespace android
+}  // namespace implementation
+}  // namespace V2_0
+}  // namespace allocator
+}  // namespace graphics
+}  // namespace hardware
+}  // namespace android
diff --git a/graphics/allocator/2.0/default/Gralloc.h b/graphics/allocator/2.0/default/Gralloc.h
index c79eeaa..18c5202 100644
--- a/graphics/allocator/2.0/default/Gralloc.h
+++ b/graphics/allocator/2.0/default/Gralloc.h
@@ -28,11 +28,11 @@
 
 extern "C" IAllocator* HIDL_FETCH_IAllocator(const char* name);
 
-} // namespace implementation
-} // namespace V2_0
-} // namespace allocator
-} // namespace graphics
-} // namespace hardware
-} // namespace android
+}  // namespace implementation
+}  // namespace V2_0
+}  // namespace allocator
+}  // namespace graphics
+}  // namespace hardware
+}  // namespace android
 
-#endif // ANDROID_HARDWARE_GRAPHICS_ALLOCATOR_V2_0_GRALLOC_H
+#endif  // ANDROID_HARDWARE_GRAPHICS_ALLOCATOR_V2_0_GRALLOC_H
diff --git a/graphics/allocator/2.0/default/service.cpp b/graphics/allocator/2.0/default/service.cpp
index 99f462c..bc0539a 100644
--- a/graphics/allocator/2.0/default/service.cpp
+++ b/graphics/allocator/2.0/default/service.cpp
@@ -20,8 +20,8 @@
 
 #include <hidl/LegacySupport.h>
 
-using android::hardware::graphics::allocator::V2_0::IAllocator;
 using android::hardware::defaultPassthroughServiceImplementation;
+using android::hardware::graphics::allocator::V2_0::IAllocator;
 
 int main() {
     return defaultPassthroughServiceImplementation<IAllocator>(4);
diff --git a/graphics/allocator/2.0/utils/passthrough/Gralloc0Allocator.cpp b/graphics/allocator/2.0/utils/passthrough/Gralloc0Allocator.cpp
index 3b62bb3..b49370a 100644
--- a/graphics/allocator/2.0/utils/passthrough/Gralloc0Allocator.cpp
+++ b/graphics/allocator/2.0/utils/passthrough/Gralloc0Allocator.cpp
@@ -32,14 +32,12 @@
 namespace V2_0 {
 namespace implementation {
 
-using android::hardware::graphics::mapper::V2_0::implementation::
-    grallocDecodeBufferDescriptor;
+using android::hardware::graphics::mapper::V2_0::implementation::grallocDecodeBufferDescriptor;
 
 Gralloc0Allocator::Gralloc0Allocator(const hw_module_t* module) {
     int result = gralloc_open(module, &mDevice);
     if (result) {
-        LOG_ALWAYS_FATAL("failed to open gralloc0 device: %s",
-                         strerror(-result));
+        LOG_ALWAYS_FATAL("failed to open gralloc0 device: %s", strerror(-result));
     }
 }
 
@@ -59,8 +57,8 @@
     return Void();
 }
 
-Return<void> Gralloc0Allocator::allocate(const BufferDescriptor& descriptor,
-                                         uint32_t count, allocate_cb hidl_cb) {
+Return<void> Gralloc0Allocator::allocate(const BufferDescriptor& descriptor, uint32_t count,
+                                         allocate_cb hidl_cb) {
     IMapper::BufferDescriptorInfo descriptorInfo;
     if (!grallocDecodeBufferDescriptor(descriptor, &descriptorInfo)) {
         hidl_cb(Error::BAD_DESCRIPTOR, 0, hidl_vec<hidl_handle>());
@@ -110,17 +108,15 @@
 }
 
 Error Gralloc0Allocator::allocateOne(const IMapper::BufferDescriptorInfo& info,
-                                     buffer_handle_t* outBuffer,
-                                     uint32_t* outStride) {
+                                     buffer_handle_t* outBuffer, uint32_t* outStride) {
     if (info.layerCount > 1 || (info.usage >> 32) != 0) {
         return Error::BAD_VALUE;
     }
 
     buffer_handle_t buffer = nullptr;
     int stride = 0;
-    int result = mDevice->alloc(mDevice, info.width, info.height,
-                                static_cast<int>(info.format), info.usage,
-                                &buffer, &stride);
+    int result = mDevice->alloc(mDevice, info.width, info.height, static_cast<int>(info.format),
+                                info.usage, &buffer, &stride);
     if (result) {
         switch (result) {
             case -EINVAL:
diff --git a/graphics/allocator/2.0/utils/passthrough/Gralloc0Allocator.h b/graphics/allocator/2.0/utils/passthrough/Gralloc0Allocator.h
index 0e90527..6052282 100644
--- a/graphics/allocator/2.0/utils/passthrough/Gralloc0Allocator.h
+++ b/graphics/allocator/2.0/utils/passthrough/Gralloc0Allocator.h
@@ -28,9 +28,9 @@
 namespace V2_0 {
 namespace implementation {
 
-using android::hardware::graphics::mapper::V2_0::IMapper;
 using android::hardware::graphics::mapper::V2_0::BufferDescriptor;
 using android::hardware::graphics::mapper::V2_0::Error;
+using android::hardware::graphics::mapper::V2_0::IMapper;
 
 class Gralloc0Allocator : public IAllocator {
    public:
@@ -43,8 +43,8 @@
                           allocate_cb hidl_cb) override;
 
    private:
-    Error allocateOne(const IMapper::BufferDescriptorInfo& info,
-                      buffer_handle_t* outBuffer, uint32_t* outStride);
+    Error allocateOne(const IMapper::BufferDescriptorInfo& info, buffer_handle_t* outBuffer,
+                      uint32_t* outStride);
 
     alloc_device_t* mDevice;
 };
diff --git a/graphics/allocator/2.0/utils/passthrough/Gralloc1Allocator.cpp b/graphics/allocator/2.0/utils/passthrough/Gralloc1Allocator.cpp
index 6cbb791..b7e27bb 100644
--- a/graphics/allocator/2.0/utils/passthrough/Gralloc1Allocator.cpp
+++ b/graphics/allocator/2.0/utils/passthrough/Gralloc1Allocator.cpp
@@ -33,15 +33,13 @@
 namespace implementation {
 
 using android::hardware::graphics::common::V1_0::BufferUsage;
-using android::hardware::graphics::mapper::V2_0::implementation::
-    grallocDecodeBufferDescriptor;
+using android::hardware::graphics::mapper::V2_0::implementation::grallocDecodeBufferDescriptor;
 
 Gralloc1Allocator::Gralloc1Allocator(const hw_module_t* module)
     : mDevice(nullptr), mCapabilities(), mDispatch() {
     int result = gralloc1_open(module, &mDevice);
     if (result) {
-        LOG_ALWAYS_FATAL("failed to open gralloc1 device: %s",
-                         strerror(-result));
+        LOG_ALWAYS_FATAL("failed to open gralloc1 device: %s", strerror(-result));
     }
 
     initCapabilities();
@@ -69,8 +67,7 @@
 }
 
 template <typename T>
-void Gralloc1Allocator::initDispatch(gralloc1_function_descriptor_t desc,
-                                     T* outPfn) {
+void Gralloc1Allocator::initDispatch(gralloc1_function_descriptor_t desc, T* outPfn) {
     auto pfn = mDevice->getFunction(mDevice, desc);
     if (!pfn) {
         LOG_ALWAYS_FATAL("failed to get gralloc1 function %d", desc);
@@ -81,20 +78,15 @@
 
 void Gralloc1Allocator::initDispatch() {
     initDispatch(GRALLOC1_FUNCTION_DUMP, &mDispatch.dump);
-    initDispatch(GRALLOC1_FUNCTION_CREATE_DESCRIPTOR,
-                 &mDispatch.createDescriptor);
-    initDispatch(GRALLOC1_FUNCTION_DESTROY_DESCRIPTOR,
-                 &mDispatch.destroyDescriptor);
+    initDispatch(GRALLOC1_FUNCTION_CREATE_DESCRIPTOR, &mDispatch.createDescriptor);
+    initDispatch(GRALLOC1_FUNCTION_DESTROY_DESCRIPTOR, &mDispatch.destroyDescriptor);
     initDispatch(GRALLOC1_FUNCTION_SET_DIMENSIONS, &mDispatch.setDimensions);
     initDispatch(GRALLOC1_FUNCTION_SET_FORMAT, &mDispatch.setFormat);
     if (mCapabilities.layeredBuffers) {
-        initDispatch(GRALLOC1_FUNCTION_SET_LAYER_COUNT,
-                     &mDispatch.setLayerCount);
+        initDispatch(GRALLOC1_FUNCTION_SET_LAYER_COUNT, &mDispatch.setLayerCount);
     }
-    initDispatch(GRALLOC1_FUNCTION_SET_CONSUMER_USAGE,
-                 &mDispatch.setConsumerUsage);
-    initDispatch(GRALLOC1_FUNCTION_SET_PRODUCER_USAGE,
-                 &mDispatch.setProducerUsage);
+    initDispatch(GRALLOC1_FUNCTION_SET_CONSUMER_USAGE, &mDispatch.setConsumerUsage);
+    initDispatch(GRALLOC1_FUNCTION_SET_PRODUCER_USAGE, &mDispatch.setProducerUsage);
     initDispatch(GRALLOC1_FUNCTION_GET_STRIDE, &mDispatch.getStride);
     initDispatch(GRALLOC1_FUNCTION_ALLOCATE, &mDispatch.allocate);
     initDispatch(GRALLOC1_FUNCTION_RELEASE, &mDispatch.release);
@@ -116,8 +108,8 @@
     return Void();
 }
 
-Return<void> Gralloc1Allocator::allocate(const BufferDescriptor& descriptor,
-                                         uint32_t count, allocate_cb hidl_cb) {
+Return<void> Gralloc1Allocator::allocate(const BufferDescriptor& descriptor, uint32_t count,
+                                         allocate_cb hidl_cb) {
     IMapper::BufferDescriptorInfo descriptorInfo;
     if (!grallocDecodeBufferDescriptor(descriptor, &descriptorInfo)) {
         hidl_cb(Error::BAD_DESCRIPTOR, 0, hidl_vec<hidl_handle>());
@@ -199,9 +191,8 @@
     // this is potentially broken as we have no idea which private flags
     // should be filtered out
     uint64_t producerUsage =
-        usage &
-        ~static_cast<uint64_t>(BufferUsage::CPU_READ_MASK | BufferUsage::CPU_WRITE_MASK |
-                               BufferUsage::GPU_DATA_BUFFER);
+        usage & ~static_cast<uint64_t>(BufferUsage::CPU_READ_MASK | BufferUsage::CPU_WRITE_MASK |
+                                       BufferUsage::GPU_DATA_BUFFER);
 
     switch (usage & BufferUsage::CPU_WRITE_MASK) {
         case static_cast<uint64_t>(BufferUsage::CPU_WRITE_RARELY):
@@ -258,36 +249,30 @@
     return consumerUsage;
 }
 
-Error Gralloc1Allocator::createDescriptor(
-    const IMapper::BufferDescriptorInfo& info,
-    gralloc1_buffer_descriptor_t* outDescriptor) {
+Error Gralloc1Allocator::createDescriptor(const IMapper::BufferDescriptorInfo& info,
+                                          gralloc1_buffer_descriptor_t* outDescriptor) {
     gralloc1_buffer_descriptor_t descriptor;
 
     int32_t error = mDispatch.createDescriptor(mDevice, &descriptor);
 
     if (error == GRALLOC1_ERROR_NONE) {
-        error = mDispatch.setDimensions(mDevice, descriptor, info.width,
-                                        info.height);
+        error = mDispatch.setDimensions(mDevice, descriptor, info.width, info.height);
     }
     if (error == GRALLOC1_ERROR_NONE) {
-        error = mDispatch.setFormat(mDevice, descriptor,
-                                    static_cast<int32_t>(info.format));
+        error = mDispatch.setFormat(mDevice, descriptor, static_cast<int32_t>(info.format));
     }
     if (error == GRALLOC1_ERROR_NONE) {
         if (mCapabilities.layeredBuffers) {
-            error =
-                mDispatch.setLayerCount(mDevice, descriptor, info.layerCount);
+            error = mDispatch.setLayerCount(mDevice, descriptor, info.layerCount);
         } else if (info.layerCount > 1) {
             error = GRALLOC1_ERROR_UNSUPPORTED;
         }
     }
     if (error == GRALLOC1_ERROR_NONE) {
-        error = mDispatch.setProducerUsage(mDevice, descriptor,
-                                           toProducerUsage(info.usage));
+        error = mDispatch.setProducerUsage(mDevice, descriptor, toProducerUsage(info.usage));
     }
     if (error == GRALLOC1_ERROR_NONE) {
-        error = mDispatch.setConsumerUsage(mDevice, descriptor,
-                                           toConsumerUsage(info.usage));
+        error = mDispatch.setConsumerUsage(mDevice, descriptor, toConsumerUsage(info.usage));
     }
 
     if (error == GRALLOC1_ERROR_NONE) {
@@ -300,8 +285,7 @@
 }
 
 Error Gralloc1Allocator::allocateOne(gralloc1_buffer_descriptor_t descriptor,
-                                     buffer_handle_t* outBuffer,
-                                     uint32_t* outStride) {
+                                     buffer_handle_t* outBuffer, uint32_t* outStride) {
     buffer_handle_t buffer = nullptr;
     int32_t error = mDispatch.allocate(mDevice, 1, &descriptor, &buffer);
     if (error != GRALLOC1_ERROR_NONE && error != GRALLOC1_ERROR_NOT_SHARED) {
diff --git a/graphics/allocator/2.0/utils/passthrough/Gralloc1Allocator.h b/graphics/allocator/2.0/utils/passthrough/Gralloc1Allocator.h
index 7b5a966..686e8b3 100644
--- a/graphics/allocator/2.0/utils/passthrough/Gralloc1Allocator.h
+++ b/graphics/allocator/2.0/utils/passthrough/Gralloc1Allocator.h
@@ -28,9 +28,9 @@
 namespace V2_0 {
 namespace implementation {
 
-using android::hardware::graphics::mapper::V2_0::IMapper;
 using android::hardware::graphics::mapper::V2_0::BufferDescriptor;
 using android::hardware::graphics::mapper::V2_0::Error;
+using android::hardware::graphics::mapper::V2_0::IMapper;
 
 class Gralloc1Allocator : public IAllocator {
    public:
@@ -55,8 +55,8 @@
 
     Error createDescriptor(const IMapper::BufferDescriptorInfo& info,
                            gralloc1_buffer_descriptor_t* outDescriptor);
-    Error allocateOne(gralloc1_buffer_descriptor_t descriptor,
-                      buffer_handle_t* outBuffer, uint32_t* outStride);
+    Error allocateOne(gralloc1_buffer_descriptor_t descriptor, buffer_handle_t* outBuffer,
+                      uint32_t* outStride);
 
     gralloc1_device_t* mDevice;
 
