diff options
author | Marcelo Diop-Gonzalez <marcgonzalez@google.com> | 2020-02-12 13:43:30 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-02-12 13:37:05 -0800 |
commit | 110700173e975bb271539d2cdb24f17a1420f037 (patch) | |
tree | 22231b5fb60758581c806c614cb6dcd3b72ecd46 /drivers/staging/vc04_services/interface | |
parent | 147eda2974d47b51fc2ae01f2fec9ea3b3845697 (diff) |
staging: vc04_services: remove unneeded parentheses
there are extra parentheses around many conditional statements
that make things a little harder to read
Signed-off-by: Marcelo Diop-Gonzalez <marcgonzalez@google.com>
Link: https://lore.kernel.org/r/41511abf64f73af62f21f8e0c7457edc289af905.1581532523.git.marcgonzalez@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vc04_services/interface')
-rw-r--r-- | drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 36 |
1 files changed, 18 insertions, 18 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 4f8b59deaec9..72bfa0f73958 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -138,8 +138,8 @@ find_service_by_handle(unsigned int handle) spin_lock(&service_spinlock); service = handle_to_service(handle); - if (service && (service->srvstate != VCHIQ_SRVSTATE_FREE) && - (service->handle == handle)) { + if (service && service->srvstate != VCHIQ_SRVSTATE_FREE && + service->handle == handle) { WARN_ON(service->ref_count == 0); service->ref_count++; } else @@ -161,7 +161,7 @@ find_service_by_port(struct vchiq_state *state, int localport) if ((unsigned int)localport <= VCHIQ_PORT_MAX) { spin_lock(&service_spinlock); service = state->services[localport]; - if (service && (service->srvstate != VCHIQ_SRVSTATE_FREE)) { + if (service && service->srvstate != VCHIQ_SRVSTATE_FREE) { WARN_ON(service->ref_count == 0); service->ref_count++; } else @@ -184,9 +184,9 @@ find_service_for_instance(struct vchiq_instance *instance, spin_lock(&service_spinlock); service = handle_to_service(handle); - if (service && (service->srvstate != VCHIQ_SRVSTATE_FREE) && - (service->handle == handle) && - (service->instance == instance)) { + if (service && service->srvstate != VCHIQ_SRVSTATE_FREE && + service->handle == handle && + service->instance == instance) { WARN_ON(service->ref_count == 0); service->ref_count++; } else @@ -209,10 +209,10 @@ find_closed_service_for_instance(struct vchiq_instance *instance, spin_lock(&service_spinlock); service = handle_to_service(handle); if (service && - ((service->srvstate == VCHIQ_SRVSTATE_FREE) || - (service->srvstate == VCHIQ_SRVSTATE_CLOSED)) && - (service->handle == handle) && - (service->instance == instance)) { + (service->srvstate == VCHIQ_SRVSTATE_FREE || + service->srvstate == VCHIQ_SRVSTATE_CLOSED) && + service->handle == handle && + service->instance == instance) { WARN_ON(service->ref_count == 0); service->ref_count++; } else @@ -237,8 +237,8 @@ next_service_by_instance(struct vchiq_state *state, struct vchiq_instance *insta while (idx < state->unused_service) { struct vchiq_service *srv = state->services[idx++]; - if (srv && (srv->srvstate != VCHIQ_SRVSTATE_FREE) && - (srv->instance == instance)) { + if (srv && srv->srvstate != VCHIQ_SRVSTATE_FREE && + srv->instance == instance) { service = srv; WARN_ON(service->ref_count == 0); service->ref_count++; @@ -464,10 +464,10 @@ get_listening_service(struct vchiq_state *state, int fourcc) struct vchiq_service *service = state->services[i]; if (service && - (service->public_fourcc == fourcc) && - ((service->srvstate == VCHIQ_SRVSTATE_LISTENING) || - ((service->srvstate == VCHIQ_SRVSTATE_OPEN) && - (service->remoteport == VCHIQ_PORT_FREE)))) { + service->public_fourcc == fourcc && + (service->srvstate == VCHIQ_SRVSTATE_LISTENING || + (service->srvstate == VCHIQ_SRVSTATE_OPEN && + service->remoteport == VCHIQ_PORT_FREE))) { lock_service(service); return service; } @@ -485,8 +485,8 @@ get_connected_service(struct vchiq_state *state, unsigned int port) for (i = 0; i < state->unused_service; i++) { struct vchiq_service *service = state->services[i]; - if (service && (service->srvstate == VCHIQ_SRVSTATE_OPEN) - && (service->remoteport == port)) { + if (service && service->srvstate == VCHIQ_SRVSTATE_OPEN && + service->remoteport == port) { lock_service(service); return service; } |