From patchwork Sat Apr 23 16:53:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Neftin X-Patchwork-Id: 1621423 X-Patchwork-Delegate: anthony.l.nguyen@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=fDzcC0Eh; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kly6435WNz9s0w for ; Sun, 24 Apr 2022 02:53:47 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 2211882E29; Sat, 23 Apr 2022 16:53:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id l7HArauwKgaI; Sat, 23 Apr 2022 16:53:45 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 1BC5682EA1; Sat, 23 Apr 2022 16:53:45 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 6AE141BF5DF for ; Sat, 23 Apr 2022 16:53:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 4915D41780 for ; Sat, 23 Apr 2022 16:53:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp4.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=intel.com Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ldkAvoeCNh8v for ; Sat, 23 Apr 2022 16:53:42 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by smtp4.osuosl.org (Postfix) with ESMTPS id 694EF4175C for ; Sat, 23 Apr 2022 16:53:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650732822; x=1682268822; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=MzT3qnafF/52gyWmZNqXB4bjdK7NRzNmmYilO+3mRRw=; b=fDzcC0EhidzV9B7djIwAiBm9+YUDpOuvGc/x1M4PrsMNBesZaGlCeSxe gBypOMIJKFV4Fi+DiYz0+Zn3ug/2DyRqATnMv+EHNz8+qukLt9Mi774oQ pXgFBpkga6z6e0x+Y236XMQ18nXdyRofIW84uBqvDocKVGQrtnEBiBOSG 9WF7su6dq1GuyN210PO+m6eFt3QReLBCZXG6dh+p628kPDYwIKf9HIEdP XvcISfiffhzyWXDPKHxOgjHeZ0DeVyEm4wYE234NMJXg2LV3fHmDjPME6 pzRsB8pakdmZnKQ+giQF9CNtMDIjaHG7SWk0lPjgGS370dUmvu60hIRBD w==; X-IronPort-AV: E=McAfee;i="6400,9594,10326"; a="325374960" X-IronPort-AV: E=Sophos;i="5.90,284,1643702400"; d="scan'208";a="325374960" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Apr 2022 09:53:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,284,1643702400"; d="scan'208";a="728987376" Received: from ccdlinuxdev12.iil.intel.com ([143.185.162.56]) by orsmga005.jf.intel.com with ESMTP; 23 Apr 2022 09:53:25 -0700 From: Sasha Neftin To: intel-wired-lan@lists.osuosl.org Date: Sat, 23 Apr 2022 19:53:21 +0300 Message-Id: <20220423165321.838055-1-sasha.neftin@intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [Intel-wired-lan] [PATCH v2 1/1] igc: Remove unused phy_type enum X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" Complete to commit 8e153faf5827 ("igc: Remove unused phy type") i225 parts have only one phy. There is no point to use phy_type enum. Clean up the code accordingly, and get rid of the unused enum lines. Signed-off-by: Sasha Neftin Tested-by: Naama Meir --- v2: ret_val isn't needed since it's always returning 0 drivers/net/ethernet/intel/igc/igc_base.c | 2 -- drivers/net/ethernet/intel/igc/igc_hw.h | 7 ------- drivers/net/ethernet/intel/igc/igc_phy.c | 12 +++--------- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/drivers/net/ethernet/intel/igc/igc_base.c b/drivers/net/ethernet/intel/igc/igc_base.c index f068b66b8025..a15927e77272 100644 --- a/drivers/net/ethernet/intel/igc/igc_base.c +++ b/drivers/net/ethernet/intel/igc/igc_base.c @@ -182,8 +182,6 @@ static s32 igc_init_phy_params_base(struct igc_hw *hw) igc_check_for_copper_link(hw); - phy->type = igc_phy_i225; - out: return ret_val; } diff --git a/drivers/net/ethernet/intel/igc/igc_hw.h b/drivers/net/ethernet/intel/igc/igc_hw.h index b1e72ec5f131..360644f33d5f 100644 --- a/drivers/net/ethernet/intel/igc/igc_hw.h +++ b/drivers/net/ethernet/intel/igc/igc_hw.h @@ -53,11 +53,6 @@ enum igc_mac_type { igc_num_macs /* List is 1-based, so subtract 1 for true count. */ }; -enum igc_phy_type { - igc_phy_unknown = 0, - igc_phy_i225, -}; - enum igc_media_type { igc_media_type_unknown = 0, igc_media_type_copper = 1, @@ -138,8 +133,6 @@ struct igc_nvm_info { struct igc_phy_info { struct igc_phy_operations ops; - enum igc_phy_type type; - u32 addr; u32 id; u32 reset_delay_us; /* in usec */ diff --git a/drivers/net/ethernet/intel/igc/igc_phy.c b/drivers/net/ethernet/intel/igc/igc_phy.c index 6961f65d36b9..2140ad1e8443 100644 --- a/drivers/net/ethernet/intel/igc/igc_phy.c +++ b/drivers/net/ethernet/intel/igc/igc_phy.c @@ -148,17 +148,11 @@ void igc_power_down_phy_copper(struct igc_hw *hw) s32 igc_check_downshift(struct igc_hw *hw) { struct igc_phy_info *phy = &hw->phy; - s32 ret_val; - switch (phy->type) { - case igc_phy_i225: - default: - /* speed downshift not supported */ - phy->speed_downgraded = false; - ret_val = 0; - } + /* speed downshift not supported */ + phy->speed_downgraded = false; - return ret_val; + return 0; } /**