Received: by 10.223.185.111 with SMTP id b44csp1645336wrg; Sat, 10 Mar 2018 10:29:15 -0800 (PST) X-Google-Smtp-Source: AG47ELupwwfTSNtmJ1b5CN6rDrZrAPWQ5JONaxIhF4bVBoW6SnV9LIF/MtAslMqF0n1zpKI/fo1w X-Received: by 10.98.34.75 with SMTP id i72mr2645488pfi.165.1520706554953; Sat, 10 Mar 2018 10:29:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520706554; cv=none; d=google.com; s=arc-20160816; b=POo4WmkP50oDP9pL5xdWd5Xe7Fna9umJ9ixbz/dKxPlg7xQjOBEZ/jP8INKyV+TxAz FgQP4MyMB6qAdGkSyLpD981Ok5zhUSsCTBZvuCGAjMOYndHogt41GpLRCXO6okfMt7R0 7GcJJnp1XUa99B8IOzaIVw8JRTq775+S3EJarn83EPXP8gH8zZiBNl/djgV78N+fSDtq rhFrGn46rjGolC+BLBB4gKNAwGYEQGPBssyUoOP0Tjy2xYjC3XeqPsazll626WPDYFUT aM7MJ0cHlvPJ/dvjokXFhX69Xzefh5Ei2Tm0nxTFoeTy0wJthXZ7ZiSc+UAbyc7gXqyp ZiGw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:arc-authentication-results; bh=j/UQd2hf9aZ2Rskv5s9HQNoXXKWQYl+S/P0EiG6dgpA=; b=lOaysUfdsF9XGJUbmxqEsEypDMXvvEaKbvSDMdlnmEcpuaIBb8EuLtSwU7w+pb7ZCG EcpPdJ12aofKprK0MP6U/kM+Zq1AZ9/DtrWPYYxtViRGIguZdakCMkqjV2pqtcoHNzwi qEw7/mizStKh4au6WZGZ6Lt8vCBAkmMwHpjUaV4PVZ2I/XMuwVzGVaViwRxs/Qilx8sP RuV0r6pv/FU6arVk1sAfD/INeb+XIiMcRNdR5no23to4xGeACQYOgMNzj3ZcPPK8bGDe 1Z0nhIY5Gs6nj29ojW838BqwnqwIZPf6Jt5AMQMl7qk+vyZXcUqrFx9aX3yedyS39Pu4 VpHQ== 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; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j12si2577064pgn.115.2018.03.10.10.29.00; Sat, 10 Mar 2018 10:29:14 -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; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751966AbeCJS0k (ORCPT + 99 others); Sat, 10 Mar 2018 13:26:40 -0500 Received: from mout.web.de ([212.227.15.3]:41561 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751901AbeCJS0i (ORCPT ); Sat, 10 Mar 2018 13:26:38 -0500 Received: from [192.168.1.2] ([78.48.54.123]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MhOpG-1fHMO90vMQ-00Md14; Sat, 10 Mar 2018 19:26:19 +0100 Subject: [PATCH 2/2] net/usb/ax88179_178a: Delete three unnecessary variables in ax88179_chk_eee() From: SF Markus Elfring To: linux-usb@vger.kernel.org, netdev@vger.kernel.org, "Andrew F. Davis" , =?UTF-8?Q?Bj=c3=b8rn_Mork?= , "David S. Miller" , Philippe Reynes , Yuval Shaia Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <019cc24b-d9c0-d782-35e8-f9f8be0534db@users.sourceforge.net> Date: Sat, 10 Mar 2018 19:26:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:U8acntLgVdK5ukaLscY4KrMgYcr377J9qqeIJS6ivwOyEsCyH6J sECNZzAv5iTFu45ggHclupKidJ3M8Ah1J6afb/3LHoIVTJfQK0ZvZimJ3WzyFcd/rq8s9mz gfKlo64HOIfylgrc328fPy1xUxQsFTTlNZd2EAZHSLssJfXWLKjvqlrJKUO6GExq08Xl4mv 9bvqipgX93MD9LYuwLqDg== X-UI-Out-Filterresults: notjunk:1;V01:K0:bc+UXtXmip4=:BlFMGghN+NyqC5et/17D5s nh/UFZI32rNaN/dT6TC3AM5Z2cK8GlIfCzLEnhn0g5+J+Og3+8NQF7CXZZcuchDuMFFi4pijl qvu9mpd4Vlvu9QP6wLb6OFyM3wfO8rlcPcG0MvIQWvpQcm1tW0DV8LSKjmS/OfIEOAF1gUNYD UTYeZD2uzWA0MOtbqCKy4TKTlRPUsLshx8IrrVM8FfLQsXQVJmrWmyNjOGFeifI/B9ezRT5HX Dh0v+RnfmUvj75jf5/BcHJkU4b9o72u/5rj+uzwQ8N1v5t4Rot963RNii7cImI57yy33NX5nW LSU7R3/bAzH3wGTU/MPci+vag/LCA+zfUEWCBfnlDXEPuK/mXPX92TbMFUFNf5mHEtmYJErII 6m4nQsm2puJGlfiBNXEKQWPrqgcad1J4rJjPuQ95w/dOqSLGcija7UDs06ahmdQ35BcNGcGXd HJds810pe4kyFfOg/Ma+tRFp0UA9hYfzXkOL6VHXEDljJdR4/oihn1/IOPJ18Kcd79NtUi8ge jCYephf+3YcFpjNp4AuROn52iKm2WXFK73Yg04reGgLdeuzCEdH0BDXndDilSIBDHSsDX3YRB +v3o8lCn5rqOpOPxXekGGbZczixhFgvvrL+mrla4DwEf/3nQ3uZZmOoxXHTZZTdlNkiHGLQpg poUkq+sIiiyUGGJdHbv7eKKT850NxCveMRelKiYXUVoobXrwiCc9tJgnv2xRcpcvHasXNV+F4 ciL8DpZIU+6oXKE+NoR/HGFs8NTRWM3ro8nOPPku7xip6czQsuJJHhZMZA1jOrdvlzz9LvnVf JwCp/1+O237P5xagjWLO1oOT1J7lTh1ULyM/acuBOJZPXOeEXc= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Sat, 10 Mar 2018 18:53:28 +0100 Use three values directly for a condition check without assigning them to intermediate variables. Signed-off-by: Markus Elfring --- drivers/net/usb/ax88179_178a.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c index e4b0baa98e9a..3e83be232504 100644 --- a/drivers/net/usb/ax88179_178a.c +++ b/drivers/net/usb/ax88179_178a.c @@ -684,7 +684,7 @@ static int ax88179_chk_eee(struct usbnet *dev) if (ecmd.duplex & DUPLEX_FULL) { int eee_lp, eee_cap, eee_adv; - u32 lp, cap, adv, supported = 0; + u32 cap; eee_cap = ax88179_phy_read_mmd_indirect(dev, MDIO_PCS_EEE_ABLE, @@ -708,12 +708,11 @@ static int ax88179_chk_eee(struct usbnet *dev) if (eee_adv < 0) goto set_inactive; - adv = mmd_eee_adv_to_ethtool_adv_t(eee_adv); - lp = mmd_eee_adv_to_ethtool_adv_t(eee_lp); - supported = (ecmd.speed == SPEED_1000) ? - SUPPORTED_1000baseT_Full : - SUPPORTED_100baseT_Full; - if (!(lp & adv & supported)) + if (!(mmd_eee_adv_to_ethtool_adv_t(eee_lp) & + mmd_eee_adv_to_ethtool_adv_t(eee_adv) & + ((ecmd.speed == SPEED_1000) + ? SUPPORTED_1000baseT_Full + : SUPPORTED_100baseT_Full))) goto set_inactive; priv->eee_active = 1; -- 2.16.2