Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1258113imu; Thu, 22 Nov 2018 13:02:45 -0800 (PST) X-Google-Smtp-Source: AFSGD/Ua64jJXOi3Ro2WvJnSh8muikCpZpULRtpaDdscSCz4OucJw52RdyOcydM21/zGaweajNQv X-Received: by 2002:a65:40c5:: with SMTP id u5mr11044517pgp.46.1542920564983; Thu, 22 Nov 2018 13:02:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542920564; cv=none; d=google.com; s=arc-20160816; b=QjtZqu0etXFxS8yuQWnXKQmvbZ688VAbQ63GGTwtgEc0lj3zobwH2ylM4w7IHHrXFk SvS2b0GWtfzBJSwDFq/FwoIYDy5wNkhQ5NZrH2oRyyGWRAGy8+gDO2wQr2iqkXUgxy79 gwmfLMRr6BcpwLodS0kujn9t5jJIwSnCN3pEYEYXvqe22XiYIW9JOtkdbIzRNXtltheo M6AvHOISXeeXoh3BAfOK1NoNy1Ud9D+iwo9dxC1YyhJFENylDt6bch9OcluvkKS+aM0t 7EFFrt3topAQnfFFGg9j1C391ETvjr8gh2ShxYsqJdiXZD1Sq9bcjciNNW/u2TaiDKmh wsGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=x3j6RC4CWjcy8RmJK2n2N5mH3C8U8esUyyylE6WTchs=; b=ffUlwBDALAVJy8znntFPHxd23LLGezuu/GzLTXwqoGGEBl6JNnjyAJhC5YydR3DCQ7 svblP+9gwTuaXXKDc0NGDBURt9LIuPMhHSSSziacjEkLE0t6XtvpJ0vMcxUZEvx4r7P1 XuIicc9HcUPslZ34mUxevpMMQCaLLhL6qsXoi7tQmnOhFVpL3bgLQZ3YhRS5b0DpaGJq zHjW80UW002qmlJrHFgLyN4DcR/fjo/idfuZMGaM2+YNxzhlBkwTVgHTzc7brK5OcfBX lLbe0jfs2LSuAPMyBkU1R4ru3OjFLnCHNymnL7tmLoetdVC5u5furZhA50Ozvq/zNu2N HPfw== 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 d1-v6si35671808pll.301.2018.11.22.13.02.08; Thu, 22 Nov 2018 13:02:44 -0800 (PST) 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 S2392276AbeKVRa6 (ORCPT + 99 others); Thu, 22 Nov 2018 12:30:58 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:38368 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726958AbeKVRa6 (ORCPT ); Thu, 22 Nov 2018 12:30:58 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 643C385E6EE46; Thu, 22 Nov 2018 14:52:52 +0800 (CST) Received: from localhost (10.177.31.96) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.408.0; Thu, 22 Nov 2018 14:52:45 +0800 From: YueHaibing To: , CC: , , YueHaibing Subject: [PATCH net-next] net: mvneta: remove redundant check for eee->tx_lpi_timer < 0 Date: Thu, 22 Nov 2018 14:42:00 +0800 Message-ID: <20181122064200.11572-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fixes the smatch warning: drivers/net/ethernet/marvell/mvneta.c:4252 mvneta_ethtool_set_eee() warn: unsigned 'eee->tx_lpi_timer' is never less than zero. Signed-off-by: YueHaibing --- drivers/net/ethernet/marvell/mvneta.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index e5397c8..46a0f6b 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -4248,8 +4248,7 @@ static int mvneta_ethtool_set_eee(struct net_device *dev, /* The Armada 37x documents do not give limits for this other than * it being an 8-bit register. */ - if (eee->tx_lpi_enabled && - (eee->tx_lpi_timer < 0 || eee->tx_lpi_timer > 255)) + if (eee->tx_lpi_enabled && eee->tx_lpi_timer > 255) return -EINVAL; lpi_ctl0 = mvreg_read(pp, MVNETA_LPI_CTRL_0); -- 2.7.0