get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1558724,
    "url": "http://patchwork.ozlabs.org/api/patches/1558724/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20211123180354.615946-17-sjg@chromium.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": "<20211123180354.615946-17-sjg@chromium.org>",
    "list_archive_url": null,
    "date": "2021-11-23T18:03:53",
    "name": "[16/17] binman: cfbs: Refactor ObtainContents() for consistency",
    "commit_ref": "7413321a47483f1be94dad2e8e3e20c7230ad6e2",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "c726f21a5c77e39af4551d91b7912a28364d2e46",
    "submitter": {
        "id": 6170,
        "url": "http://patchwork.ozlabs.org/api/people/6170/?format=api",
        "name": "Simon Glass",
        "email": "sjg@chromium.org"
    },
    "delegate": {
        "id": 3184,
        "url": "http://patchwork.ozlabs.org/api/users/3184/?format=api",
        "username": "sjg",
        "first_name": "Simon",
        "last_name": "Glass",
        "email": "sjg@chromium.org"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20211123180354.615946-17-sjg@chromium.org/mbox/",
    "series": [
        {
            "id": 273476,
            "url": "http://patchwork.ozlabs.org/api/series/273476/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=273476",
            "date": "2021-11-23T18:03:37",
            "name": "binman: Various tidy-ups and refactors",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/273476/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1558724/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1558724/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<u-boot-bounces@lists.denx.de>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": [
            "bilbo.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256\n header.s=google header.b=GKUhcdn4;\n\tdkim-atps=neutral",
            "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>)",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=chromium.org",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=chromium.org header.i=@chromium.org\n header.b=\"GKUhcdn4\";\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=chromium.org",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=sjg@chromium.org"
        ],
        "Received": [
            "from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (4096 bits))\n\t(No client certificate requested)\n\tby bilbo.ozlabs.org (Postfix) with ESMTPS id 4HzBsz46R0z9ssD\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 24 Nov 2021 05:06:47 +1100 (AEDT)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 9876382F73;\n\tTue, 23 Nov 2021 19:05:58 +0100 (CET)",
            "by phobos.denx.de (Postfix, from userid 109)\n id E7231836C5; Tue, 23 Nov 2021 19:04:48 +0100 (CET)",
            "from mail-ot1-x334.google.com (mail-ot1-x334.google.com\n [IPv6:2607:f8b0:4864:20::334])\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 A475883751\n for <u-boot@lists.denx.de>; Tue, 23 Nov 2021 19:04:32 +0100 (CET)",
            "by mail-ot1-x334.google.com with SMTP id\n n104-20020a9d2071000000b005799790cf0bso128417ota.5\n for <u-boot@lists.denx.de>; Tue, 23 Nov 2021 10:04:32 -0800 (PST)",
            "from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net.\n [67.190.101.114])\n by smtp.gmail.com with ESMTPSA id c8sm2357514otk.40.2021.11.23.10.04.30\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 23 Nov 2021 10:04:30 -0800 (PST)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,\n DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,\n SPF_PASS autolearn=ham autolearn_force=no version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n s=google;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=bL1pf4WQT7FQBJdSr3wrEIBGWPWSl/wKHbG+hu0UZuE=;\n b=GKUhcdn4eoB720JTyUTwjmcEj1Ng0U0NYt/nCD8tfA+Cp6dQoPKjVL82H1fj/s6wKq\n uQdhE0LoHbTPj1aq0Z3XaSGso68bf6hgBMlDJusF+BSdBnV4AVXrbV04d8YhO/W0hTrJ\n KEAt8JQSZi/TuJV81Fmd6VvsW7b35zvARB/Kk=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20210112;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=bL1pf4WQT7FQBJdSr3wrEIBGWPWSl/wKHbG+hu0UZuE=;\n b=wr1BVGB3L5qwVTycKKTl9Rmn2m/7xsAb5RBJr3AbUhPBP+54J8xIac0bhyBxYuK5me\n 9+u8mBg+HYffcpkM7Q62tu2PYDRGnqoBoJHzA/4TG3N7/XDGMsZ9WuqKmqPTLS4J9qJR\n Wg5Q9W9sretesvRd7jokF9knZ6U5UKgq7lvoslwyDWVoCZcc8sUb1EJ0dSx4kk/2bWHQ\n Jma9sIeG51F28caJ0blfPN3F+BfTustLhUqCPAiqXMV/9VDUK/yWOnkT2bpoi0076gf0\n NIwTTfgUhBGgzNnbY/NiDCnwF79Yex3GzjRLiMHol373uSaaw9P50cxYXJfH9WNvi2sX\n AjMA==",
        "X-Gm-Message-State": "AOAM531CvEkk2tro/TriVfPsDA4g3kCCf1VXp3D70Wy1wYf6heGC5GqI\n njb990nYxzlq/2ECtlRCbpc1/f6/w2Uocg==",
        "X-Google-Smtp-Source": "\n ABdhPJwVfnlSlMUEIbybhc1raVUKwtdMEM1wX/G7FOdx1pTxUozrjE4irLlTesAfiRJvWqT435j5mA==",
        "X-Received": "by 2002:a05:6830:3113:: with SMTP id\n b19mr6390635ots.9.1637690671004;\n Tue, 23 Nov 2021 10:04:31 -0800 (PST)",
        "From": "Simon Glass <sjg@chromium.org>",
        "To": "U-Boot Mailing List <u-boot@lists.denx.de>",
        "Cc": "Tom Rini <trini@konsulko.com>,\n\tSimon Glass <sjg@chromium.org>",
        "Subject": "[PATCH 16/17] binman: cfbs: Refactor ObtainContents() for consistency",
        "Date": "Tue, 23 Nov 2021 11:03:53 -0700",
        "Message-Id": "<20211123180354.615946-17-sjg@chromium.org>",
        "X-Mailer": "git-send-email 2.34.0.rc2.393.gf8c9666880-goog",
        "In-Reply-To": "<20211123180354.615946-1-sjg@chromium.org>",
        "References": "<20211123180354.615946-1-sjg@chromium.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.37",
        "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.2 at phobos.denx.de",
        "X-Virus-Status": "Clean"
    },
    "content": "Update this to use the same arguments as entry_Section uses.\n\nSigned-off-by: Simon Glass <sjg@chromium.org>\n---\n\n tools/binman/etype/cbfs.py | 40 ++++++++++++++++++++++----------------\n 1 file changed, 23 insertions(+), 17 deletions(-)",
    "diff": "diff --git a/tools/binman/etype/cbfs.py b/tools/binman/etype/cbfs.py\nindex a5120127059..2459388f842 100644\n--- a/tools/binman/etype/cbfs.py\n+++ b/tools/binman/etype/cbfs.py\n@@ -193,7 +193,24 @@ class Entry_cbfs(Entry):\n                            (node.name, compress))\n             self._entries[entry._cbfs_name] = entry\n \n-    def ObtainContents(self, skip=None):\n+    def ObtainCfile(self, cbfs, entry):\n+        # First get the input data and put it in a file. If not available,\n+        # try later.\n+        data = entry.GetData()\n+        cfile = None\n+        if entry._type == 'raw':\n+            cfile = cbfs.add_file_raw(entry._cbfs_name, data,\n+                                      entry._cbfs_offset,\n+                                      entry._cbfs_compress)\n+        elif entry._type == 'stage':\n+            cfile = cbfs.add_file_stage(entry._cbfs_name, data,\n+                                        entry._cbfs_offset)\n+        else:\n+            entry.Raise(\"Unknown cbfs-type '%s' (use 'raw', 'stage')\" %\n+                        entry._type)\n+        return cfile\n+\n+    def ObtainContents(self, skip_entry=None):\n         arch = cbfs_util.find_arch(self._cbfs_arg)\n         if arch is None:\n             self.Raise(\"Invalid architecture '%s'\" % self._cbfs_arg)\n@@ -201,22 +218,9 @@ class Entry_cbfs(Entry):\n             self.Raise(\"'cbfs' entry must have a size property\")\n         cbfs = CbfsWriter(self.size, arch)\n         for entry in self._entries.values():\n-            # First get the input data and put it in a file. If not available,\n-            # try later.\n-            if entry != skip and not entry.ObtainContents():\n+            if entry != skip_entry and not entry.ObtainContents():\n                 return False\n-            data = entry.GetData()\n-            cfile = None\n-            if entry._type == 'raw':\n-                cfile = cbfs.add_file_raw(entry._cbfs_name, data,\n-                                          entry._cbfs_offset,\n-                                          entry._cbfs_compress)\n-            elif entry._type == 'stage':\n-                cfile = cbfs.add_file_stage(entry._cbfs_name, data,\n-                                            entry._cbfs_offset)\n-            else:\n-                entry.Raise(\"Unknown cbfs-type '%s' (use 'raw', 'stage')\" %\n-                            entry._type)\n+            cfile = self.ObtainCfile(cbfs, entry)\n             if cfile:\n                 entry._cbfs_file = cfile\n         data = cbfs.get_data()\n@@ -285,5 +289,7 @@ class Entry_cbfs(Entry):\n         return cfile.data if decomp else cfile.orig_data\n \n     def WriteChildData(self, child):\n-        self.ObtainContents(skip=child)\n+        # Recreate the data structure, leaving the data for this child alone,\n+        # so that child.data is used to pack into the FIP.\n+        self.ObtainContents(skip_entry=child)\n         return True\n",
    "prefixes": [
        "16/17"
    ]
}