get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2216814/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2216814,
    "url": "http://patchwork.ozlabs.org/api/patches/2216814/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260327073046.134085-9-aleksandr.loktionov@intel.com/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api",
        "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": "<20260327073046.134085-9-aleksandr.loktionov@intel.com>",
    "list_archive_url": null,
    "date": "2026-03-27T07:30:43",
    "name": "[iwl-next] ixgbe: use int instead of u32 for error code variables",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "b36efe57f17b0fab18012561b40d3e5e41403c48",
    "submitter": {
        "id": 75597,
        "url": "http://patchwork.ozlabs.org/api/people/75597/?format=api",
        "name": "Loktionov, Aleksandr",
        "email": "aleksandr.loktionov@intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260327073046.134085-9-aleksandr.loktionov@intel.com/mbox/",
    "series": [
        {
            "id": 497723,
            "url": "http://patchwork.ozlabs.org/api/series/497723/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=497723",
            "date": "2026-03-27T07:30:43",
            "name": "[iwl-next] ixgbe: use int instead of u32 for error code variables",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/497723/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2216814/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2216814/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=fPaOqkdw;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=140.211.166.136; helo=smtp3.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136])\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 4fhsky0hFSz1yFr\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 18:31:06 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id E41656124B;\n\tFri, 27 Mar 2026 07:31:03 +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 4Tlz8B3FzCJu; Fri, 27 Mar 2026 07:31:03 +0000 (UTC)",
            "from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 4D39A6127C;\n\tFri, 27 Mar 2026 07:31:03 +0000 (UTC)",
            "from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n by lists1.osuosl.org (Postfix) with ESMTP id AB1942D5\n for <intel-wired-lan@lists.osuosl.org>; Fri, 27 Mar 2026 07:31:01 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp4.osuosl.org (Postfix) with ESMTP id A94D441598\n for <intel-wired-lan@lists.osuosl.org>; Fri, 27 Mar 2026 07:31:01 +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 0h9f2f71zTdQ for <intel-wired-lan@lists.osuosl.org>;\n Fri, 27 Mar 2026 07:31:00 +0000 (UTC)",
            "from mgamail.intel.com (mgamail.intel.com [192.198.163.14])\n by smtp4.osuosl.org (Postfix) with ESMTPS id B4ACB415BB\n for <intel-wired-lan@lists.osuosl.org>; Fri, 27 Mar 2026 07:31:00 +0000 (UTC)",
            "from orviesa002.jf.intel.com ([10.64.159.142])\n by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 27 Mar 2026 00:31:00 -0700",
            "from amlin-019-225.igk.intel.com ([10.102.19.225])\n by orviesa002.jf.intel.com with ESMTP; 27 Mar 2026 00:30:59 -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 smtp3.osuosl.org 4D39A6127C",
            "OpenDKIM Filter v2.11.0 smtp4.osuosl.org B4ACB415BB"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1774596663;\n\tbh=ctopaYH3ZHtzD/idUHSO5I3IRTMErrFp1cMGbN0Ls98=;\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=fPaOqkdw9HPtaIArOjRelAA2BtYbUldmr4ed/utXJs/HSs0oAHanqsTkYPacu9mO+\n\t BfFGMbXZKpOCEbh4Pq+MB1ZzSdasulFcNc/rDHO6Vfo10YdxQClMmx9/hP3Tq/XIzd\n\t bB0z427QY/hqsdnu6V1hVWshNQO85ezTfkn0np8QWiPjyKZPrB3YWY7MnQNxwhLc1x\n\t eE074/za2bgNr44b70FfcIt95XTf0XCfjTn7oNZgRfJNgCTBG/FK10Bf9mKpR6qXZg\n\t yEUMVv094LfRbTLDVMwzRMLa99lFm1jumMk3iynTcnjzmpZEGxC0dBxDzPzug8AN7u\n\t sIPsr78JGUgpg==",
        "Received-SPF": "Pass (mailfrom) identity=mailfrom; client-ip=192.198.163.14;\n helo=mgamail.intel.com; envelope-from=aleksandr.loktionov@intel.com;\n receiver=<UNKNOWN>",
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp4.osuosl.org B4ACB415BB",
        "X-CSE-ConnectionGUID": [
            "Ua/El1t5ReGTdp9vcqamoA==",
            "LN1ynwVCQrSlFleup1Cjgg=="
        ],
        "X-CSE-MsgGUID": [
            "M5WXe1kbR929Vi6eGOBvag==",
            "slsuElGSTNygE3LNi3aO6Q=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6800,10657,11741\"; a=\"75734329\"",
            "E=Sophos;i=\"6.23,143,1770624000\"; d=\"scan'208\";a=\"75734329\"",
            "E=Sophos;i=\"6.23,143,1770624000\"; d=\"scan'208\";a=\"255740404\""
        ],
        "X-ExtLoop1": "1",
        "From": "Aleksandr Loktionov <aleksandr.loktionov@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com,\n aleksandr.loktionov@intel.com",
        "Cc": "netdev@vger.kernel.org",
        "Date": "Fri, 27 Mar 2026 08:30:43 +0100",
        "Message-ID": "<20260327073046.134085-9-aleksandr.loktionov@intel.com>",
        "X-Mailer": "git-send-email 2.52.0",
        "In-Reply-To": "<20260327073046.134085-1-aleksandr.loktionov@intel.com>",
        "References": "<20260327073046.134085-1-aleksandr.loktionov@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=1774596661; x=1806132661;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=8p/HtnBUPvGrSHRur7c8OxjrxPjk33dmg37K91oRb6I=;\n b=i2bwLShG9r64cbD0km6e9T++CzThJbLxkCNuP6s7Je8+po+G3qFvtyuO\n e6dQXi7kQgQ+m+NUtqPhL5jJoU8M+krPREVjqInlq+EELjZLdmycufmB7\n 7Ur6vPIpG4QklykLeuPCMdbWq37veOWclB7sugabuE+BxmHxGskys0Wlp\n TAoDc9zkG1B3ZRdi5vrd12oO+J/U5pK3GtubaRdodsc9RBwcovNPqShjW\n xBrgfOYUh9bDwRMbtXUxq2w/kWUNICc8rxV5rK7QYlRKkL1FWzxK2fifv\n gy4kG3mDFEP33gxCHb9gIxRQp6MywFsXUXVsxp96U0+pPPpJaVrnjeu3J\n g==;",
        "X-Mailman-Original-Authentication-Results": [
            "smtp4.osuosl.org;\n dmarc=pass (p=none dis=none)\n header.from=intel.com",
            "smtp4.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=i2bwLShG"
        ],
        "Subject": "[Intel-wired-lan] [PATCH iwl-next] ixgbe: use int instead of u32\n for error code variables",
        "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": "The variables used to store return values of kernel and driver functions\nthroughout the ixgbe driver are declared as u32 in several places.  Such\nfunctions return negative errno values on error (e.g. -EIO, -EFAULT),\nwhich are sign-extended negative integers.  Storing them in an unsigned\nu32 silently wraps the value: -EIO (0xFFFFFFF7) stored in u32 becomes a\nlarge positive number, so any \"if (status)\" truthiness check still works\nby accident, but comparisons against specific negative error codes or\npropagation up the call stack would produce wrong results.\n\nIn the Linux kernel, u32 is reserved for fixed-width quantities used in\nhardware interfaces or protocol structures.  Using it for generic error\ncodes misleads reviewers into thinking the value is hardware-constrained.\n\nChange all such local variables from u32 to int driver-wide: one in\nixgbe_main.c (ixgbe_resume), three in ixgbe_phy.c\n(ixgbe_identify_phy_generic, ixgbe_tn_check_overtemp,\nixgbe_set_copper_phy_power), and six in ixgbe_x550.c\n(ixgbe_check_link_t_X550em, ixgbe_get_lasi_ext_t_x550em,\nixgbe_enable_lasi_ext_t_x550em, ixgbe_handle_lasi_ext_t_x550em,\nixgbe_ext_phy_t_x550em_get_link, ixgbe_setup_internal_phy_t_x550em).\n\nNo functional change.\n\nSigned-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |  2 +-\n drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c  |  6 +++---\n drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 12 ++++++------\n 3 files changed, 10 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex 210c7b9..703451d 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -7518,6 +7518,6 @@ static int ixgbe_resume(struct device *dev_d)\n \tstruct pci_dev *pdev = to_pci_dev(dev_d);\n \tstruct ixgbe_adapter *adapter = pci_get_drvdata(pdev);\n \tstruct net_device *netdev = adapter->netdev;\n-\tu32 err;\n+\tint err;\n \n \tadapter->hw.hw_addr = adapter->io_addr;\n \ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c\nindex a1b2c3d..b4c5d6e 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c\n@@ -264,5 +264,5 @@ int ixgbe_identify_phy_generic(struct ixgbe_hw *hw)\n {\n-\tu32 status = -EFAULT;\n+\tint status = -EFAULT;\n \tu32 phy_addr;\n \n \tif (!hw->phy.phy_semaphore_mask) {\n@@ -2812,6 +2812,6 @@ bool ixgbe_tn_check_overtemp(struct ixgbe_hw *hw)\n {\n \tu16 phy_data = 0;\n-\tu32 status;\n+\tint status;\n \n \tif (hw->device_id != IXGBE_DEV_ID_82599_T3_LOM)\n \t\treturn false;\n@@ -2833,5 +2833,5 @@ int ixgbe_set_copper_phy_power(struct ixgbe_hw *hw, bool on)\n {\n-\tu32 status;\n+\tint status;\n \tu16 reg;\n \n \t/* Bail if we don't have copper phy */\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\nindex c1d2e3f..d4e5f6a 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\n@@ -1912,6 +1912,6 @@ static int ixgbe_check_link_t_X550em(struct ixgbe_hw *hw,\n \t\t\t\t     bool link_up_wait_to_complete)\n {\n-\tu32 status;\n+\tint status;\n \tu16 i, autoneg_status;\n \n \tif (hw->mac.ops.get_media_type(hw) != ixgbe_media_type_copper)\n@@ -2331,6 +2331,6 @@ static int ixgbe_get_lasi_ext_t_x550em(struct ixgbe_hw *hw, bool *lsc,\n \t\t\t\t       bool *is_overtemp)\n {\n-\tu32 status;\n+\tint status;\n \tu16 reg;\n \n \t*is_overtemp = false;\n@@ -2419,6 +2419,6 @@ static int ixgbe_enable_lasi_ext_t_x550em(struct ixgbe_hw *hw)\n {\n \tbool lsc, overtemp;\n-\tu32 status;\n+\tint status;\n \tu16 reg;\n \n \t/* Clear interrupt flags */\n@@ -2512,7 +2512,7 @@ static int ixgbe_handle_lasi_ext_t_x550em(struct ixgbe_hw *hw,\n {\n \tstruct ixgbe_phy_info *phy = &hw->phy;\n \tbool lsc;\n-\tu32 status;\n+\tint status;\n \n \tstatus = ixgbe_get_lasi_ext_t_x550em(hw, &lsc, is_overtemp);\n \tif (status)\n@@ -2608,5 +2608,5 @@ static int ixgbe_ext_phy_t_x550em_get_link(struct ixgbe_hw *hw, bool *link_up)\n {\n-\tu32 ret;\n+\tint ret;\n \tu16 autoneg_status;\n \n \t*link_up = false;\n@@ -2642,7 +2642,7 @@ static int ixgbe_setup_internal_phy_t_x550em(struct ixgbe_hw *hw)\n {\n \tixgbe_link_speed force_speed;\n \tbool link_up;\n-\tu32 status;\n+\tint status;\n \tu16 speed;\n \n \tif (hw->mac.ops.get_media_type(hw) != ixgbe_media_type_copper)\n",
    "prefixes": [
        "iwl-next"
    ]
}