Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp38577ybj; Fri, 8 May 2020 06:05:29 -0700 (PDT) X-Google-Smtp-Source: APiQypL5E5T5vrbda+LK4L3gfDmLQBgwjW4GUvWU2XgjPAL3upzmCJv6Tj/bg3iZiDhYnPUZNaab X-Received: by 2002:a05:6402:1b08:: with SMTP id by8mr2047887edb.286.1588943129774; Fri, 08 May 2020 06:05:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588943129; cv=none; d=google.com; s=arc-20160816; b=f5im5mT/H5wTHXfnNm2brYWgIYuU1Kz55UnQypH1lYiRHHL9TRnennkNB+iF+zanhq 5qWwKIVLXEVKtEHVZ/a16H4tK2CCzyZH/6uXqThnuNEPvM1U2YiDjlFiOjgL3sj8549E tX+9HOzWI1p+bNtO/qqdkCBkbr5VPNkbA4f3PzozCrpnjlvOfqQV6Ilv2TJfUT8vE9G8 T6vQ5d/BiokBG6WdiSi5RYyOtQ6FBm2/1KwJKhASO/tZfnfbib4hesOfSrcofHI0qZZX hD7TkR9nCoPhkDm7n5Shtn8WJlXUFugKE9fAi6xiOK2FeFqEO2rzDirv5Fa1HhMZEVEK wStg== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=UNr+F8apfDkpAFTpO6sFiBGjB6K7z8TvBITdy9tuPt8=; b=m4NWHQRcORVxqr4Z01YUmXuJuWaR5CVrqbRxxKCJBc1rWiX59x4vAeIKf/EpAoWTgf J1RQw3Jl/kYuy8qsAENyqfcz+yfrAZaR0JjrVFPgbAQ4T1qPB+eGW9J6hDOZsFpzOAi7 1W7A/l2FV4MyDWLXKSIWctXShxpGdutFHPIyZ4jGd8FRHSTwTRYqkHn/S/yWq5TbQcJc FuRLofMnQHdwsDNjHK8MLBm0ov95ayojhnofd3u78BxuKDmfiNei830O/6fuP62s4R6v A5iedfVFcDQR4bvPHaFsKqmimpdfKheHSXBDVrOY8HtQrOUKl6+I75rTmcrqND4J4WlF tDSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DKmcD7Lf; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bd4si815658edb.607.2020.05.08.06.04.52; Fri, 08 May 2020 06:05:29 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DKmcD7Lf; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730265AbgEHNAv (ORCPT + 99 others); Fri, 8 May 2020 09:00:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1730200AbgEHNAo (ORCPT ); Fri, 8 May 2020 09:00:44 -0400 Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 267F4C05BD43; Fri, 8 May 2020 06:00:44 -0700 (PDT) Received: by mail-ed1-x543.google.com with SMTP id w2so1221447edx.4; Fri, 08 May 2020 06:00:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=UNr+F8apfDkpAFTpO6sFiBGjB6K7z8TvBITdy9tuPt8=; b=DKmcD7LfBgTggHbWeEZ2mMx9ocC4GWT2Jq2oInpgnjocOYyMKyO2Qe+a3N2wfcnyv/ VbrJM0dXV1B/XTG6MrWuiqlDafHsw0Sv24765TJ9Cf2qJO0/YNzvxwPHJdyXW0dW0G1c djCucTwC0qPpQZgIHNiT3cnJy/uI0d9PvK5xPoR3kN4iAwieic5za5bG1Lj4uHOzq/Za UAhDon2ZUqawnDP/AouY2DvVCnq2Qh4HIoUc9NK0D7h5c+je/Y5H5UZrRBZ0tZRtQf/x DDQ0mGcuKcO/HRyDQ2Mudv3YUjAK++dXvYiCBtq/cTOoseLbZedG5T1Ue/D88z0cokeu t9dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=UNr+F8apfDkpAFTpO6sFiBGjB6K7z8TvBITdy9tuPt8=; b=hLrLgWsa6J1+xutzoQAKN5/XFhMEUbx5AQAwZZdFAvjk0G2dKMvGFpM7BtsOTGzlTg fYUe5V8T9gkAY7AOtraMizXzBl1oWmmM/VpKCQOirp+F1OSZcGdl/CvXHDcrksNgbcrE D18Xbkp0n37c/Sq3+T0pfod5GUkAnquB5rjmbNFqVKFjPAlhA6Qoy+D6iunTVHRis2lS QYmXBLMKXkn/S0IqiMHbwIm3C75qICJdtetWcqNLBaL2y00KaK+djPOosnIBg11m2ziQ vwihOJ7YoGZbxNdmFlsqnosroVkHcKBIPDtv59nFik1hn7m4BHmh2o3qXArubwj/j++U yQTw== X-Gm-Message-State: AGi0PuabkXspaTGdpUn8pYL/9vpFVMVuerSjMc+HnKV2uSBhiKZm3JB8 nZ/TEsSGBmyv9xbEw44x3WlhaKf/Y7fX1TVss+pvGfCo X-Received: by 2002:a05:6402:6c4:: with SMTP id n4mr2101038edy.368.1588942842669; Fri, 08 May 2020 06:00:42 -0700 (PDT) MIME-Version: 1.0 References: <1588939255-58038-1-git-send-email-zou_wei@huawei.com> In-Reply-To: <1588939255-58038-1-git-send-email-zou_wei@huawei.com> From: Vladimir Oltean Date: Fri, 8 May 2020 16:00:31 +0300 Message-ID: Subject: Re: [PATCH -next] net: dsa: sja1105: remove set but not used variable 'prev_time' To: Samuel Zou Cc: Andrew Lunn , Vivien Didelot , Florian Fainelli , "David S. Miller" , lkml , netdev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Samuel, On Fri, 8 May 2020 at 14:55, Samuel Zou wrote: > > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/net/dsa/sja1105/sja1105_vl.c:468:6: warning: variable =E2=80=98pr= ev_time=E2=80=99 set but not used [-Wunused-but-set-variable] > u32 prev_time =3D 0; > ^~~~~~~~~ > > Reported-by: Hulk Robot > Signed-off-by: Samuel Zou > --- Thank you for the patch! Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean > 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/sja11= 05/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_ga= ting_config *gating_cfg, > struct sja1105_gate_entry *last_e; > struct sja1105_gate_entry *e; > struct list_head *prev; > - u32 prev_time =3D 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_ga= ting_config *gating_cfg, > continue; > > p =3D list_entry(prev, struct sja1105_gate_entry, list); > - prev_time =3D e->interval; > p->interval =3D e->interval - p->interval; > } > last_e =3D list_last_entry(&gating_cfg->entries, > -- > 2.6.2 >