get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2119908,
    "url": "http://patchwork.ozlabs.org/api/patches/2119908/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20250806-phy_marvell_comphy-v1-1-ad9f4e789d5b@linaro.org/",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api",
        "name": "U-Boot",
        "link_name": "uboot",
        "list_id": "u-boot.lists.denx.de",
        "list_email": "u-boot@lists.denx.de",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20250806-phy_marvell_comphy-v1-1-ad9f4e789d5b@linaro.org>",
    "list_archive_url": null,
    "date": "2025-08-06T16:43:24",
    "name": "[1/2] phy: marvell: Fix off by 1 limit checks",
    "commit_ref": "a75c8a4b883108edf19127fca3e6c6c590f9ba8c",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "135b8ea16e7321d21d261154a9b4292cf863cf24",
    "submitter": {
        "id": 88793,
        "url": "http://patchwork.ozlabs.org/api/people/88793/?format=api",
        "name": "Andrew Goodbody",
        "email": "andrew.goodbody@linaro.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20250806-phy_marvell_comphy-v1-1-ad9f4e789d5b@linaro.org/mbox/",
    "series": [
        {
            "id": 468138,
            "url": "http://patchwork.ozlabs.org/api/series/468138/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=468138",
            "date": "2025-08-06T16:43:24",
            "name": "phy: marvell: Fix two Smatch reported issues",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/468138/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2119908/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2119908/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<u-boot-bounces@lists.denx.de>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=gKMZ2zuS;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=linaro.org",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.b=\"gKMZ2zuS\";\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=linaro.org",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=andrew.goodbody@linaro.org"
        ],
        "Received": [
            "from phobos.denx.de (phobos.denx.de [85.214.62.61])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature ECDSA (secp384r1))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4bxx1t51TBz1xvm\n\tfor <incoming@patchwork.ozlabs.org>; Thu,  7 Aug 2025 02:43:30 +1000 (AEST)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 9B7888433B;\n\tWed,  6 Aug 2025 18:43:33 +0200 (CEST)",
            "by phobos.denx.de (Postfix, from userid 109)\n id 1D5DA842C7; Wed,  6 Aug 2025 18:43:31 +0200 (CEST)",
            "from mail-wm1-x332.google.com (mail-wm1-x332.google.com\n [IPv6:2a00:1450:4864:20::332])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 27C8D842C7\n for <u-boot@lists.denx.de>; Wed,  6 Aug 2025 18:43:28 +0200 (CEST)",
            "by mail-wm1-x332.google.com with SMTP id\n 5b1f17b1804b1-459d7726ee6so770445e9.2\n for <u-boot@lists.denx.de>; Wed, 06 Aug 2025 09:43:28 -0700 (PDT)",
            "from artemis2.elfringham.co.uk\n ([2a0a:ef40:f9e:3c01:6501:9a0d:7129:a02b])\n by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-459e5868fd7sm61287685e9.18.2025.08.06.09.43.26\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 06 Aug 2025 09:43:27 -0700 (PDT)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,\n SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1754498607; x=1755103407; darn=lists.denx.de;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:from:to:cc:subject:date:message-id\n :reply-to; bh=ZASLZ/2husjIZcBM1xd/EbxKWxZ4UzD//v+T+ATsn0k=;\n b=gKMZ2zuSZHKqKnx676v/xlennDz9A7trg4WxAPt2RYcK8lp/ORdX2vluhiYYJi+xNP\n u6G5SDJr7286g+ciiuTMO4Ywh7O/BhY6SoC0XVxKWj7eO4fA9Xfh4zyypECVupi7KSxm\n Vo/dnJQsdZgIMQglm1NFa9Ms6BuqLavKzOLX5O28aBjRElkuh5DouKjMysV7GhNzUPVv\n kKAPQmsXeal1EgnQvLkMUaEhZS/84cz0m6WdgZ6rnMjzDSuH+TPRMThaTLTIuojKmuWI\n Lm0bkbCmrSzetTjYadzXBqGu3zjo72HTSGMRuNufW9b3T9vc/gvjJq0iLYrRzJcLjNql\n vezg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1754498607; x=1755103407;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=ZASLZ/2husjIZcBM1xd/EbxKWxZ4UzD//v+T+ATsn0k=;\n b=pVFmnlUnOJ6HY4skghII2p7aGfYX9uR1i6j3rrgDoKC07d0tyKvrU3VtWqz1sUks34\n fQRJxMukWvZEPfLQqXyQhptE7crfN0KizVYmXtV/UO2ooggS8gA6A6DhpWoMGzdzhfx2\n 6VGjRlI13l6rEEsAd7mSCJHMQnVv22fqLcaETpi9GO3sSAYhTmbpP6dBPqwe6PdF4GDf\n 6NGF1R55CKMRis7TJ5RU9f+J1NqP+8S25wtQJZy06Fammp1e2prQB8F3j+az/ab3BO2o\n hb3sFBonvFHmTkFaOY8kEWB6bYkqsCMId2W2Sg5pDmNjPnbDY8h4XwyLlrotVYwqKRFy\n 00Xw==",
        "X-Gm-Message-State": "AOJu0Yz9Z9XgSA5ckCLyvbvyldNl5we6a/1841/ASmwP5NbEMYr7igP2\n vNnyH4lCaQ8J22AJu18MJN1hHTKnEHQ4S6n9FunSvx3U6hsSVOkiZWwaogo87ttHdbweN7uTMhj\n +OJqr",
        "X-Gm-Gg": "ASbGncvCmK+IF1+x9bRX77gSUtn2/t3BogzNmlNstr0vX7f9VF3vP/n7FniYtdRFfd9\n Bt7vx+cFU8eMzJjxJxygv/CXzWJtj5zHvlLR85w1zFeC5U26YPudiY+7qZz8YNnvsF7ZAvGZhxI\n AtSyiVnE06kiIi7o5B+Los7kAq4M0HK2YMz4PkfjRawslCSqj0mELMTNOUvTT8HpmQzaPYRrWuE\n xVpEWaDvJ6uNmAbFM+LjMWeqQdy6tnpCQ+ccbrkRmiEBdLYHqzkqTrRmuWuL2jndb3nZ0aPbHLQ\n XA6Zophgf82GthCLqW8uftjB1eBbd3LbB1P4LoNiAWJvWiQ6JULtJIxOOLcY+j08nW44DQyVk7L\n YiQfzytsQ0dtb7rv5EYPCYSM6srwbhP7USxo8d2k1sDHRVW/q+0Zcv6oP2Gg5LA==",
        "X-Google-Smtp-Source": "\n AGHT+IFyyEAp8okuFvjjeyf2xKfz15UgvOG/mRCtOuqk4sZayGcFbp5O7RDxipae177mu+T2jhXVlQ==",
        "X-Received": "by 2002:a05:600c:6305:b0:458:b7d1:99f9 with SMTP id\n 5b1f17b1804b1-459e709aae6mr32322985e9.11.1754498607555;\n Wed, 06 Aug 2025 09:43:27 -0700 (PDT)",
        "From": "Andrew Goodbody <andrew.goodbody@linaro.org>",
        "Date": "Wed, 06 Aug 2025 17:43:24 +0100",
        "Subject": "[PATCH 1/2] phy: marvell: Fix off by 1 limit checks",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "Message-Id": "<20250806-phy_marvell_comphy-v1-1-ad9f4e789d5b@linaro.org>",
        "References": "<20250806-phy_marvell_comphy-v1-0-ad9f4e789d5b@linaro.org>",
        "In-Reply-To": "<20250806-phy_marvell_comphy-v1-0-ad9f4e789d5b@linaro.org>",
        "To": "Stefan Roese <stefan.roese@mailbox.org>, Tom Rini <trini@konsulko.com>",
        "Cc": "u-boot@lists.denx.de, Andrew Goodbody <andrew.goodbody@linaro.org>",
        "X-Mailer": "b4 0.12.0",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.39",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>",
        "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>",
        "List-Post": "<mailto:u-boot@lists.denx.de>",
        "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>",
        "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>",
        "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de",
        "X-Virus-Status": "Clean"
    },
    "content": "The limit checks in get_speed_string and get_type_string are off by 1 as\nthey do not account for the maximum index into an array that can be used\nis 1 less than the number of elements in that array. Adjust the limit\nchecks to allow for this.\n\nThis issue was found by Smatch.\n\nSigned-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>\n---\n drivers/phy/marvell/comphy_core.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/phy/marvell/comphy_core.c b/drivers/phy/marvell/comphy_core.c\nindex a666a4e794e..a4121423873 100644\n--- a/drivers/phy/marvell/comphy_core.c\n+++ b/drivers/phy/marvell/comphy_core.c\n@@ -28,7 +28,7 @@ static const char *get_speed_string(u32 speed)\n \t\t\"10.3125 Gbps\"\n \t};\n \n-\tif (speed < 0 || speed > COMPHY_SPEED_MAX)\n+\tif (speed < 0 || speed >= COMPHY_SPEED_MAX)\n \t\treturn \"invalid\";\n \n \treturn speed_strings[speed];\n@@ -44,7 +44,7 @@ static const char *get_type_string(u32 type)\n \t\t\"IGNORE\"\n \t};\n \n-\tif (type < 0 || type > COMPHY_TYPE_MAX)\n+\tif (type < 0 || type >= COMPHY_TYPE_MAX)\n \t\treturn \"invalid\";\n \n \treturn type_strings[type];\n",
    "prefixes": [
        "1/2"
    ]
}