get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 810685,
    "url": "http://patchwork.ozlabs.org/api/patches/810685/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20170906154756.2133726-1-arnd@arndb.de/",
    "project": {
        "id": 42,
        "url": "http://patchwork.ozlabs.org/api/projects/42/?format=api",
        "name": "Linux GPIO development",
        "link_name": "linux-gpio",
        "list_id": "linux-gpio.vger.kernel.org",
        "list_email": "linux-gpio@vger.kernel.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170906154756.2133726-1-arnd@arndb.de>",
    "list_archive_url": null,
    "date": "2017-09-06T15:47:45",
    "name": "gpio: acpi: work around false-positive -Wstring-overflow warning",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "b654fe1d12262ceba3b34f80a8285b601b5c3ef1",
    "submitter": {
        "id": 30,
        "url": "http://patchwork.ozlabs.org/api/people/30/?format=api",
        "name": "Arnd Bergmann",
        "email": "arnd@arndb.de"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20170906154756.2133726-1-arnd@arndb.de/mbox/",
    "series": [
        {
            "id": 1843,
            "url": "http://patchwork.ozlabs.org/api/series/1843/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/list/?series=1843",
            "date": "2017-09-06T15:47:45",
            "name": "gpio: acpi: work around false-positive -Wstring-overflow warning",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/1843/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/810685/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/810685/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<linux-gpio-owner@vger.kernel.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-gpio-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)",
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xnSfl2Ykhz9sRY\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  7 Sep 2017 01:48:31 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1754175AbdIFPsR (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tWed, 6 Sep 2017 11:48:17 -0400",
            "from mout.kundenserver.de ([212.227.17.10]:64115 \"EHLO\n\tmout.kundenserver.de\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1754134AbdIFPsQ (ORCPT\n\t<rfc822; linux-gpio@vger.kernel.org>); Wed, 6 Sep 2017 11:48:16 -0400",
            "from wuerfel.lan ([95.208.190.237]) by mrelayeu.kundenserver.de\n\t(mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id\n\t0M57sc-1dXets3V66-00zHBF; Wed, 06 Sep 2017 17:47:59 +0200"
        ],
        "From": "Arnd Bergmann <arnd@arndb.de>",
        "To": "Mika Westerberg <mika.westerberg@linux.intel.com>,\n\tAndy Shevchenko <andriy.shevchenko@linux.intel.com>,\n\tLinus Walleij <linus.walleij@linaro.org>",
        "Cc": "Arnd Bergmann <arnd@arndb.de>,\n\tDmitry Torokhov <dmitry.torokhov@gmail.com>,\n\tHans de Goede <hdegoede@redhat.com>,\n\tWei Yongjun <weiyongjun1@huawei.com>,\n\tlinux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org",
        "Subject": "[PATCH] gpio: acpi: work around false-positive -Wstring-overflow\n\twarning",
        "Date": "Wed,  6 Sep 2017 17:47:45 +0200",
        "Message-Id": "<20170906154756.2133726-1-arnd@arndb.de>",
        "X-Mailer": "git-send-email 2.9.0",
        "X-Provags-ID": "V03:K0:MFngi/Bev4gwQuN65nCysQqGLG+6pHk1nJEjwdW/vW9ir6pdbxC\n\tkX4466z3lRUhwevjYRaDIywFp+wX8bm0G9daqw1M2B5V3mm5Wn/8Au5VTztW8vpwtb4MC98\n\tNWkUlxUbMNEwiYNBhV+2+wJDEb37A7+h49/gZse9+vwliusGVauaOSFRWxPQ8ugtmjC5zWW\n\tR8LsFTxGeGGklbhaTIKKA==",
        "X-UI-Out-Filterresults": "notjunk:1; V01:K0:GmvlcOniEo0=:5pqHrDHrfIDXYMcVwN4ziG\n\tzfWWgIToJLOQW6zQybNj6yOhU6n2I2FVeyVr/vhlhDWQpZbfnlVFuUpi5EyDwSVVkbPECn/kj\n\tyAG6fEcfs7GBeCsMLt+s2tkv0XECeyq0PVSPBS8BvIhYJd8aHT6kl9+EoJBNgCfchTQhmuJd0\n\tTNwu9oRj5oXpXvzfJqbz2ahdlmHgixgtNA77zf2fIoBU66mI+rRGd1t9gdfvP8kkBsLqb57kj\n\tfkMt1ShUv5/o0mEp7UGez5oufuUo0bXDOMh4Klg2l9yVdgK0pjat0YT/YF0eSqJwgUocgJeXR\n\tqyoDCpeI8sDYMPOfqCvWiFhd2iVOhqGaJAJdB92sjH3oBtmsqMgmWRINCTkTFfYNsmbzukURE\n\toSSrwd/sIVU0glmFUTzkhBME9b629Gn2OeijdyzQOUjQdWeeG4sDH6xZ2IpLguaymqNASd7e+\n\tgB+DnlHWBmT1DWrKzak45PYFN5JhrseLhKvutGo7ayWrhaOmODqHxO3aCOoq87nt+qzKs3j8v\n\t/5rswIL0DucRh4iIj7MwRP4aTAhRZj5qU7EMUvQUJavvDeSBR6zc9/63MzZlFo5JOyFRI4Y3Y\n\tPfpQym6iQzgJTXmEydeU8edPBBswUDXfpGKdv/eEHjOxddl+KRL+p+z4pBCKd4XkVtJUpkcTB\n\tBGi7BQJn9HId4ztzVjDY2CesNlLWEMw8UW9bwnDW62AI+gaKsl9vdJMOW615LavxI8GGreDbB\n\tNl4Koqe1PNsjH8/aDPFXGHSUOyrvrqSpeC04rQ==",
        "Sender": "linux-gpio-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<linux-gpio.vger.kernel.org>",
        "X-Mailing-List": "linux-gpio@vger.kernel.org"
    },
    "content": "gcc-7 notices that the pin_table is an array of 16-bit numbers,\nbut fails to take the following range check into account:\n\ndrivers/gpio/gpiolib-acpi.c: In function 'acpi_gpiochip_request_interrupt':\ndrivers/gpio/gpiolib-acpi.c:206:24: warning: '%02X' directive writing between 2 and 4 bytes into a region of size 3 [-Wformat-overflow=]\n   sprintf(ev_name, \"_%c%02X\",\n                        ^~~~\ndrivers/gpio/gpiolib-acpi.c:206:20: note: directive argument in the range [0, 65535]\n   sprintf(ev_name, \"_%c%02X\",\n                    ^~~~~~~~~\ndrivers/gpio/gpiolib-acpi.c:206:3: note: 'sprintf' output between 5 and 7 bytes into a destination of size 5\n   sprintf(ev_name, \"_%c%02X\",\n   ^~~~~~~~~~~~~~~~~~~~~~~~~~~\n    agpio->triggering == ACPI_EDGE_SENSITIVE ? 'E' : 'L',\n    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n    pin);\n    ~~~~\n\nAs suggested by Andy, this changes the format string to have a fixed length.\nSince modifying the range check did not help, I also opened a bug against\ngcc, see link below.\n\nFixes: 0d1c28a449c6 (\"gpiolib-acpi: Add ACPI5 event model support to gpio.\")\nCc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>\nLink: https://patchwork.kernel.org/patch/9840801/\nLink: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82123\nSigned-off-by: Arnd Bergmann <arnd@arndb.de>\n---\n drivers/gpio/gpiolib-acpi.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c\nindex 4d2113530735..eb4528c87c0b 100644\n--- a/drivers/gpio/gpiolib-acpi.c\n+++ b/drivers/gpio/gpiolib-acpi.c\n@@ -203,7 +203,7 @@ static acpi_status acpi_gpiochip_request_interrupt(struct acpi_resource *ares,\n \n \tif (pin <= 255) {\n \t\tchar ev_name[5];\n-\t\tsprintf(ev_name, \"_%c%02X\",\n+\t\tsprintf(ev_name, \"_%c%02hhX\",\n \t\t\tagpio->triggering == ACPI_EDGE_SENSITIVE ? 'E' : 'L',\n \t\t\tpin);\n \t\tif (ACPI_SUCCESS(acpi_get_handle(handle, ev_name, &evt_handle)))\n",
    "prefixes": []
}