Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1584017ybj; Fri, 8 May 2020 05:00:04 -0700 (PDT) X-Google-Smtp-Source: APiQypK7LrbdKs9wos2cyEyuyolWc6HKT6GfOwuaOjOgDUMLezt6oKbjALliXeB/TZXs6ozfE75q X-Received: by 2002:a17:906:1e51:: with SMTP id i17mr1569753ejj.336.1588939204181; Fri, 08 May 2020 05:00:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588939204; cv=none; d=google.com; s=arc-20160816; b=X+W5Yl/XCA7QSQrOJBjPGDWrmanmbOveHkb9YUwaVcKIwJtdqckGxKjIvDEUTlU3FH BpW6CxZvtSiliucR2E4V2Ssh8h6ljw3+WCsXpPFyOHd+koCUwovC+icZGaJFbKlyx/8y M88h9ubYI+k60q2OhHxEVEGgW5gwMqSKv+waVdAQC16Y7cxfptwfrIXNgmtPwg53UqSM hj5g0NZ9AkHpz9N4YD3UY7+bjs+syZqIRnTDp9qysx0qA5KUvU+KONjHZyQ01RKXk0MO zJUSW2ovycxfjFDDFwMKdfxwgfb/2aOgOmJrcP8BhveAP0Xh6/E7hpDMGIaPvNdgnlFk /Ymg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=M5boLI1jfeeH/w2L5YOG9T0Kt4EyXv8QLTSuQDuBG+E=; b=kGHsuZ5U8l7Ih8Ym/ZTFB+AI6qmtXbGILWGgZHhuZqVsXFonl4E20USS3nV/OJ7CRW Nk4EsRaRHRa57pUuIyNEWBfHe3OKZT6PeJQSNlpDySBYedCLrPscl6JrMQLqG7Jkx1Ax 4JJ+bjPfRpI2tvPv5suVuZ9iph3AE0pfYCj3Oad8/SwuTiVlv/rVIWv6M+lwIENLYSgC 3h/EMJfWqPjzPien3zGnTiq+YhuQezjR7MLGOCBFlncXXBEIHJfBAyqnsdy++Ml5QPF6 +8ulh+SU+TaG33z+BVIG4Cs/+ZIOdMNJa7mVyyGx2uRSLE9LaU6Ewj9C0oa1MYNi5iMb YS2g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l5si755686ejg.164.2020.05.08.04.59.41; Fri, 08 May 2020 05:00:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726885AbgEHLzC (ORCPT + 99 others); Fri, 8 May 2020 07:55:02 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:4353 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726636AbgEHLzC (ORCPT ); Fri, 8 May 2020 07:55:02 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id B627BD4A694D61ED3C96; Fri, 8 May 2020 19:54:59 +0800 (CST) Received: from linux-lmwb.huawei.com (10.175.103.112) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.487.0; Fri, 8 May 2020 19:54:51 +0800 From: Samuel Zou To: , , , , CC: , , Samuel Zou Subject: [PATCH -next] net: dsa: sja1105: remove set but not used variable 'prev_time' Date: Fri, 8 May 2020 20:00:55 +0800 Message-ID: <1588939255-58038-1-git-send-email-zou_wei@huawei.com> X-Mailer: git-send-email 2.6.2 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.175.103.112] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/dsa/sja1105/sja1105_vl.c:468:6: warning: variable ‘prev_time’ set but not used [-Wunused-but-set-variable] u32 prev_time = 0; ^~~~~~~~~ Reported-by: Hulk Robot Signed-off-by: Samuel Zou --- drivers/net/dsa/sja1105/sja1105_vl.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/dsa/sja1105/sja1105_vl.c b/drivers/net/dsa/sja1105/sja1105_vl.c index b52f1af..aa9b0b9 100644 --- a/drivers/net/dsa/sja1105/sja1105_vl.c +++ b/drivers/net/dsa/sja1105/sja1105_vl.c @@ -465,7 +465,6 @@ sja1105_gating_cfg_time_to_interval(struct sja1105_gating_config *gating_cfg, struct sja1105_gate_entry *last_e; struct sja1105_gate_entry *e; struct list_head *prev; - u32 prev_time = 0; list_for_each_entry(e, &gating_cfg->entries, list) { struct sja1105_gate_entry *p; @@ -476,7 +475,6 @@ sja1105_gating_cfg_time_to_interval(struct sja1105_gating_config *gating_cfg, continue; p = list_entry(prev, struct sja1105_gate_entry, list); - prev_time = e->interval; p->interval = e->interval - p->interval; } last_e = list_last_entry(&gating_cfg->entries, -- 2.6.2