get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2220570,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2220570/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/7e618bc382608acc390054786e3119db2856822b.1775569027.git.ritesh.list@gmail.com/",
    "project": {
        "id": 2,
        "url": "http://patchwork.ozlabs.org/api/1.2/projects/2/?format=api",
        "name": "Linux PPC development",
        "link_name": "linuxppc-dev",
        "list_id": "linuxppc-dev.lists.ozlabs.org",
        "list_email": "linuxppc-dev@lists.ozlabs.org",
        "web_url": "https://github.com/linuxppc/wiki/wiki",
        "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git",
        "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/",
        "list_archive_url": "https://lore.kernel.org/linuxppc-dev/",
        "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/",
        "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"
    },
    "msgid": "<7e618bc382608acc390054786e3119db2856822b.1775569027.git.ritesh.list@gmail.com>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/7e618bc382608acc390054786e3119db2856822b.1775569027.git.ritesh.list@gmail.com/",
    "date": "2026-04-07T14:31:36",
    "name": "[RFC,v1,2/6] pseries/papr-hvpipe: Fix the usage of copy_to_user()",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "3d8fd9479278f0b42c0debcc08fbf8ce14d57b5f",
    "submitter": {
        "id": 79126,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/79126/?format=api",
        "name": "Ritesh Harjani (IBM)",
        "email": "ritesh.list@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/7e618bc382608acc390054786e3119db2856822b.1775569027.git.ritesh.list@gmail.com/mbox/",
    "series": [
        {
            "id": 498988,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/498988/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=498988",
            "date": "2026-04-07T14:31:34",
            "name": "pseries/papr-hvpipe: Fix and simplify papr-hvpipe",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/498988/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2220570/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2220570/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linuxppc-dev+bounces-19437-incoming=patchwork.ozlabs.org@lists.ozlabs.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linuxppc-dev@lists.ozlabs.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=D/Ffg2Wf;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org\n (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org;\n envelope-from=linuxppc-dev+bounces-19437-incoming=patchwork.ozlabs.org@lists.ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "lists.ozlabs.org;\n arc=none smtp.remote-ip=\"2607:f8b0:4864:20::633\"",
            "lists.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com",
            "lists.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=D/Ffg2Wf;\n\tdkim-atps=neutral",
            "lists.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com\n (client-ip=2607:f8b0:4864:20::633; helo=mail-pl1-x633.google.com;\n envelope-from=ritesh.list@gmail.com; receiver=lists.ozlabs.org)"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org\n [IPv6:2404:9400:21b9:f100::1])\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 4fqpYs30RVz1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 08 Apr 2026 00:32:17 +1000 (AEST)",
            "from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4fqpYh2f2Pz2ypw;\n\tWed, 08 Apr 2026 00:32:08 +1000 (AEST)",
            "from mail-pl1-x633.google.com (mail-pl1-x633.google.com\n [IPv6:2607:f8b0:4864:20::633])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 4fqpYg4kbqz2ySk\n\tfor <linuxppc-dev@lists.ozlabs.org>; Wed, 08 Apr 2026 00:32:07 +1000 (AEST)",
            "by mail-pl1-x633.google.com with SMTP id\n d9443c01a7336-2aaed195901so22350515ad.0\n        for <linuxppc-dev@lists.ozlabs.org>;\n Tue, 07 Apr 2026 07:32:07 -0700 (PDT)",
            "from Mac.localdomain.com ([49.205.216.49])\n        by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2b2749cbc58sm181201525ad.78.2026.04.07.07.32.01\n        (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n        Tue, 07 Apr 2026 07:32:04 -0700 (PDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1775572328;\n\tcv=none;\n b=B2q4nEZPcNRZWf5STcXdVvMTg44Oik7J8To+iU9wbFn062D1lxbmWJjP65rPOu/87StvPoS1aFC9idttYTpJuRfEIF5zz4vLoK6EzEc/IZlzLKX2Vn9pojA1ugq7lYd//954hC+8FqGfjYOIHg8kIZrofiZpP5jvS5mU+ILuiNEoHKr3ady6t0baTgtz8h7R8s9ztPOP2h3MD5F0wuG8M57gDkCG9XeD24ggPMiChXDLorgFbslZ1UPc6bWsD2Mx7EMyU6dJ9YOV7N4Xq7UrZAMt0X6Ltb91mHjWb9I7wClhE1hgUgEVtw1SU8zr784uSYs4c1IcamYDJIql6wI25A==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1775572328; c=relaxed/relaxed;\n\tbh=qgL4Qq7YZCy8/RvaSgFHNT5E42dfIeMN6C/f1hBgwoQ=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=fWq7E0Nisjoy4N2UyLLIoSOSrVVlEUKZ0fQJ3Udr8aoW986xNQXIfovYve6KSRJhrhmry//lY/fqxlAfaHM/j7lNp4st/8r0KR+QykWynm9LnFnluaKFZfGC3Mh4Pakys9vjoAbBg60ZZVmrpdghPqgfEG7sM5LOQ+DLIR/1aek/F3w6IhZq/rgxG6xNqgVzdsmbwSMeMGaBvQHIbIYBU/lCP/j2bzKlY1snWBrkI7GdhpM7HB7Mc3bt+0xjcwwWNAMBF1NoE7jVgoV9lSMO2uVnJMWD1frjlE0/GTqgjWL+fZkf6kLp0Ef56/7EHNFPqbOhI3/kiQ5XDu5dattpdQ==",
        "ARC-Authentication-Results": "i=1; lists.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com; dkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=D/Ffg2Wf; dkim-atps=neutral;\n spf=pass (client-ip=2607:f8b0:4864:20::633; helo=mail-pl1-x633.google.com;\n envelope-from=ritesh.list@gmail.com;\n receiver=lists.ozlabs.org) smtp.mailfrom=gmail.com",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1775572325; x=1776177125;\n darn=lists.ozlabs.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=qgL4Qq7YZCy8/RvaSgFHNT5E42dfIeMN6C/f1hBgwoQ=;\n        b=D/Ffg2Wf9CKewMjdvJklp1x75MSlPCwT9YjALrQwulkANB63Wl1Blecb+Rl6SJjJiU\n         Y+Yjop2Ofc00J0vbMR/JW0goQ18b4HFfEb1wVHkQAfeW+eQPpxrYa+Jxv3+T1ehG9UVE\n         OZ1qe2FrFucNtb0x831uYhk8nqcGYoG9J+RhgLIoqDQbvrNy5SdOGKKzmyX5ITHWeNvy\n         HCtC/m3c8/arMsS5tDwK6VUymfV/Qym/zPnG2ENSGjF3PuY3ltJCUXAAYhJoKet+vuhc\n         f4qqaBd8tNvxsG0H6K65RwtGUk7IuKhLRM36x5An7Xow11SlDeGqFZXoQi/opFFAGyP2\n         8Nuw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1775572325; x=1776177125;\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=qgL4Qq7YZCy8/RvaSgFHNT5E42dfIeMN6C/f1hBgwoQ=;\n        b=qlRsVsz0v0pOuO9aAKLEwGIZ4orkEz+x9RxXIK+969xy1xIvho/4d8WrfWgcUyxSF9\n         gk2PioY564GBW1ePup7RyeedDwM7/7xeYGubfSfhHncHM3uKdC2fa2Bw9mJx6A4BUw/P\n         V/1RDWS16PxQ0njXTE0grQA8ub3BMYckZpd5yFuF4EUBmLtLkQIAQclNeNobRLDKzyhr\n         UGnhl3gncN0Wtri5srQOJm9YxzlKctCfUXb9Xt7vKYwLCveY+zDOTCGWW0EIOudzIzk6\n         tBB+DHqWm7ntgwP4K69a+M+rU70O/7Q23KuHDaRkQwBFw/LG3nmoqptTKYk2K/6gpsSn\n         KT7Q==",
        "X-Gm-Message-State": "AOJu0Yyj5msFnDTR8bZoX24f/Ep8xEIf0tqHPQXk4Co7jHZP34abh8xl\n\tp/z6FsbpjP7ytTz2u7Bj/y8I1qh1+32q4rcTemS1Av4LrsXtBjryQ4nshyZjgw==",
        "X-Gm-Gg": "AeBDietqrUYsnvteOBPfDsPMJQIMRKo2etGo7Ww4HGHMwwlg7//ysgT6Iqnn7BrXdGz\n\ta4tgH6nZUNB0hznCeUTzkqzxgGYcB5dkd43DV195owcaxHFGlwBF23nqQAV+sm+QH1NlkB2UoZ4\n\tk3SPqZ9ESpLa3HLUGx0iIrY56GeVQ7a3KRW4YnAXyu6Ta1AUee5R/hCtpceqnnl/J7QRmwd9eTJ\n\tXVJBo1JCO1MNCLAXDMnwD3CTvcE5CjrEAtOV2leEsUFraU7kO1LWkWWlyYhOXNUREaGFBMMMbak\n\tiXTR4o+WDt9fdiDVKOwAXVu+R7D4b3J2z7ebDjhhP8jC4YmGQG3+cKEcf0BicIgyX/8vomL7D9r\n\txQA1vD98EiB/OUQjaGPfxoCwa7wk6zZKat0P4JCAa5FdKsMPMsnhApl3q5a0cXEI2kuTrtA7mHv\n\tlNhJCCF0AcqL9AiKIzOGvrj3PBHXZGJ+ZFPoNko6cXuUVTc+ju3A==",
        "X-Received": "by 2002:a17:903:2f08:b0:2b0:afb4:7d41 with SMTP id\n d9443c01a7336-2b2817159bdmr182384625ad.10.1775572325101;\n        Tue, 07 Apr 2026 07:32:05 -0700 (PDT)",
        "From": "\"Ritesh Harjani (IBM)\" <ritesh.list@gmail.com>",
        "To": "linuxppc-dev@lists.ozlabs.org,\n\tHaren Myneni <haren@linux.ibm.com>",
        "Cc": "Madhavan Srinivasan <maddy@linux.ibm.com>,\n\tChristophe Leroy <chleroy@kernel.org>,\n\tVenkat Rao Bagalkote <venkat88@linux.ibm.com>,\n\tNicholas Piggin <npiggin@gmail.com>,\n\tlinux-kernel@vger.kernel.org,\n\t\"Ritesh Harjani (IBM)\" <ritesh.list@gmail.com>",
        "Subject": "[RFC v1 2/6] pseries/papr-hvpipe: Fix the usage of copy_to_user()",
        "Date": "Tue,  7 Apr 2026 20:01:36 +0530",
        "Message-ID": "\n <7e618bc382608acc390054786e3119db2856822b.1775569027.git.ritesh.list@gmail.com>",
        "X-Mailer": "git-send-email 2.50.1",
        "In-Reply-To": "<cover.1775569027.git.ritesh.list@gmail.com>",
        "References": "<cover.1775569027.git.ritesh.list@gmail.com>",
        "X-Mailing-List": "linuxppc-dev@lists.ozlabs.org",
        "List-Id": "<linuxppc-dev.lists.ozlabs.org>",
        "List-Help": "<mailto:linuxppc-dev+help@lists.ozlabs.org>",
        "List-Owner": "<mailto:linuxppc-dev+owner@lists.ozlabs.org>",
        "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>",
        "List-Archive": "<https://lore.kernel.org/linuxppc-dev/>,\n  <https://lists.ozlabs.org/pipermail/linuxppc-dev/>",
        "List-Subscribe": "<mailto:linuxppc-dev+subscribe@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-digest@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-nomail@lists.ozlabs.org>",
        "List-Unsubscribe": "<mailto:linuxppc-dev+unsubscribe@lists.ozlabs.org>",
        "Precedence": "list",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Spam-Status": "No, score=-0.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID,\n\tDKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,\n\tSPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 OzLabs 8",
        "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org"
    },
    "content": "copy_to_user() return bytes_not_copied to the user buffer. If there was\nan error writing bytes into the user buffer, i.e. if copy_to_user\nreturns a non-zero value, then we simply return -EFAULT from the\n->read() call.\n\nSigned-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>\n---\n arch/powerpc/platforms/pseries/papr-hvpipe.c | 9 +++++----\n 1 file changed, 5 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/arch/powerpc/platforms/pseries/papr-hvpipe.c b/arch/powerpc/platforms/pseries/papr-hvpipe.c\nindex ef10f5a5a4fa..fffebbae113c 100644\n--- a/arch/powerpc/platforms/pseries/papr-hvpipe.c\n+++ b/arch/powerpc/platforms/pseries/papr-hvpipe.c\n@@ -206,10 +206,11 @@ static int hvpipe_rtas_recv_msg(char __user *buf, int size)\n \t\t\t\t\tbytes_written, size);\n \t\t\t\tbytes_written = size;\n \t\t\t}\n-\t\t\tret = copy_to_user(buf,\n+\t\t\tif (copy_to_user(buf,\n \t\t\t\t\trtas_work_area_raw_buf(work_area),\n-\t\t\t\t\tbytes_written);\n-\t\t\tif (!ret)\n+\t\t\t\t\tbytes_written))\n+\t\t\t\tret = -EFAULT;\n+\t\t\telse\n \t\t\t\tret = bytes_written;\n \t\t}\n \t} else {\n@@ -376,7 +377,7 @@ static ssize_t papr_hvpipe_handle_read(struct file *file,\n \n \tret = copy_to_user(buf, &hdr, HVPIPE_HDR_LEN);\n \tif (ret)\n-\t\treturn ret;\n+\t\treturn -EFAULT;\n \n \t/*\n \t * Message event has payload, so get the payload with\n",
    "prefixes": [
        "RFC",
        "v1",
        "2/6"
    ]
}