Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp733878ybi; Fri, 26 Jul 2019 18:45:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqyB52lCzlehabbUmy1IARMn4eoXZSqceT4s7jcso/iQefw3ibJrb2xvNmn/M+INFbjdzUdU X-Received: by 2002:a17:902:b70c:: with SMTP id d12mr95352793pls.314.1564191922198; Fri, 26 Jul 2019 18:45:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564191922; cv=none; d=google.com; s=arc-20160816; b=SvIz7V1bxxccKp8ixlUvEqaAfNAZvEwyBa4WZ9wVHGkririg4mhb+D+UJtyK9yUGsR i790CVTK0ZvTxRjkRLITId2nC1SaeU03ZfL+vZHwa7e2JcPDEcJoWzpeaBTD2VEbx4cn x3C7ZqZk4MVAZ0sW1BtSP2/BjDLR8kVd852GGaECI+tylcPbClF+MfZrq8yy4wuDgChd and7qYwa2btcvBopRmF0hWQZkJ+2JOaPJMsydzhs5XkkTMsIYBuk4qH4EAmS+0YLt5em jT1zG2+WzAm8aqFlvoxVNrjxn6Daew3BL1hkOOLe17JDoO70F2JKcTWxVAnmoM0ghXn/ TGyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=WzswaMrJunkJjOkgRmO97cBJxBDJdGrY/I4i9JnTQPM=; b=h/AhVk14Z7lAA8fkYM93IhRyT1EsawH0Awvvn/lnpibVPBA/m5tjsvL3WzUka6yxL5 X4QE0/DHpRQ125RgQU7HBG4bSr06uqZrorg5aaTQIkrMY1CgHvZl6GholOBz5Jb9QHO/ EBygHsxKgaysJYtYOY2LONNoyHBVmYJfD0l9KDCr31WOxzAkCerfquLmT/u9XdS9sMvs VPK4+633GwuBZwUP1nvzumJrEfWG92O81rZwqPmgrLNKTcV9yQrJ74dtiJzYRzMM/NWm EFKQDVly2BCYej57d7KRWyELYTG14cYtCyO7YJO79Bhu1fwe0PWoxoj30axINS5Dx0rk OL7A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c14si20880077pgc.244.2019.07.26.18.45.07; Fri, 26 Jul 2019 18:45:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727368AbfG0BgM (ORCPT + 99 others); Fri, 26 Jul 2019 21:36:12 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:3179 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726167AbfG0BgM (ORCPT ); Fri, 26 Jul 2019 21:36:12 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id E62FA483789FF0263845; Sat, 27 Jul 2019 09:36:07 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.439.0; Sat, 27 Jul 2019 09:36:00 +0800 From: YueHaibing To: , , , , CC: , , , , , YueHaibing Subject: [PATCH v3 -next] staging: vc04_services: fix unused-but-set-variable warning Date: Sat, 27 Jul 2019 09:35:24 +0800 Message-ID: <20190727013524.33168-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 In-Reply-To: <20190725142716.49276-1-yuehaibing@huawei.com> References: <20190725142716.49276-1-yuehaibing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix gcc used-but-set-variable warning: drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c: In function vchiq_release_internal: drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:2827:16: warning: variable local_entity_uc set but not used [-Wunused-but-set-variable] drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:2827:6: warning: variable local_uc set but not used [-Wunused-but-set-variable] Remove the unused variables 'local_entity_uc' and 'local_uc' Reported-by: Hulk Robot Signed-off-by: YueHaibing Acked-by: Stefan Wahren --- v3: fix patch title v2: remove the unused variable --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 cc4383d..b1595b1 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -2824,7 +2824,6 @@ vchiq_release_internal(struct vchiq_state *state, struct vchiq_service *service) VCHIQ_STATUS_T ret = VCHIQ_SUCCESS; char entity[16]; int *entity_uc; - int local_uc, local_entity_uc; if (!arm_state) goto out; @@ -2849,8 +2848,8 @@ vchiq_release_internal(struct vchiq_state *state, struct vchiq_service *service) ret = VCHIQ_ERROR; goto unlock; } - local_uc = --arm_state->videocore_use_count; - local_entity_uc = --(*entity_uc); + --arm_state->videocore_use_count; + --(*entity_uc); if (!vchiq_videocore_wanted(state)) { if (vchiq_platform_use_suspend_timer() && -- 2.7.4