Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp356571pxk; Fri, 11 Sep 2020 08:46:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWCcDF/Tcpe6/pI7KHDpXDddNrC2HGFUrYs+KZpPVEVMart+OLeCBrIxSf/ZDdYjUmSEOt X-Received: by 2002:a05:6402:156:: with SMTP id s22mr2672931edu.372.1599839207326; Fri, 11 Sep 2020 08:46:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599839207; cv=none; d=google.com; s=arc-20160816; b=PhhAZu0CPiAjcUM3BSNJrwAuKbAs2FVTDpVNlZm60w3fHBX/vKlyLgivoZH2kYe+4r ucl4DWLFAO82RW4W13brTGBYZd6lWjBKzMM31p4ZYMbq+FT65bJ9kMepEzhxtnIjmpe+ Mjf/8CpawM8MivUF2nBZ0fsykL+GfxPtPcCjtdMF/kqjY0Xu5glHrX+1G/erYDNl4Rft 9chNi0V0OdyaVSfV+cjeTtvrHVyoNiFKkzLEeC2xOPuOaScobanoBaHpjXTJGAdWNaBU r0FT1f5I/YV+cfIdWBsKyBH4f1urtdDtiAY12dim/qmQ/cLmExV7d8SAi3Z4YnKjv08z 0LOQ== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=1TJNDk0xAOMjFGiWY1ZuK/p0447AYGrttVbGr6hFLps=; b=P4LPd6amkIoHO4Glw2BogIn7f/7dh+g3NrYNY1LSbr+Nq1/By2taM0zKbdaawq97NY 3oNYmYocjh/JSmoOr5R2EnAMPxyLCjW8lzBRQXYahQgVksSdEhjbjfkTOQdAiDxhJn6u oKJ2gdKxxinvKRuKLnlxq5tn0Z3Gg8YICgzQoX8G4ERbm91xMA5T7m2urDddmXGavdCe +IY9fThMYmbM+g1tbW3/GZWiNyMb3BpoEt56knYgEnkTEzBlV7rDQ3gtH1As9goV57j8 xRRQc6iN6FUeQ3RIg65dxBycaUGvcITGHwo6qV4i5o780ckcxbYRlctJ2qg+SeCQKUo2 5mbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aMPq+EsP; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id yc15si1837359ejb.23.2020.09.11.08.46.24; Fri, 11 Sep 2020 08:46:47 -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=@kernel.org header.s=default header.b=aMPq+EsP; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726588AbgIKPpG (ORCPT + 99 others); Fri, 11 Sep 2020 11:45:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:33470 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726206AbgIKPi1 (ORCPT ); Fri, 11 Sep 2020 11:38:27 -0400 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 78C8A2073E; Fri, 11 Sep 2020 15:38:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599838706; bh=1TJNDk0xAOMjFGiWY1ZuK/p0447AYGrttVbGr6hFLps=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=aMPq+EsPCqlwrEfENy02pSgs7cfmRMdwr//SfLBwWggO37sXei//myacnHRM70l38 jOyCJGCTlbx8zre1H1varU1wNLs8e/LTu607QUBU5oNqsrM//QpBgsTLRV0+5rbqSt 3fDMfRTPqS3hvQB8FqQtAi/DaUbrxVRSZrNA3ov4= Date: Fri, 11 Sep 2020 08:38:25 -0700 From: Jakub Kicinski To: Luo Jiaxing , Cc: , , , , , , Subject: Re: [PATCH net-next] net: stmmac: set get_rx_header_len() as void for it didn't have any error code to return Message-ID: <20200911083825.55eb2f49@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <1599796558-45818-1-git-send-email-luojiaxing@huawei.com> References: <1599796558-45818-1-git-send-email-luojiaxing@huawei.com> MIME-Version: 1.0 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 On Fri, 11 Sep 2020 11:55:58 +0800 Luo Jiaxing wrote: > We found the following warning when using W=3D1 to build kernel: >=20 > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:3634:6: warning: variab= le =E2=80=98ret=E2=80=99 set but not used [-Wunused-but-set-variable] > int ret, coe =3D priv->hw->rx_csum; >=20 > When digging stmmac_get_rx_header_len(), dwmac4_get_rx_header_len() and > dwxgmac2_get_rx_header_len() return 0 only, without any error code to > report. Therefore, it's better to define get_rx_header_len() as void. >=20 > Signed-off-by: Luo Jiaxing Reviewed-by: Jakub Kicinski