get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2220573,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2220573/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/51b10f1e82e5c9965902b34b082a4d2aa981ff8f.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": "<51b10f1e82e5c9965902b34b082a4d2aa981ff8f.1775569027.git.ritesh.list@gmail.com>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/51b10f1e82e5c9965902b34b082a4d2aa981ff8f.1775569027.git.ritesh.list@gmail.com/",
    "date": "2026-04-07T14:31:39",
    "name": "[RFC,v1,5/6] pseries/papr-hvpipe: Refactor and simplify hvpipe_rtas_recv_msg()",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "b558382dcda014c8ebb63052165ea9d310a3e2e8",
    "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/51b10f1e82e5c9965902b34b082a4d2aa981ff8f.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/2220573/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2220573/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linuxppc-dev+bounces-19440-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=R92qxu6R;\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-19440-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::62c\"",
            "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=R92qxu6R;\n\tdkim-atps=neutral",
            "lists.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com\n (client-ip=2607:f8b0:4864:20::62c; helo=mail-pl1-x62c.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 4fqpZG0LcKz1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 08 Apr 2026 00:32:38 +1000 (AEST)",
            "from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4fqpYw5Cmyz2yv3;\n\tWed, 08 Apr 2026 00:32:20 +1000 (AEST)",
            "from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com\n [IPv6:2607:f8b0:4864:20::62c])\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 4fqpYv6V4Wz2ySk\n\tfor <linuxppc-dev@lists.ozlabs.org>; Wed, 08 Apr 2026 00:32:19 +1000 (AEST)",
            "by mail-pl1-x62c.google.com with SMTP id\n d9443c01a7336-2b0ba3bfe16so48296255ad.1\n        for <linuxppc-dev@lists.ozlabs.org>;\n Tue, 07 Apr 2026 07:32:19 -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.13\n        (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n        Tue, 07 Apr 2026 07:32:16 -0700 (PDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1775572340;\n\tcv=none;\n b=RNK90YFgwSJXUWeydk1eljAJmKdEkHPCeIH5ZQKXwag58i5wTYPdolWD44X3I4A8CxsqBxYiihosYdKd2ELOPFWtxRO5uoGQzpGJcqK78c6oCOw52n+o/lwMD7tnSsEJECLLX9Y3/6UyIZGRS67ujG6wGW9dbCTAK9LAcN2qlq4HRVCy55WbJtEtVaZcxsEtslrNWskgsuSn+foDzDJ7CZfLwmLiMiv7XbRJvk9wPob8MKer7vpaQ3JlZ6gDb20o69eKs02nwKJozUOhuKeXHZ/pjqzQnYlw7nIq1MqAnm3H/Wk2pAw6T2kxCLnygbLQ4id2R4F4kjwkIKUVI4pJDQ==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1775572340; c=relaxed/relaxed;\n\tbh=WCaF3kLdCiAgYQ5/bk3SyXEWPD5dHMX+3j2VLCRYM2s=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=TZY8xxrduA5gy0eKG4O9vtCbf+y9wsAYMWKaiia5YxDsOIEsADfT8rI5oPoNJm5mRmE7A9Xp5EpfLnqvS608k35moWeaHtiZOOlZef5wO8FHy7DcoZX5V7ANeLvh+FzGiWALuiJvMMzzjPH+SQVX7kRptIAwhp9ClVyBu7HqWU4mS5dvtH5/ujQybcx9l2GeBmeZjcLFz2n3UWV8xkALzuUTau1+/6FB4wofGw7hUk5NFXwHA9Tk40XDFaOnGleM2kk+zlg+CmeHpD9yEUQ6FZecIu+YFo5PXsEe+rFyS93NSCd+9yQPp6VdNQOjhY+vMdo+GRou6xjRgAU9N5dSIA==",
        "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=R92qxu6R; dkim-atps=neutral;\n spf=pass (client-ip=2607:f8b0:4864:20::62c; helo=mail-pl1-x62c.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=1775572337; x=1776177137;\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=WCaF3kLdCiAgYQ5/bk3SyXEWPD5dHMX+3j2VLCRYM2s=;\n        b=R92qxu6RNzFHXbH1PDziDl810F3RHSLQrPx7MbtOE450cc0Pnt2hYhw8zFG6NYPuRB\n         rNSUc4CIr2o/33UEavO19szxPYHA8BE4DDX+qxgf8SyXS4IN+eHPkYG1gV/Me3im0tSa\n         v+8YRJr5o7L5rGsIT9ImzwSEkY87urGY7IiqJJXwx7X2seraKuCnojlyUeSBHe9JfIfF\n         5YLkdx6dczxXZ1hYxhyUP5EsIO2Wxr9wi0f3MMdwAaUkNylTIM7vbp9LSmZ3S6ZTqSca\n         CvHxBl9TTEgBFZkDgRUQyYjmWShY/KiwGdFTkyoJcr0gN/qMMYvHgAQcz/LAWVgA+7vm\n         kJ3Q==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1775572337; x=1776177137;\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=WCaF3kLdCiAgYQ5/bk3SyXEWPD5dHMX+3j2VLCRYM2s=;\n        b=gcjoaG9nkvfmWNgtW8Iwd1k/YTSO9w7ZiWej6sBwEgXNfrpLzq8DL1HlLUQLfXC1+X\n         SrM38gjctx/zZLQ807MNatZ74qLB1/R4KuztuEXXB7KtB4OsOE+Zg8Yp3HAEcWTdtYm2\n         6kr+m+gQrRxyanDGXbxWIGE8BdILrlae3BABwR2boa+vlbtFh+Hk/it4iatVof3xRGMo\n         9EG1egaRhN5a9PsinAqdXgTuCaASf8THpY9H5WSTs2sR9yVy3997BhPaw/YAqN8j31md\n         ONtWzyGo58pyTJS4o7/Iob1AdwkzUyofUYRj5Xtm1/kyMfPjhSTs4uHhZtaT7cLei65L\n         enEA==",
        "X-Gm-Message-State": "AOJu0YwOc0XI8+8aOYduqqHE0KK6ZJNXTzWMepy65CA9HJHxNSJMSE1X\n\t+bvGpXPjJ7Q2YLlI+PlikNS4QMtrrZE8iAJ1zQjhnenpLRv7HMYW3Ltj+YjwCA==",
        "X-Gm-Gg": "AeBDievTiKpiVIxyiBqssZP/V549q6cXJ0oHr+v2Qx2RDqB8zHvE6cbgOvIFT4bFk1b\n\tef1EhRAH/vhpNE9SnrRCuqMvH4Dq8PDMPssBRNFXeiO8plNlfihgAyJCDYHtTBU7mjcOGyP0BpT\n\tYZgxu1c9d6QfZC8w5PbYgGeCzPelqFggjC2XxDMOMh3TidJ29lo4QmB7DSw+OMg2MakSe9538/9\n\tlu2fv2KX72KSoTNIs6UxEIU4qawYtsdPpYWdk8aInMGEp92MJUiMKdAhTuOBO50rTA8onF62N9j\n\tVXsGNWvknUGJWBXtopluJDyn/mFIwNsa219h3Uu8W2+hg3WmSh+GQKkPSrsfg92DYmJCvYGY5Sj\n\tNp9F+9POcY5IbgbkwwA4vAzELQP1jZstH931Wi1MUcwsZA4ECZFysrCmzUiJB8e3tK2yNujCm22\n\tmKR2AoARx/bk2/+HJhLuo2q2z4NXB4Emn4az9xyAT3d5MMH3mkNu0WipMYatpd",
        "X-Received": "by 2002:a17:903:1b0c:b0:2b0:6068:4c5f with SMTP id\n d9443c01a7336-2b277d966bdmr184775385ad.8.1775572337304;\n        Tue, 07 Apr 2026 07:32:17 -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 5/6] pseries/papr-hvpipe: Refactor and simplify\n hvpipe_rtas_recv_msg()",
        "Date": "Tue,  7 Apr 2026 20:01:39 +0530",
        "Message-ID": "\n <51b10f1e82e5c9965902b34b082a4d2aa981ff8f.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": "Simplify hvpipe_rtas_recv_msg() by removing three levels of nesting...\nif (!ret)\n    if (buf)\n\tif (size < bytes_written)\n... this refactoring of the funcion ensures bail out routines are\nhandled early, to simplify the function logic.\n\nSigned-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>\n---\n arch/powerpc/platforms/pseries/papr-hvpipe.c | 52 ++++++++++----------\n 1 file changed, 26 insertions(+), 26 deletions(-)",
    "diff": "diff --git a/arch/powerpc/platforms/pseries/papr-hvpipe.c b/arch/powerpc/platforms/pseries/papr-hvpipe.c\nindex 7242a14eb5ec..f41f5c0a8418 100644\n--- a/arch/powerpc/platforms/pseries/papr-hvpipe.c\n+++ b/arch/powerpc/platforms/pseries/papr-hvpipe.c\n@@ -190,34 +190,34 @@ static int hvpipe_rtas_recv_msg(char __user *buf, int size)\n \t\treturn -ENOMEM;\n \t}\n \n-\tret = rtas_ibm_receive_hvpipe_msg(work_area, &srcID,\n-\t\t\t\t\t&bytes_written);\n-\tif (!ret) {\n-\t\t/*\n-\t\t * Recv HVPIPE RTAS is successful.\n-\t\t * When releasing FD or no one is waiting on the\n-\t\t * specific source, issue recv HVPIPE RTAS call\n-\t\t * so that pipe is not blocked - this func is called\n-\t\t * with NULL buf.\n-\t\t */\n-\t\tif (buf) {\n-\t\t\tif (size < bytes_written) {\n-\t\t\t\tpr_err(\"Received the payload size = %d, but the buffer size = %d\\n\",\n-\t\t\t\t\tbytes_written, size);\n-\t\t\t\tbytes_written = size;\n-\t\t\t}\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\t\tret = -EFAULT;\n-\t\t\telse\n-\t\t\t\tret = bytes_written;\n-\t\t}\n-\t} else {\n-\t\tpr_err(\"ibm,receive-hvpipe-msg failed with %d\\n\",\n-\t\t\t\tret);\n+\t/*\n+\t * Recv HVPIPE RTAS is successful.\n+\t * When releasing FD or no one is waiting on the\n+\t * specific source, issue recv HVPIPE RTAS call\n+\t * so that pipe is not blocked - this func is called\n+\t * with NULL buf.\n+\t */\n+\tret = rtas_ibm_receive_hvpipe_msg(work_area, &srcID, &bytes_written);\n+\tif (ret) {\n+\t\tpr_err(\"ibm,receive-hvpipe-msg failed with %d\\n\", ret);\n+\t\tgoto out;\n \t}\n \n+\tif (!buf)\n+\t\tgoto out;\n+\n+\tif (size < bytes_written) {\n+\t\tpr_err(\"Received the payload size = %d, but the buffer size = %d\\n\",\n+\t\t\t\tbytes_written, size);\n+\t\tbytes_written = size;\n+\t}\n+\n+\tif (copy_to_user(buf, rtas_work_area_raw_buf(work_area), bytes_written))\n+\t\tret = -EFAULT;\n+\telse\n+\t\tret = bytes_written;\n+\n+out:\n \trtas_work_area_free(work_area);\n \treturn ret;\n }\n",
    "prefixes": [
        "RFC",
        "v1",
        "5/6"
    ]
}