get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 66061,
    "url": "http://patches.dpdk.org/api/patches/66061/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200227042537.187459-2-dmitry.kozliuk@gmail.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20200227042537.187459-2-dmitry.kozliuk@gmail.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200227042537.187459-2-dmitry.kozliuk@gmail.com",
    "date": "2020-02-27T04:25:31",
    "name": "[v4,1/7] eal: introduce portable format attribute",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "f87c5353263cb8cbf4d3c038c5313c01ca189396",
    "submitter": {
        "id": 1581,
        "url": "http://patches.dpdk.org/api/people/1581/?format=api",
        "name": "Dmitry Kozlyuk",
        "email": "dmitry.kozliuk@gmail.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200227042537.187459-2-dmitry.kozliuk@gmail.com/mbox/",
    "series": [
        {
            "id": 8703,
            "url": "http://patches.dpdk.org/api/series/8703/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8703",
            "date": "2020-02-27T04:25:30",
            "name": "MinGW-w64 support",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/8703/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/66061/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/66061/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id EA94EA055A;\n\tThu, 27 Feb 2020 05:25:57 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 127391BFC8;\n\tThu, 27 Feb 2020 05:25:52 +0100 (CET)",
            "from mail-lf1-f68.google.com (mail-lf1-f68.google.com\n [209.85.167.68]) by dpdk.org (Postfix) with ESMTP id 37E1C1BF8D\n for <dev@dpdk.org>; Thu, 27 Feb 2020 05:25:50 +0100 (CET)",
            "by mail-lf1-f68.google.com with SMTP id r14so1009959lfm.5\n for <dev@dpdk.org>; Wed, 26 Feb 2020 20:25:50 -0800 (PST)",
            "from localhost.localdomain (broadband-37-110-65-23.ip.moscow.rt.ru.\n [37.110.65.23])\n by smtp.googlemail.com with ESMTPSA id g21sm2224350ljj.53.2020.02.26.20.25.48\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 26 Feb 2020 20:25:48 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=XwxpU67dFdFosV05TbGYMhklbSndu2oWkeA7Knzj6iE=;\n b=Yhyd88dpnVfL6/MR8BTcqmrjtWlmE2CwsnQ+JaCx/bCMzqxaff7oXVk5JA236Fjzje\n X8GQci0RCSWlmj/b6zSftWWsp4EbbJJzDH9XCXmSIhjEhdaDlxR133DZott/rFfkZ1NH\n oM8opCYm2tImBNPaulAq8EhxjBJMAxVatdTyL+MuRsp0m1V0PSUYtiMfuPwQhc5uMRbS\n pigGs5qye5J1twoV3oA6dOCMi18FPu0jqJbJNiLzAtc5fcp/jwQ9BwS/idkz8Gm24/a+\n bU38to4jnPVpmemi+C0ciulSV3iALa7hCWTV4HVfMTZjm+XKxP6kRztkLfCFAjsZhy2Y\n NGTA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\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=XwxpU67dFdFosV05TbGYMhklbSndu2oWkeA7Knzj6iE=;\n b=Pc01V9cs+K5E5OoI5/+0oV9qKX1DYp28MbmfxjlrHWcMLeBWD0cXUOaZglmbB1EQtJ\n f6D/Xc+0vHnY2xsDLNas84dJPnp23KIPt7Z8E1YiGoNam2nR8YCySfV/eXLTIgwqWX54\n zJ3xfnPEH37NC8kw9sOytFwrl2XjsxJi9zgCR3AsPIa4Mu18CVJwfL7QBd5LDL2sqBP5\n 7HS5wRFgjsK/5Xfe/TrGips02G2yazPyybd1ME8bEPbF6ZP6MqWOcUnEZLGIXHV0+ShN\n XgeP0D/vnyP807Nuxw9bczqaixGoDGEEVttEVU4Ma317dlL/MJMv/NQXrp41od0mYaNy\n qLMg==",
        "X-Gm-Message-State": "ANhLgQ3CtqPJ5qQ+Ag5D1kMROG81vkl/ri+HGeIlkpkb6DWLbe58c3eB\n kt30V6LVcQ3SFa5KHGzzccOZ2TNUK/U=",
        "X-Google-Smtp-Source": "\n ADFU+vv43BFK1UoHobUV0o4zt5jD5elg0ThcGzgNWWIFekmng4bX3UTNwEkjr78MWkGQQ2rRqtsWjA==",
        "X-Received": "by 2002:a19:dcd:: with SMTP id 196mr1036709lfn.199.1582777549287;\n Wed, 26 Feb 2020 20:25:49 -0800 (PST)",
        "From": "Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>",
        "To": "dev@dpdk.org",
        "Cc": "Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,\n Olivier Matz <olivier.matz@6wind.com>",
        "Date": "Thu, 27 Feb 2020 07:25:31 +0300",
        "Message-Id": "<20200227042537.187459-2-dmitry.kozliuk@gmail.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20200227042537.187459-1-dmitry.kozliuk@gmail.com>",
        "References": "<20200218000229.86621-1-dmitry.kozliuk@gmail.com>\n <20200227042537.187459-1-dmitry.kozliuk@gmail.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v4 1/7] eal: introduce portable format attribute",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "When using __attribute__((format(...)) on functions, GCC on Windows\nassumes MS-specific format string by default, even if the underlying\nstdio implementation is ANSI-compliant (either MS Unicersal CRT\nor MinGW implementation). Wrap attribute into a macro that forces\nGNU-specific format string when using GCC.\n\nUse this new attribute for logging and panic messages in EAL\nand for output strings in cmdline library.\n\nSigned-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>\n---\n lib/librte_cmdline/cmdline.h                |  4 +++-\n lib/librte_eal/common/include/rte_common.h  | 17 ++++++++++++++++-\n lib/librte_eal/common/include/rte_debug.h   |  2 +-\n lib/librte_eal/common/include/rte_devargs.h |  2 +-\n lib/librte_eal/common/include/rte_log.h     |  4 ++--\n 5 files changed, 23 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/lib/librte_cmdline/cmdline.h b/lib/librte_cmdline/cmdline.h\nindex 27d2effdf..243f99d20 100644\n--- a/lib/librte_cmdline/cmdline.h\n+++ b/lib/librte_cmdline/cmdline.h\n@@ -7,6 +7,8 @@\n #ifndef _CMDLINE_H_\n #define _CMDLINE_H_\n \n+#include <rte_common.h>\n+\n #include <termios.h>\n #include <cmdline_rdline.h>\n #include <cmdline_parse.h>\n@@ -34,7 +36,7 @@ struct cmdline *cmdline_new(cmdline_parse_ctx_t *ctx, const char *prompt, int s_\n void cmdline_set_prompt(struct cmdline *cl, const char *prompt);\n void cmdline_free(struct cmdline *cl);\n void cmdline_printf(const struct cmdline *cl, const char *fmt, ...)\n-\t__attribute__((format(printf,2,3)));\n+\t__rte_format_printf(2, 3);\n int cmdline_in(struct cmdline *cl, const char *buf, int size);\n int cmdline_write_char(struct rdline *rdl, char c);\n \ndiff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h\nindex 4b5f3a31f..226c1a011 100644\n--- a/lib/librte_eal/common/include/rte_common.h\n+++ b/lib/librte_eal/common/include/rte_common.h\n@@ -89,6 +89,21 @@ typedef uint16_t unaligned_uint16_t;\n  */\n #define RTE_SET_USED(x) (void)(x)\n \n+/**\n+ * Check format string and its arguments at compile-time.\n+ *\n+ * GCC on Windows assumes MS-specific format string by default,\n+ * even if the underlying stdio implementation is ANSI-compliant,\n+ * so this must be overridden.\n+ */\n+#if defined(RTE_TOOLCHAIN_GCC)\n+#define __rte_format_printf(format_index, first_arg) \\\n+\t__attribute__((format(gnu_printf, format_index, first_arg)))\n+#else\n+#define __rte_format_printf(format_index, first_arg) \\\n+\t__attribute__((format(printf, format_index, first_arg)))\n+#endif\n+\n #define RTE_PRIORITY_LOG 101\n #define RTE_PRIORITY_BUS 110\n #define RTE_PRIORITY_CLASS 120\n@@ -784,7 +799,7 @@ rte_str_to_size(const char *str)\n void\n rte_exit(int exit_code, const char *format, ...)\n \t__attribute__((noreturn))\n-\t__attribute__((format(printf, 2, 3)));\n+\t__rte_format_printf(2, 3);\n \n #ifdef __cplusplus\n }\ndiff --git a/lib/librte_eal/common/include/rte_debug.h b/lib/librte_eal/common/include/rte_debug.h\nindex 748d32c80..7edd4b89c 100644\n--- a/lib/librte_eal/common/include/rte_debug.h\n+++ b/lib/librte_eal/common/include/rte_debug.h\n@@ -73,7 +73,7 @@ void __rte_panic(const char *funcname , const char *format, ...)\n #endif\n #endif\n \t__attribute__((noreturn))\n-\t__attribute__((format(printf, 2, 3)));\n+\t__rte_format_printf(2, 3);\n \n #ifdef __cplusplus\n }\ndiff --git a/lib/librte_eal/common/include/rte_devargs.h b/lib/librte_eal/common/include/rte_devargs.h\nindex 882dfa0ab..898efa0d6 100644\n--- a/lib/librte_eal/common/include/rte_devargs.h\n+++ b/lib/librte_eal/common/include/rte_devargs.h\n@@ -137,7 +137,7 @@ rte_devargs_parse(struct rte_devargs *da, const char *dev);\n int\n rte_devargs_parsef(struct rte_devargs *da,\n \t\t   const char *format, ...)\n-__attribute__((format(printf, 2, 0)));\n+__rte_format_printf(2, 0);\n \n /**\n  * Insert an rte_devargs in the global list.\ndiff --git a/lib/librte_eal/common/include/rte_log.h b/lib/librte_eal/common/include/rte_log.h\nindex 1bb0e6694..a0d1f4837 100644\n--- a/lib/librte_eal/common/include/rte_log.h\n+++ b/lib/librte_eal/common/include/rte_log.h\n@@ -282,7 +282,7 @@ int rte_log(uint32_t level, uint32_t logtype, const char *format, ...)\n \t__attribute__((cold))\n #endif\n #endif\n-\t__attribute__((format(printf, 3, 4)));\n+\t__rte_format_printf(3, 4);\n \n /**\n  * Generates a log message.\n@@ -311,7 +311,7 @@ int rte_log(uint32_t level, uint32_t logtype, const char *format, ...)\n  *   - Negative on error.\n  */\n int rte_vlog(uint32_t level, uint32_t logtype, const char *format, va_list ap)\n-\t__attribute__((format(printf,3,0)));\n+\t__rte_format_printf(3, 0);\n \n /**\n  * Generates a log message.\n",
    "prefixes": [
        "v4",
        "1/7"
    ]
}