Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11960235ybi; Fri, 26 Jul 2019 02:29:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqzSDeBReap4Yvd1TX/cDuPDglpwRPpXVMwshb2KxtMIsvD7XNdQ5ggeTqKvnmB45zS5ZGUk X-Received: by 2002:a63:745e:: with SMTP id e30mr998072pgn.73.1564133396280; Fri, 26 Jul 2019 02:29:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564133396; cv=none; d=google.com; s=arc-20160816; b=L9Qo13xdEF/eEggYIz6OINmpBcbmMZiL2Vc/lm2Rkv/aztMzsAhgbELnyGUyrhN3nh 0lkeAjl95fTtJbIhzElKlnGa8oABrMzm4deoNyFlI87jF9FN+tvdUyIvp0qAWZJrsolp 4/+FeIHF9UXB2q6emE+Zuu7dXXxhxW5qpHL5gJL4zngB88qEHYNg5c/vH456H0yzNzuR EdQ0TSoIDjR+8hFUv1Cd4kRr3BNc1H8x6XJKjNDw3Ni3nflcio9tUilr24yxTKsW65JE 4sm+jjkqi06ib9Z2d+JY/ImKve/7xda4YtliOpOZxOe9OXn1zol9WukY8lq5xj0zlDH7 B+EA== 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=M3LByGA+ML7IeDJjwP6RSCJvN5cdwvBQSChNYkBlMOg=; b=uTlkJNEME8VaOq4JFyPrdLY7XyxDR178BfLH7BR9zBL14WOn0QArUlwwgZ2qV9r1zs GQ/TStIDlHFItmz4j/vljdAvHPBypQFtD7s0VBQOMmfpq/bcXZvhV6jT98dBFIQa+IkW D5it1TuNuUw6/akimcbKmuSkpslJh6eYp6K/r0v8jN2Kkte4NRaBc0L2mniIybiJYaiF IrAPY7/4yA+Fn8texxgqs6qjyikPArilc5APOAHK8uakHqxxu52ymdAfZ6Zap/qCwCUd PNy74Fn64mGPOcFHvtymcUF9oF2jQ1V+bkvE7xdsPRGTaGuROYQYpByesA9roRRUZ67b kwKw== 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 188si20844902pgd.404.2019.07.26.02.29.40; Fri, 26 Jul 2019 02:29:56 -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 S1726546AbfGZJ0k (ORCPT + 99 others); Fri, 26 Jul 2019 05:26:40 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:38540 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726007AbfGZJ0k (ORCPT ); Fri, 26 Jul 2019 05:26:40 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id AE30A344AC963379B5BE; Fri, 26 Jul 2019 17:26:38 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.439.0; Fri, 26 Jul 2019 17:26:33 +0800 From: YueHaibing To: , , , , CC: , , , , , YueHaibing Subject: [PATCH v2 -next] staging: vc04_services: fix used-but-set-variable warning Date: Fri, 26 Jul 2019 17:26:21 +0800 Message-ID: <20190726092621.27972-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 --- 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