diff mbox series

staging: vc04_services: remove set but not used 'local_entity_uc'

Message ID 20200409085339.47255-1-yanaijie@huawei.com (mailing list archive)
State Mainlined
Commit a6a002fd8934806ce89c96ea697803cda8ba944f
Headers show
Series staging: vc04_services: remove set but not used 'local_entity_uc' | expand

Commit Message

Jason Yan April 9, 2020, 8:53 a.m. UTC
Fix the following gcc warning:

drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:2356:16:
warning: variable ‘local_entity_uc’ set but not used
[-Wunused-but-set-variable]
  int local_uc, local_entity_uc;
                ^~~~~~~~~~~~~~~

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Nicolas Saenz Julienne April 14, 2020, 10:13 a.m. UTC | #1
On Thu, 2020-04-09 at 16:53 +0800, Jason Yan wrote:
> Fix the following gcc warning:
> 
> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:2356:16:
> warning: variable ‘local_entity_uc’ set but not used
> [-Wunused-but-set-variable]
>   int local_uc, local_entity_uc;
>                 ^~~~~~~~~~~~~~~
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
> ---

Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>

Thanks,
Nicolas
diff mbox series

Patch

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index a1ea9777a444..2d3e114f4a66 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -2353,7 +2353,7 @@  vchiq_use_internal(struct vchiq_state *state, struct vchiq_service *service,
 	enum vchiq_status ret = VCHIQ_SUCCESS;
 	char entity[16];
 	int *entity_uc;
-	int local_uc, local_entity_uc;
+	int local_uc;
 
 	if (!arm_state)
 		goto out;
@@ -2377,7 +2377,7 @@  vchiq_use_internal(struct vchiq_state *state, struct vchiq_service *service,
 
 	write_lock_bh(&arm_state->susp_res_lock);
 	local_uc = ++arm_state->videocore_use_count;
-	local_entity_uc = ++(*entity_uc);
+	++(*entity_uc);
 
 	vchiq_log_trace(vchiq_susp_log_level,
 		"%s %s count %d, state count %d",