From 731ea62c3801681571e57962552e68278e870bcf Mon Sep 17 00:00:00 2001 From: Travis Geiselbrecht Date: Fri, 18 Jul 2025 20:15:02 -0700 Subject: [PATCH] [includes] remove lk/utils.h which seem to be unused on anything in mainline Was a bit of a hodgepodge of defines. If any of these are needed we can add them back somewhere a bit more appropriate. ARRAY_SIZE can use countof() defined in compiler.h KB/MB/GB are generally duplicately defined in architecture specific files, but not generically. I couldn't think off the top of my head of a better place to generically put these, especially since they're used in asm files, so just deleted it for now. The other stuff seemed to be just unused anywhere. --- top/include/lk/utils.h | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 top/include/lk/utils.h diff --git a/top/include/lk/utils.h b/top/include/lk/utils.h deleted file mode 100644 index 6b68c0e1..00000000 --- a/top/include/lk/utils.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * SPDX-License-Identifier: MIT - * - * Copyright (C) 2020-2023 Google LLC. - */ - -#pragma once - -#define ARRAY_SIZE(_a) (sizeof(_a) / sizeof(*(_a))) - -#define KB (1024UL) -#define MB (1024UL * 1024UL) -#define GB (1024UL * 1024UL * 1024UL) - -#define RETURN_IF_ERROR(expr) \ - do { \ - status_t err_ = (expr); \ - if (err_ != NO_ERROR) { \ - return err_; \ - } \ - } while (0)