From 430b1157a1cbe8cd4add5eae5e62279419e9b787 Mon Sep 17 00:00:00 2001 From: "Thomas H.P. Andersen" Date: Sat, 8 Jan 2022 18:28:48 +0100 Subject: [PATCH] broadcom: drop unused functions Fixes a clang warning about unused static inlined functions Reviewed-by: Juan A. Suarez Part-of: --- src/broadcom/cle/v3d_decoder.c | 45 ---------------------------------- src/broadcom/qpu/qpu_pack.c | 7 ------ 2 files changed, 52 deletions(-) diff --git a/src/broadcom/cle/v3d_decoder.c b/src/broadcom/cle/v3d_decoder.c index 97dd8ce8423..46cd152e599 100644 --- a/src/broadcom/cle/v3d_decoder.c +++ b/src/broadcom/cle/v3d_decoder.c @@ -267,51 +267,6 @@ get_register_offset(const char **atts, uint32_t *offset) return; } -static void -get_start_end_pos(int *start, int *end) -{ - /* start value has to be mod with 32 as we need the relative - * start position in the first DWord. For the end position, add - * the length of the field to the start position to get the - * relative postion in the 64 bit address. - */ - if (*end - *start > 32) { - int len = *end - *start; - *start = *start % 32; - *end = *start + len; - } else { - *start = *start % 32; - *end = *end % 32; - } - - return; -} - -static inline uint64_t -mask(int start, int end) -{ - uint64_t v; - - v = ~0ULL >> (63 - end + start); - - return v << start; -} - -static inline uint64_t -field(uint64_t value, int start, int end) -{ - get_start_end_pos(&start, &end); - return (value & mask(start, end)) >> (start); -} - -static inline uint64_t -field_address(uint64_t value, int start, int end) -{ - /* no need to right shift for address/offset */ - get_start_end_pos(&start, &end); - return (value & mask(start, end)); -} - static struct v3d_type string_to_type(struct parser_context *ctx, const char *s) { diff --git a/src/broadcom/qpu/qpu_pack.c b/src/broadcom/qpu/qpu_pack.c index a1b6b543719..94629aff4fc 100644 --- a/src/broadcom/qpu/qpu_pack.c +++ b/src/broadcom/qpu/qpu_pack.c @@ -256,13 +256,6 @@ v3d_qpu_sig_pack(const struct v3d_device_info *devinfo, return false; } -static inline unsigned -fui( float f ) -{ - union {float f; unsigned ui;} fi; - fi.f = f; - return fi.ui; -} static const uint32_t small_immediates[] = { 0, 1, 2, 3,