{"id":2234762,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2234762/?format=json","web_url":"http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260507214706.309984-4-khai.wen.tan@linux.intel.com/","project":{"id":46,"url":"http://patchwork.ozlabs.org/api/1.2/projects/46/?format=json","name":"Intel Wired Ethernet development","link_name":"intel-wired-lan","list_id":"intel-wired-lan.osuosl.org","list_email":"intel-wired-lan@osuosl.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260507214706.309984-4-khai.wen.tan@linux.intel.com>","list_archive_url":null,"date":"2026-05-07T21:47:05","name":"[iwl-next,v5,3/4] igc: replace goto out with direct returns in igc_config_fc_after_link_up()","commit_ref":null,"pull_url":null,"state":"under-review","archived":false,"hash":"250958c0cf1391ad86faf0631100cfa86b891a62","submitter":{"id":93102,"url":"http://patchwork.ozlabs.org/api/1.2/people/93102/?format=json","name":"KhaiWenTan","email":"khai.wen.tan@linux.intel.com"},"delegate":{"id":109701,"url":"http://patchwork.ozlabs.org/api/1.2/users/109701/?format=json","username":"anguy11","first_name":"Anthony","last_name":"Nguyen","email":"anthony.l.nguyen@intel.com"},"mbox":"http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260507214706.309984-4-khai.wen.tan@linux.intel.com/mbox/","series":[{"id":503316,"url":"http://patchwork.ozlabs.org/api/1.2/series/503316/?format=json","web_url":"http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=503316","date":"2026-05-07T21:47:02","name":"igc: add support for forcing link speed without autonegotiation","version":5,"mbox":"http://patchwork.ozlabs.org/series/503316/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2234762/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2234762/checks/","tags":{},"related":[],"headers":{"Return-Path":"<intel-wired-lan-bounces@osuosl.org>","X-Original-To":["incoming@patchwork.ozlabs.org","intel-wired-lan@lists.osuosl.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","intel-wired-lan@lists.osuosl.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256\n header.s=default header.b=sSLoSnpT;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4gBZqP5HlPz1yK7\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 08 May 2026 13:49:05 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id 621EC4076F;\n\tFri,  8 May 2026 03:49:04 +0000 (UTC)","from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id uQuzzttMCLp2; Fri,  8 May 2026 03:49:03 +0000 (UTC)","from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id 8F84040705;\n\tFri,  8 May 2026 03:49:03 +0000 (UTC)","from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])\n by lists1.osuosl.org (Postfix) with ESMTP id 92686272\n for <intel-wired-lan@lists.osuosl.org>; Fri,  8 May 2026 03:49:01 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n by smtp3.osuosl.org (Postfix) with ESMTP id 844D460B72\n for <intel-wired-lan@lists.osuosl.org>; Fri,  8 May 2026 03:49:01 +0000 (UTC)","from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id Kc8S-IkZzkNI for <intel-wired-lan@lists.osuosl.org>;\n Fri,  8 May 2026 03:49:00 +0000 (UTC)","from mgamail.intel.com (mgamail.intel.com [198.175.65.13])\n by smtp3.osuosl.org (Postfix) with ESMTPS id 9268460ABC\n for <intel-wired-lan@lists.osuosl.org>; Fri,  8 May 2026 03:49:00 +0000 (UTC)","from orviesa009.jf.intel.com ([10.64.159.149])\n by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 07 May 2026 20:49:00 -0700","from unknown (HELO localhost.png.intel.com) ([10.107.255.61])\n by orviesa009.jf.intel.com with ESMTP; 07 May 2026 20:48:56 -0700"],"X-Virus-Scanned":["amavis at osuosl.org","amavis at osuosl.org"],"X-Comment":"SPF check N/A for local connections - client-ip=140.211.166.142;\n helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=<UNKNOWN> ","DKIM-Filter":["OpenDKIM Filter v2.11.0 smtp4.osuosl.org 8F84040705","OpenDKIM Filter v2.11.0 smtp3.osuosl.org 9268460ABC"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1778212143;\n\tbh=sXuqSCTKz7a0knryPYILfvGpwNPBOLPw8sIBBt5gfBQ=;\n\th=From:To:Cc:Date:In-Reply-To:References:Subject:List-Id:\n\t List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:\n\t From;\n\tb=sSLoSnpTWagA+S3TWAAFx7BlSU8yWAgG/ageS7cJ8NhoMCjBmVfC4qckZe/pDFXsz\n\t W4ga4tM4CZgDshlkIEG3p2U5rgnaM+kUtiheliXg2JoDCpRq/ObLE/IIxyDedOvRsx\n\t BvL5Jj8J7oIAH5vgvZnlFgUmazdhyh3z501PAQpO9rjL3Acx5iLu/1mYXEpqsOevOz\n\t 0Xxd66RmS5ftVX+x56bnyz8sV7Z++naRE558bs6LS5MyVv8ZhNQRyghTn922RfKa6l\n\t TX4FbPQOY8qrsSmzgsXSyxR83tX31lG7ZzYLHUtMuAk4udqcAfataNI1nU1E2Rmkvl\n\t hHKepiWTfCuOw==","Received-SPF":"Pass (mailfrom) identity=mailfrom; client-ip=198.175.65.13;\n helo=mgamail.intel.com; envelope-from=khai.wen.tan@linux.intel.com;\n receiver=<UNKNOWN>","DMARC-Filter":"OpenDMARC Filter v1.4.2 smtp3.osuosl.org 9268460ABC","X-CSE-ConnectionGUID":["ub5cWh28R9KgjY4+OnO2Ow==","tQz1KoGLSv6V5FnKrJZ9Kw=="],"X-CSE-MsgGUID":["yvGVq4u5RB6Gx6Gasg6XOg==","SJDb0zO8T0SRoBK3KiyUXA=="],"X-IronPort-AV":["E=McAfee;i=\"6800,10657,11779\"; a=\"90278904\"","E=Sophos;i=\"6.23,222,1770624000\"; d=\"scan'208\";a=\"90278904\"","E=Sophos;i=\"6.23,222,1770624000\"; d=\"scan'208\";a=\"236767321\""],"X-ExtLoop1":"1","From":"KhaiWenTan <khai.wen.tan@linux.intel.com>","To":"anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com,\n andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,\n kuba@kernel.org, pabeni@redhat.com","Cc":"intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,\n linux-kernel@vger.kernel.org, faizal.abdul.rahim@intel.com,\n hong.aun.looi@intel.com, hector.blanco.alcaine@intel.com,\n khai.wen.tan@intel.com, Faizal Rahim <faizal.abdul.rahim@linux.intel.com>,\n Khai Wen Tan <khai.wen.tan@linux.intel.com>","Date":"Fri,  8 May 2026 05:47:05 +0800","Message-ID":"<20260507214706.309984-4-khai.wen.tan@linux.intel.com>","X-Mailer":"git-send-email 2.43.0","In-Reply-To":"<20260507214706.309984-1-khai.wen.tan@linux.intel.com>","References":"<20260507214706.309984-1-khai.wen.tan@linux.intel.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-Mailman-Original-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1778212141; x=1809748141;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=NEze/O911ldqimOh6WbrfXYQde70TWMivjIbXg4pGRg=;\n b=Y7TME5/oLV7E8prgRReK9D35coR8FT9pvy+n7RkCUho0Iep+LbsbOHtl\n +bLNt08bLIAz0YfmFTLP8r7oUA9GnhzQvEXMof5OyKupFRwGodA2GygaD\n UlfENghhIU+0emNpojA/p7ZHytsoXwEM2uEaQEzdzeefh/8uxtt3a3ZEK\n APpWU/crhs9sPFZo0oLPT7ZJVj4y0X13zr3+cZPO0b7l0d51ECvi12P+n\n 8G1335B7naIsZRr8q9/3v48FEoK9lJzoin8UbmshL/9ateWbRr4TllL0w\n 5lSLe21V7ACbU0dwYwgNTO8ot1kRn53Wlfok/a5KVytWITBiZWnZqE2FW\n g==;","X-Mailman-Original-Authentication-Results":["smtp3.osuosl.org;\n dmarc=none (p=none dis=none)\n header.from=linux.intel.com","smtp3.osuosl.org;\n dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com\n header.a=rsa-sha256 header.s=Intel header.b=Y7TME5/o"],"Subject":"[Intel-wired-lan] [PATCH iwl-next v5 3/4] igc: replace goto out\n with direct returns in igc_config_fc_after_link_up()","X-BeenThere":"intel-wired-lan@osuosl.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Intel Wired Ethernet Linux Kernel Driver Development\n <intel-wired-lan.osuosl.org>","List-Unsubscribe":"<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>","List-Archive":"<http://lists.osuosl.org/pipermail/intel-wired-lan/>","List-Post":"<mailto:intel-wired-lan@osuosl.org>","List-Help":"<mailto:intel-wired-lan-request@osuosl.org?subject=help>","List-Subscribe":"<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>","Errors-To":"intel-wired-lan-bounces@osuosl.org","Sender":"\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"},"content":"From: Faizal Rahim <faizal.abdul.rahim@linux.intel.com>\n\nThe out: label only returns ret_val with no cleanup. The kernel coding\nstyle guide states: \"If there is no cleanup needed then just return\ndirectly.\" (Documentation/process/coding-style.rst, section 7).\n\nThis improves readability ahead of a subsequent patch that introduces a\nnew goto label in this function.\n\nNo functional change.\n\nReviewed-by: Looi Hong Aun <hong.aun.looi@intel.com>\nSigned-off-by: Faizal Rahim <faizal.abdul.rahim@linux.intel.com>\nSigned-off-by: Khai Wen Tan <khai.wen.tan@linux.intel.com>\n---\n drivers/net/ethernet/intel/igc/igc_mac.c | 15 +++++++--------\n 1 file changed, 7 insertions(+), 8 deletions(-)","diff":"diff --git a/drivers/net/ethernet/intel/igc/igc_mac.c b/drivers/net/ethernet/intel/igc/igc_mac.c\nindex 142beb9ae557..0a3d3f357505 100644\n--- a/drivers/net/ethernet/intel/igc/igc_mac.c\n+++ b/drivers/net/ethernet/intel/igc/igc_mac.c\n@@ -458,15 +458,15 @@ s32 igc_config_fc_after_link_up(struct igc_hw *hw)\n \tret_val = hw->phy.ops.read_reg(hw, PHY_STATUS,\n \t\t\t\t       &mii_status_reg);\n \tif (ret_val)\n-\t\tgoto out;\n+\t\treturn ret_val;\n \tret_val = hw->phy.ops.read_reg(hw, PHY_STATUS,\n \t\t\t\t       &mii_status_reg);\n \tif (ret_val)\n-\t\tgoto out;\n+\t\treturn ret_val;\n \n \tif (!(mii_status_reg & MII_SR_AUTONEG_COMPLETE)) {\n \t\thw_dbg(\"Copper PHY and Auto Neg has not completed.\\n\");\n-\t\tgoto out;\n+\t\treturn ret_val;\n \t}\n \n \t/* The AutoNeg process has completed, so we now need to\n@@ -478,11 +478,11 @@ s32 igc_config_fc_after_link_up(struct igc_hw *hw)\n \tret_val = hw->phy.ops.read_reg(hw, PHY_AUTONEG_ADV,\n \t\t\t\t       &mii_nway_adv_reg);\n \tif (ret_val)\n-\t\tgoto out;\n+\t\treturn ret_val;\n \tret_val = hw->phy.ops.read_reg(hw, PHY_LP_ABILITY,\n \t\t\t\t       &mii_nway_lp_ability_reg);\n \tif (ret_val)\n-\t\tgoto out;\n+\t\treturn ret_val;\n \t/* Two bits in the Auto Negotiation Advertisement Register\n \t * (Address 4) and two bits in the Auto Negotiation Base\n \t * Page Ability Register (Address 5) determine flow control\n@@ -598,7 +598,7 @@ s32 igc_config_fc_after_link_up(struct igc_hw *hw)\n \tret_val = hw->mac.ops.get_speed_and_duplex(hw, &speed, &duplex);\n \tif (ret_val) {\n \t\thw_dbg(\"Error getting link speed and duplex\\n\");\n-\t\tgoto out;\n+\t\treturn ret_val;\n \t}\n \n \tif (duplex == HALF_DUPLEX)\n@@ -610,10 +610,9 @@ s32 igc_config_fc_after_link_up(struct igc_hw *hw)\n \tret_val = igc_force_mac_fc(hw);\n \tif (ret_val) {\n \t\thw_dbg(\"Error forcing flow control settings\\n\");\n-\t\tgoto out;\n+\t\treturn ret_val;\n \t}\n \n-out:\n \treturn ret_val;\n }\n \n","prefixes":["iwl-next","v5","3/4"]}