diff options
author | Tom Rini <trini@konsulko.com> | 2023-01-19 09:41:54 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-01-19 09:41:54 -0500 |
commit | 7aec35be4b5fa7aabc0ece03dc8825495d86a1be (patch) | |
tree | 483d9f85e8184cb91f00e3345391bff13eee580a /lib/zstd/error_private.h | |
parent | 5b958dea5c678dbdb2aeb6ac3c0c8cc8dfea065c (diff) | |
parent | ace75d642fa71034b248cde30709c79e06c52d61 (diff) |
Merge branch '2022-01-18-assorted-updates'
- A few TI platform fixes, compression test cleanup and zstd update,
npcm7xx update, add "part type" subcommand, VBE bugfix on some
platforms, cleanup EVENT related Kconfig option logic (and fix some
platforms), other minor cleanups.
Diffstat (limited to 'lib/zstd/error_private.h')
-rw-r--r-- | lib/zstd/error_private.h | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/lib/zstd/error_private.h b/lib/zstd/error_private.h deleted file mode 100644 index d4824e25b2a..00000000000 --- a/lib/zstd/error_private.h +++ /dev/null @@ -1,43 +0,0 @@ -/* SPDX-License-Identifier: (GPL-2.0 or BSD-3-Clause-Clear) */ -/** - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. - * All rights reserved. - */ - -/* Note : this module is expected to remain private, do not expose it */ - -#ifndef ERROR_H_MODULE -#define ERROR_H_MODULE - -/* **************************************** -* Dependencies -******************************************/ -#include <linux/types.h> /* size_t */ -#include <linux/zstd.h> /* enum list */ - -/* **************************************** -* Compiler-specific -******************************************/ -#define ERR_STATIC static __attribute__((unused)) - -/*-**************************************** -* Customization (error_public.h) -******************************************/ -typedef ZSTD_ErrorCode ERR_enum; -#define PREFIX(name) ZSTD_error_##name - -/*-**************************************** -* Error codes handling -******************************************/ -#define ERROR(name) ((size_t)-PREFIX(name)) - -ERR_STATIC unsigned ERR_isError(size_t code) { return (code > ERROR(maxCode)); } - -ERR_STATIC ERR_enum ERR_getErrorCode(size_t code) -{ - if (!ERR_isError(code)) - return (ERR_enum)0; - return (ERR_enum)(0 - code); -} - -#endif /* ERROR_H_MODULE */ |