[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.
This commit is contained in:
Travis Geiselbrecht
2025-07-18 20:15:02 -07:00
parent 28ae26f7be
commit 731ea62c38

View File

@@ -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)