get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2234741,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2234741/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260508031710.514574-7-alistair.francis@wdc.com/",
    "project": {
        "id": 28,
        "url": "http://patchwork.ozlabs.org/api/1.2/projects/28/?format=api",
        "name": "Linux PCI development",
        "link_name": "linux-pci",
        "list_id": "linux-pci.vger.kernel.org",
        "list_email": "linux-pci@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260508031710.514574-7-alistair.francis@wdc.com>",
    "list_archive_url": null,
    "date": "2026-05-08T03:16:58",
    "name": "[06/18] rust: error: impl From<FromBytesWithNulError> for Kernel Error",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "a7d63b14da5974b4bde2ea39e8c4d69303420722",
    "submitter": {
        "id": 64571,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/64571/?format=api",
        "name": "Alistair Francis",
        "email": "alistair23@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260508031710.514574-7-alistair.francis@wdc.com/mbox/",
    "series": [
        {
            "id": 503312,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/503312/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=503312",
            "date": "2026-05-08T03:16:52",
            "name": "lib: Rust implementation of SPDM",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/503312/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2234741/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2234741/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-pci+bounces-54161-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-pci@vger.kernel.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=Yj6Z0kmp;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c15:e001:75::12fc:5321; helo=sin.lore.kernel.org;\n envelope-from=linux-pci+bounces-54161-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"Yj6Z0kmp\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.214.179",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com"
        ],
        "Received": [
            "from sin.lore.kernel.org (sin.lore.kernel.org\n [IPv6:2600:3c15:e001:75::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4gBZ9j1Nm5z1yCg\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 08 May 2026 13:19:53 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id BE4A530216C9\n\tfor <incoming@patchwork.ozlabs.org>; Fri,  8 May 2026 03:18:11 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 61DEF2E7F0A;\n\tFri,  8 May 2026 03:18:11 +0000 (UTC)",
            "from mail-pl1-f179.google.com (mail-pl1-f179.google.com\n [209.85.214.179])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B2E22E7635\n\tfor <linux-pci@vger.kernel.org>; Fri,  8 May 2026 03:18:09 +0000 (UTC)",
            "by mail-pl1-f179.google.com with SMTP id\n d9443c01a7336-2baef9f5ecdso1757875ad.1\n        for <linux-pci@vger.kernel.org>; Thu, 07 May 2026 20:18:09 -0700 (PDT)",
            "from toolbx.alistair23.me ([2403:581e:fdf9:0:6209:4521:6813:45b7])\n        by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2baf1eafa62sm3220685ad.74.2026.05.07.20.18.02\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Thu, 07 May 2026 20:18:08 -0700 (PDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1778210291; cv=none;\n b=njQdYknFIF9kIYoHAuylpa4Cu7yZiLYoSuSLCSdUOQjuQQY5hWHId/ZEfaNM5IfFyDcc2iMroZAKLswzyXWcyJ40kO4d5ZSTmEHuWtONdO5OJGDAUjabr0Mx8/g+GN69LpirW2hn9mpWhHO6TfXqGRqwOeV+igKvLcuB6NVe5Fs=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1778210291; c=relaxed/simple;\n\tbh=ERpyWsMPE9+dpw78Rz8jzNcLrivxWjKPOe5Lqw+ayKs=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=ZAoLSeP+96hJjJ5NkyEoFnDxb+dHpu6CwPU3+BUrDqOurE9ueP8Yz11YYFtI+hPwNJtd+ZHwYax/2rXeFsQzNevUo4wjGW7V02ebijezl0DmwOtqaS/6VmQAe7wvTJ+PL7xx8HqCnVEPxniPyW4tyyH2SM2OwXkoo7/VemNqU1s=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=Yj6Z0kmp; arc=none smtp.client-ip=209.85.214.179",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1778210289; x=1778815089;\n darn=vger.kernel.org;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=9dr4Me0446pI9Lo+v8fcchBIKe8OPGzCDfNPYgvjsMc=;\n        b=Yj6Z0kmpi9AVb6Nd8h0wWN5TlgvMLiVNfReWogBnZH4w+otegDoFB5XF2212PfcZ4u\n         bCqNS2GxYyMlHd2PTOezbhqkYMycoEuDnnYRh6H4fAHqzDsubjkFdJOFzgC8YWK1bhrB\n         Wtg3Wo4wuCg8dkwC3N5FeuNHJFo3fXNnofhPNYgLCg/DFRNnALlGntMPdokrDyb6/T94\n         s8Oz9/7E5nborARV7YccVyWYfW54QLNzALiKSXqW/oz/BjFOFrRfHWhp/e6v9SyrjkeC\n         pJUj2imTw+UIyyNpBh7OrpI4n136yyhAqUnoVncFUmvmuuxaS+IgCU/5IQWalPXFaCOt\n         m4Qw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1778210289; x=1778815089;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n         :to:cc:subject:date:message-id:reply-to;\n        bh=9dr4Me0446pI9Lo+v8fcchBIKe8OPGzCDfNPYgvjsMc=;\n        b=NZY5FcN3OH2a7L7LrtJSHL2V/XehwyXKz2g+Kn6qJE8oSYgutVRYGANo75xN75trK9\n         f9ASxrDi5iqjZRS7BQ+LdS2Htl4vyoBCEfc2pBb236sIoB9vTAb4MGMg+ICB7Wd1b6sY\n         3+qVioAPNhYUxIIMmW08+SXfkFOrXWNQhd2VrjcFYOFY8W4Avnz35lKlyfbU8GiDtjrK\n         Y/GrpQX4XAmIcaGBij0uWB/Z7Kr+Z5gGof1X9BAob+fWOFru55J+M4ZkCh71ESghQnae\n         ZTUCv+zhLZ1mEtlqjE9xlONq9ttUJiLi+1HXERcTwhjOx1qhUFP9tFYrssq6mOb4PeZk\n         DVBA==",
        "X-Forwarded-Encrypted": "i=1;\n AFNElJ+ed6s+K4qiwW88MY8wKCsX05WNZiNgQFq6B57DiCvKpjFsIfUOtsF9e/z+rnuOhV3rOkR9mNRhFlg=@vger.kernel.org",
        "X-Gm-Message-State": "AOJu0YxmJciSQpS13g/CwYpnIbBWDn+YY/GXAkOUzSFk1xcaKfokiMRD\n\tIzSlGU7PdSmmMWnBlcxJA2lsIasYH45wf29w5BtdViKrNJU/8S6aGvV4",
        "X-Gm-Gg": "Acq92OHDy8GjxH0I4/RAMkECCS8btviuRoCOHpK9ZuVQ5P9JD+q+5gUExk0G0Q0ng06\n\tTHzAAaPOmdTgR4jNO8nP5e6tGYzj1dfY1+/XnP9R5ycEHM36P9PBPPsW6WA4rHedYM8wJfiGcqk\n\tCwRvEY0Jim6aGOdnnCy5jo7nDnJ6Ug+v3dghPG7yf2Hjq/26di6QlntBl06CRGraCOeyRVMbi9w\n\tAM0mTRLrKBW+8/8jJNjSH7vJZvCI97OdjAMfwo2bD1BpafdsgwwCiATscj734vi36w/IFoUbU85\n\tV7tP9Do/rmXUCtwiqhdwqyt4zh2uTT91X58VBOpGC0pDYqzF7hWD44vz3KOHWuHH+b6urQDvR3t\n\t26m9pyYNIjLQl0eQOoLPZrZYo28aAP6LN4dkGtGL5hlcOlhhs4GOEANwG4KCAaEF77RgP0z1890\n\tzDjtEWOZixR+u27mpEX7G4uvXQFMgSXkjc9x8RXjpv",
        "X-Received": "by 2002:a17:902:be05:b0:2ba:4a19:fc89 with SMTP id\n d9443c01a7336-2ba78b485d7mr69407855ad.5.1778210289439;\n        Thu, 07 May 2026 20:18:09 -0700 (PDT)",
        "From": "alistair23@gmail.com",
        "X-Google-Original-From": "alistair.francis@wdc.com",
        "To": "alistair@alistair23.me,\n\tlinux-kernel@vger.kernel.org,\n\tlukas@wunner.de,\n\tJonathan.Cameron@huawei.com,\n\tbhelgaas@google.com,\n\trust-for-linux@vger.kernel.org,\n\takpm@linux-foundation.org,\n\tlinux-cxl@vger.kernel.org,\n\tdjbw@kernel.org,\n\tlinux-pci@vger.kernel.org",
        "Cc": "alex.gaynor@gmail.com,\n\twilfred.mallawa@wdc.com,\n\tgary@garyguo.net,\n\tbjorn3_gh@protonmail.com,\n\tbenno.lossin@proton.me,\n\taliceryhl@google.com,\n\tboqun.feng@gmail.com,\n\ta.hindborg@kernel.org,\n\ttmgross@umich.edu,\n\tojeda@kernel.org,\n\talistair23@gmail.com,\n\tAlistair Francis <alistair.francis@wdc.com>",
        "Subject": "[PATCH 06/18] rust: error: impl From<FromBytesWithNulError> for\n Kernel Error",
        "Date": "Fri,  8 May 2026 13:16:58 +1000",
        "Message-ID": "<20260508031710.514574-7-alistair.francis@wdc.com>",
        "X-Mailer": "git-send-email 2.52.0",
        "In-Reply-To": "<20260508031710.514574-1-alistair.francis@wdc.com>",
        "References": "<20260508031710.514574-1-alistair.francis@wdc.com>",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-pci@vger.kernel.org",
        "List-Id": "<linux-pci.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-pci+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-pci+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit"
    },
    "content": "From: Alistair Francis <alistair.francis@wdc.com>\n\nImplement From<FromBytesWithNulError> for the Kernel Error type\n\nSigned-off-by: Alistair Francis <alistair.francis@wdc.com>\n---\n rust/kernel/error.rs | 8 ++++++++\n rust/kernel/str.rs   | 7 -------\n 2 files changed, 8 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/rust/kernel/error.rs b/rust/kernel/error.rs\nindex 05cf869ac090..5463addbfd95 100644\n--- a/rust/kernel/error.rs\n+++ b/rust/kernel/error.rs\n@@ -12,6 +12,7 @@\n     str::CStr,\n };\n \n+use core::ffi::FromBytesWithNulError;\n use core::num::NonZeroI32;\n use core::num::TryFromIntError;\n use core::str::Utf8Error;\n@@ -258,6 +259,13 @@ fn from(e: core::convert::Infallible) -> Error {\n     }\n }\n \n+impl From<FromBytesWithNulError> for Error {\n+    #[inline]\n+    fn from(_: FromBytesWithNulError) -> Error {\n+        code::EINVAL\n+    }\n+}\n+\n /// A [`Result`] with an [`Error`] error type.\n ///\n /// To be used as the return type for functions that may fail.\ndiff --git a/rust/kernel/str.rs b/rust/kernel/str.rs\nindex 8311d91549e1..17070dde0e35 100644\n--- a/rust/kernel/str.rs\n+++ b/rust/kernel/str.rs\n@@ -419,13 +419,6 @@ macro_rules! c_str {\n mod tests {\n     use super::*;\n \n-    impl From<core::ffi::FromBytesWithNulError> for Error {\n-        #[inline]\n-        fn from(_: core::ffi::FromBytesWithNulError) -> Error {\n-            EINVAL\n-        }\n-    }\n-\n     macro_rules! format {\n         ($($f:tt)*) => ({\n             CString::try_from_fmt(fmt!($($f)*))?.to_str()?\n",
    "prefixes": [
        "06/18"
    ]
}