diff options
author | Gaston Gonzalez <gascoar@gmail.com> | 2021-10-29 17:00:12 -0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-30 11:12:40 +0200 |
commit | d8a364820e01b6abd9ae5dea1fc18f7f5b1a1450 (patch) | |
tree | 1972a3a8cb6913e76536826e073c6fcfe910dc6f /drivers/staging/vc04_services | |
parent | bdcfac6ab6c9362c45959fdc91c730ecc2c18f7e (diff) |
staging: vchiq_core: get rid of typedef
The typedef BITSET_T is acting as a synonym of u32. However, using the type u32
directly makes the code more readable. Furthermore, typedef should only be used
in some cases, [1]. Hence, get rid of it.
[1] Documentation/process/coding-style.rst
Signed-off-by: Gaston Gonzalez <gascoar@gmail.com>
Link: https://lore.kernel.org/r/20211029200012.45986-1-gascoar@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vc04_services')
-rw-r--r-- | drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 6 | ||||
-rw-r--r-- | drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c index ab97a35e63f9..7fe20d4b7ba2 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -711,7 +711,7 @@ reserve_space(struct vchiq_state *state, size_t space, int is_blocking) } static void -process_free_data_message(struct vchiq_state *state, BITSET_T *service_found, +process_free_data_message(struct vchiq_state *state, u32 *service_found, struct vchiq_header *header) { int msgid = header->msgid; @@ -767,7 +767,7 @@ process_free_data_message(struct vchiq_state *state, BITSET_T *service_found, /* Called by the recycle thread. */ static void -process_free_queue(struct vchiq_state *state, BITSET_T *service_found, +process_free_queue(struct vchiq_state *state, u32 *service_found, size_t length) { struct vchiq_shared_state *local = state->local; @@ -1981,7 +1981,7 @@ recycle_func(void *v) { struct vchiq_state *state = v; struct vchiq_shared_state *local = state->local; - BITSET_T *found; + u32 *found; size_t length; length = sizeof(*found) * BITSET_SIZE(VCHIQ_MAX_SERVICES); diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h index 3e50910ecba3..53a98949b294 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h @@ -74,9 +74,7 @@ ((fourcc) >> 8) & 0xff, \ (fourcc) & 0xff -typedef u32 BITSET_T; - -static_assert((sizeof(BITSET_T) * 8) == 32); +static_assert((sizeof(u32) * 8) == 32); #define BITSET_SIZE(b) ((b + 31) >> 5) #define BITSET_WORD(b) (b >> 5) |