get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 810159,
    "url": "http://patchwork.ozlabs.org/api/patches/810159/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/fwts/patch/1504616988-29018-1-git-send-email-Sakar.Arora@arm.com/",
    "project": {
        "id": 24,
        "url": "http://patchwork.ozlabs.org/api/projects/24/?format=api",
        "name": "Firmware Test Suite development",
        "link_name": "fwts",
        "list_id": "fwts-devel.lists.ubuntu.com",
        "list_email": "fwts-devel@lists.ubuntu.com",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1504616988-29018-1-git-send-email-Sakar.Arora@arm.com>",
    "list_archive_url": null,
    "date": "2017-09-05T13:09:48",
    "name": "[v2] acpi: method: sbbr: set some methods as optional",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "c3bc4f5a1c3676bb5bc2e7b905d5544f3405e50a",
    "submitter": {
        "id": 72038,
        "url": "http://patchwork.ozlabs.org/api/people/72038/?format=api",
        "name": "Sakar Arora",
        "email": "Sakar.Arora@arm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/fwts/patch/1504616988-29018-1-git-send-email-Sakar.Arora@arm.com/mbox/",
    "series": [
        {
            "id": 1579,
            "url": "http://patchwork.ozlabs.org/api/series/1579/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/fwts/list/?series=1579",
            "date": "2017-09-05T13:09:48",
            "name": "[v2] acpi: method: sbbr: set some methods as optional",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/1579/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/810159/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/810159/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<fwts-devel-bounces@lists.ubuntu.com>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com\n\t(client-ip=91.189.94.19; helo=huckleberry.canonical.com;\n\tenvelope-from=fwts-devel-bounces@lists.ubuntu.com;\n\treceiver=<UNKNOWN>)",
        "Received": [
            "from huckleberry.canonical.com (huckleberry.canonical.com\n\t[91.189.94.19])\n\tby ozlabs.org (Postfix) with ESMTP id 3xmnBH4w7lz9t24;\n\tTue,  5 Sep 2017 23:09:59 +1000 (AEST)",
            "from localhost ([127.0.0.1] helo=huckleberry.canonical.com)\n\tby huckleberry.canonical.com with esmtp (Exim 4.86_2)\n\t(envelope-from <fwts-devel-bounces@lists.ubuntu.com>)\n\tid 1dpDc6-0000f8-CM; Tue, 05 Sep 2017 13:09:58 +0000",
            "from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]\n\thelo=foss.arm.com)\n\tby huckleberry.canonical.com with esmtp (Exim 4.86_2)\n\t(envelope-from <Sakar.Arora@arm.com>) id 1dpDc5-0000eu-8B\n\tfor fwts-devel@lists.ubuntu.com; Tue, 05 Sep 2017 13:09:57 +0000",
            "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249])\n\tby usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 95CFA2B;\n\tTue,  5 Sep 2017 06:09:56 -0700 (PDT)",
            "from u201365.usa.Arm.com (a75592.asiapac.arm.com [10.162.2.158])\n\tby usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id\n\tE751D3F578; Tue,  5 Sep 2017 06:09:54 -0700 (PDT)"
        ],
        "From": "Sakar Arora <Sakar.Arora@arm.com>",
        "To": "fwts-devel@lists.ubuntu.com,\n\tcolin.king@canonical.com",
        "Subject": "[PATCH v2] acpi: method: sbbr: set some methods as optional",
        "Date": "Tue,  5 Sep 2017 18:39:48 +0530",
        "Message-Id": "<1504616988-29018-1-git-send-email-Sakar.Arora@arm.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<4a89dc35-bb1d-8908-3bc8-6de746101aa7@canonical.com>",
        "References": "<4a89dc35-bb1d-8908-3bc8-6de746101aa7@canonical.com>",
        "X-BeenThere": "fwts-devel@lists.ubuntu.com",
        "X-Mailman-Version": "2.1.20",
        "Precedence": "list",
        "List-Id": "Firmware Test Suite Development <fwts-devel.lists.ubuntu.com>",
        "List-Unsubscribe": "<https://lists.ubuntu.com/mailman/options/fwts-devel>,\n\t<mailto:fwts-devel-request@lists.ubuntu.com?subject=unsubscribe>",
        "List-Archive": "<https://lists.ubuntu.com/archives/fwts-devel>",
        "List-Post": "<mailto:fwts-devel@lists.ubuntu.com>",
        "List-Help": "<mailto:fwts-devel-request@lists.ubuntu.com?subject=help>",
        "List-Subscribe": "<https://lists.ubuntu.com/mailman/listinfo/fwts-devel>,\n\t<mailto:fwts-devel-request@lists.ubuntu.com?subject=subscribe>",
        "Cc": "Prasanth.Pulla@arm.com, Charles.Garcia-Tobin@arm.com",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Errors-To": "fwts-devel-bounces@lists.ubuntu.com",
        "Sender": "\"fwts-devel\" <fwts-devel-bounces@lists.ubuntu.com>"
    },
    "content": "As per SBBR spec, methods _WAK and _PTS are made optional.\n\nMethod _SST is mandatory. But its absence is now reported\nas warning. Systems that do not support user visible\nstatus such as LED (e.g. ARM FVP), can treat this as just\nwarning. Others must treat _SST method's absence as failure.\n\nSigned-off-by: Sakar Arora <Sakar.Arora@arm.com>\n---\n src/acpi/method/method.c | 48 +++++++++---------------------------------------\n 1 file changed, 9 insertions(+), 39 deletions(-)",
    "diff": "diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c\nindex d082fc1..d1e5e87 100644\n--- a/src/acpi/method/method.c\n+++ b/src/acpi/method/method.c\n@@ -4449,12 +4449,13 @@ static int method_test_SST(fwts_framework *fw)\n \targ[0].Type = ACPI_TYPE_INTEGER;\n \tfor (i = 0; i <= 4; i++) {\n \t\targ[0].Integer.Value = i;\n-\t\tif (fw->flags & FWTS_FLAG_TEST_SBBR)\n-\t\t\tret = method_evaluate_method(fw, METHOD_MANDATORY,\n-\t\t\t\t\"_SST\", arg, 1, method_test_NULL_return, NULL);\n-\t\telse\n-\t\t\tret = method_evaluate_method(fw, METHOD_OPTIONAL,\n-\t\t\t\t\"_SST\", arg, 1, method_test_NULL_return, NULL);\n+\t\tret = method_evaluate_method(fw, METHOD_OPTIONAL,\n+\t\t\t\"_SST\", arg, 1, method_test_NULL_return, NULL);\n+\n+\t\tif (ret == FWTS_NOT_EXIST && (fw->flags & FWTS_FLAG_TEST_SBBR)) {\n+\t\t\tfwts_warning(fw, \"_SST method not found. This should be treated as error \"\n+\t\t\t\t\t\"if the platform provides user visible status such as LED.\");\n+\t\t}\n \n \t\tif (ret != FWTS_OK)\n \t\t\tbreak;\n@@ -6483,23 +6484,7 @@ static int method_test_PTS(fwts_framework *fw)\n \t\targ[0].Integer.Value = i;\n \n \t\tfwts_log_info(fw, \"Test _PTS(%d).\", i);\n-\t\tif (!(fw->flags & FWTS_FLAG_TEST_SBBR))\n-\t\t\tmethod_evaluate_method(fw, METHOD_OPTIONAL, \"_PTS\", arg, 1, method_test_NULL_return, NULL);\n-\t\telse\n-\t\t\tif (method_evaluate_method(fw, METHOD_MANDATORY, \"_PTS\", arg, 1,\n-\t\t\t\tmethod_test_NULL_return, NULL) == FWTS_NOT_EXIST) {\n-\t\t\t\tfwts_advice(fw,\n-\t\t\t\t\t\"Could not find _PTS. This method provides a \"\n-\t\t\t\t\t\"mechanism to do housekeeping functions, such \"\n-\t\t\t\t\t\"as write sleep state to the embedded \"\n-\t\t\t\t\t\"controller before entering a sleep state. If \"\n-\t\t\t\t\t\"the machine cannot suspend (S3), \"\n-\t\t\t\t\t\"hibernate (S4) or shutdown (S5) then it \"\n-\t\t\t\t\t\"could be because _PTS is missing.  Note that \"\n-\t\t\t\t\t\"ACPI 1.0 wants _PTS to be executed before \"\n-\t\t\t\t\t\"suspending devices.\");\n-\t\t\t\tbreak;\n-\t\t\t}\n+\t\tmethod_evaluate_method(fw, METHOD_OPTIONAL, \"_PTS\", arg, 1, method_test_NULL_return, NULL);\n \t\tfwts_log_nl(fw);\n \t}\n \treturn FWTS_OK;\n@@ -6577,22 +6562,7 @@ static int method_test_WAK(fwts_framework *fw)\n \t\targ[0].Type = ACPI_TYPE_INTEGER;\n \t\targ[0].Integer.Value = i;\n \t\tfwts_log_info(fw, \"Test _WAK(%d) System Wake, State S%d.\", i, i);\n-\t\tif (!(fw->flags & FWTS_FLAG_TEST_SBBR))\n-\t\t\tmethod_evaluate_method(fw, METHOD_OPTIONAL, \"_WAK\", arg, 1, method_test_WAK_return, &i);\n-\t\telse\n-\t\t\tif (method_evaluate_method(fw, METHOD_MANDATORY, \"_WAK\", arg, 1,\n-\t\t\t\tmethod_test_WAK_return, &i) == FWTS_NOT_EXIST) {\n-\t\t\t\tfwts_advice(fw,\n-\t\t\t\t\t\"Section 7.3.7 states that a system that wakes \"\n-\t\t\t\t\t\"from a sleeping state will invoke the _WAK \"\n-\t\t\t\t\t\"control to issue device, thermal and other \"\n-\t\t\t\t\t\"notifications to ensure that the operating system \"\n-\t\t\t\t\t\"checks the states of various devices, thermal \"\n-\t\t\t\t\t\"zones, etc.  The Linux kernel will report an \"\n-\t\t\t\t\t\"ACPI exception if _WAK is does not exist when \"\n-\t\t\t\t\t\"it returns from a sleep state.\");\n-\t\t\t\tbreak;\n-\t\t\t}\n+\t\tmethod_evaluate_method(fw, METHOD_OPTIONAL, \"_WAK\", arg, 1, method_test_WAK_return, &i);\n \t\tfwts_log_nl(fw);\n \t}\n \treturn FWTS_OK;\n",
    "prefixes": [
        "v2"
    ]
}