aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
diff options
context:
space:
mode:
authorMarcelo Diop-Gonzalez <marcgonzalez@google.com>2020-02-12 13:43:33 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-12 13:40:44 -0800
commita2203cfe0d847ea3a84c75ccfdd600e92d9c5e62 (patch)
tree21a27064d64039d3f2796ec2316e55421b623316 /drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
parentstaging: vc04_services: use kref + RCU to reference count services (diff)
downloadlinux-dev-a2203cfe0d847ea3a84c75ccfdd600e92d9c5e62.tar.xz
linux-dev-a2203cfe0d847ea3a84c75ccfdd600e92d9c5e62.zip
staging: vc04_services: don't increment service refcount when it's not needed
There are a few places where a service's reference count is incremented, something quick is done, and the refcount is dropped. This can be made a little simpler/faster by not grabbing a reference in these cases. Signed-off-by: Marcelo Diop-Gonzalez <marcgonzalez@google.com> Link: https://lore.kernel.org/r/ac6186ac888f1acf489b5b504efcba8b0d6a8b25.1581532523.git.marcgonzalez@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h')
-rw-r--r--drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h8
1 files changed, 7 insertions, 1 deletions
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 30e4965c7666..cedd8e721aae 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
@@ -572,7 +572,13 @@ find_closed_service_for_instance(struct vchiq_instance *instance,
unsigned int handle);
extern struct vchiq_service *
-next_service_by_instance(struct vchiq_state *state, struct vchiq_instance *instance,
+__next_service_by_instance(struct vchiq_state *state,
+ struct vchiq_instance *instance,
+ int *pidx);
+
+extern struct vchiq_service *
+next_service_by_instance(struct vchiq_state *state,
+ struct vchiq_instance *instance,
int *pidx);
extern void