get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 43748,
    "url": "http://patches.dpdk.org/api/patches/43748/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180816153106.7608-2-stephen@networkplumber.org/",
    "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": "<20180816153106.7608-2-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180816153106.7608-2-stephen@networkplumber.org",
    "date": "2018-08-16T15:31:05",
    "name": "[1/2] hexdump: whitespace cleanup",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "0c8b4d534e86549ad7be686fc41af1cd5e7c955b",
    "submitter": {
        "id": 27,
        "url": "http://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "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/20180816153106.7608-2-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 1001,
            "url": "http://patches.dpdk.org/api/series/1001/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1001",
            "date": "2018-08-16T15:31:04",
            "name": "eal: hexcump trivial changes",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/1001/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/43748/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/43748/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id A07E04C8E;\n\tThu, 16 Aug 2018 17:31:15 +0200 (CEST)",
            "from mail-pl0-f53.google.com (mail-pl0-f53.google.com\n\t[209.85.160.53]) by dpdk.org (Postfix) with ESMTP id 1AEA844C3\n\tfor <dev@dpdk.org>; Thu, 16 Aug 2018 17:31:11 +0200 (CEST)",
            "by mail-pl0-f53.google.com with SMTP id j8-v6so2252956pll.12\n\tfor <dev@dpdk.org>; Thu, 16 Aug 2018 08:31:11 -0700 (PDT)",
            "from xeon-e3.lan (204-195-22-127.wavecable.com. [204.195.22.127])\n\tby smtp.gmail.com with ESMTPSA id\n\tp5-v6sm30002104pfn.57.2018.08.16.08.31.09\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 16 Aug 2018 08:31:09 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=G0voSONN9Y5814Lch2Ae9ypVIgYuPXbeatiJyfWKl1E=;\n\tb=tzQhlNvsTe78pyPEr7HNZ8Y8dGIUehOW6MWVt5e0+FQr9TQ3F1iWIDJdDzMfirCHh9\n\tGO/0FN10z+kwUkLcjpRFTu3yP4YfGy6Gn1mfNJoJ4jo1T5ttygvFGg53Q/zfYB8BDKn7\n\ttbtt8VUeRrJjargyzdAu1ecGfkZ7YW8/Grgi+WS91t8oGsWbd+f6cKh/qg4ot15Oa4AX\n\tbZFrhZ7SPyem/51FHfglxF/HOqm1HVhhNmbPEj4TX8aWuX87K1lN72WXuGKEi4a/npIz\n\twVUaOIBtDrxHwNY+NSl/Nh7mhoyAhq8n3Tf15N2tvIuRwCYUPJcV4WTJIsDhvb+6wUju\n\t3+Og==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=G0voSONN9Y5814Lch2Ae9ypVIgYuPXbeatiJyfWKl1E=;\n\tb=Wkuy4cqPdwjn2SkBwenyH3SP7n83zAwdcOZAo8wD/HU2hOZ/RL51m+yUQJO0wjSs/g\n\t9FE68hPJ7040yJELDQ9PGk32v0RwPzwYhcfhh+DgSeW9PD9CGAUssATL9582Mk3GLZ3O\n\tPc/W9oTe3lIGLhYhz4JxRLlQO9EzmeXxRpjQOf+Ku/Z4e4trt4br/8tdDCvEhnMGCP6c\n\te+p4G2f8uFb7u+RyJP3VUGSPvktPf2mctzmNQ9AiphagRH56SE//WhFgQWvDclfT7I98\n\tXWQPIb+gEcrY33NIKJacLtVo+sqsCxVcIejCh4lA+4yHntwVZhCR78TEXI0rMScahIoi\n\tJ2hg==",
        "X-Gm-Message-State": "AOUpUlEpEe0/DjFMlk8vh9bJnV58rYZj4eJr4h+GqrgB5T8m75w1Pm9T\n\te4kHNyHYjcd/3wESfjbPz2QBY0i80gv0og==",
        "X-Google-Smtp-Source": "AA+uWPxeqpHSa3PjiwWHqDqY/q5WQbbYCoFKmMIqq3EMZ62A+Jxj01NNGhSugGoHKOQstVv7dI8/fA==",
        "X-Received": "by 2002:a17:902:bd82:: with SMTP id\n\tq2-v6mr29508579pls.178.1534433470807; \n\tThu, 16 Aug 2018 08:31:10 -0700 (PDT)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>",
        "Date": "Thu, 16 Aug 2018 08:31:05 -0700",
        "Message-Id": "<20180816153106.7608-2-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.18.0",
        "In-Reply-To": "<20180816153106.7608-1-stephen@networkplumber.org>",
        "References": "<20180816153106.7608-1-stephen@networkplumber.org>",
        "Subject": "[dpdk-dev] [PATCH 1/2] hexdump: whitespace cleanup",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "The hexdump code obviously came from somewhere else originally.\nIt is not formatted according to DPDK coding style.\n\nAlso, drop the comment which is not useful the docbock comment\nis already in the rte_hexdump.h\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n lib/librte_eal/common/eal_common_hexdump.c | 109 ++++++++-------------\n 1 file changed, 43 insertions(+), 66 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_hexdump.c b/lib/librte_eal/common/eal_common_hexdump.c\nindex 9ca7c511c062..980cf73ac337 100644\n--- a/lib/librte_eal/common/eal_common_hexdump.c\n+++ b/lib/librte_eal/common/eal_common_hexdump.c\n@@ -10,82 +10,59 @@\n \n #define LINE_LEN 128\n \n-/**************************************************************************//**\n-*\n-* rte_hexdump - Dump out memory in a special hex dump format.\n-*\n-* DESCRIPTION\n-* Dump out the message buffer in a special hex dump output format with characters\n-* printed for each line of 16 hex values.\n-*\n-* RETURNS: N/A\n-*\n-* SEE ALSO:\n-*/\n-\n-void\n-rte_hexdump(FILE *f, const char * title, const void * buf, unsigned int len)\n+void rte_hexdump(FILE *f, const char *title, const void *buf, unsigned int len)\n {\n-    unsigned int i, out, ofs;\n-    const unsigned char *data = buf;\n-    char line[LINE_LEN];    /* space needed 8+16*3+3+16 == 75 */\n+\tunsigned int i, out, ofs;\n+\tconst unsigned char *data = buf;\n+\tchar line[LINE_LEN];\t/* space needed 8+16*3+3+16 == 75 */\n \n-    fprintf(f, \"%s at [%p], len=%u\\n\", (title)? title  : \"  Dump data\", data, len);\n-    ofs = 0;\n-    while (ofs < len) {\n-        /* format the line in the buffer, then use printf to output to screen */\n-        out = snprintf(line, LINE_LEN, \"%08X:\", ofs);\n-        for (i = 0; ((ofs + i) < len) && (i < 16); i++)\n-            out += snprintf(line+out, LINE_LEN - out, \" %02X\", (data[ofs+i] & 0xff));\n-        for(; i <= 16; i++)\n-            out += snprintf(line+out, LINE_LEN - out, \" | \");\n-        for(i = 0; (ofs < len) && (i < 16); i++, ofs++) {\n-            unsigned char c = data[ofs];\n-            if ( (c < ' ') || (c > '~'))\n-                c = '.';\n-            out += snprintf(line+out, LINE_LEN - out, \"%c\", c);\n-        }\n-        fprintf(f, \"%s\\n\", line);\n-    }\n-    fflush(f);\n-}\n+\tfprintf(f, \"%s at [%p], len=%u\\n\", (title) ? title : \"  Dump data\",\n+\t\tdata, len);\n+\tofs = 0;\n+\twhile (ofs < len) {\n+\t\t/* format the line in the buffer */\n+\t\tout = snprintf(line, LINE_LEN, \"%08X:\", ofs);\n+\t\tfor (i = 0; i < 16 && ofs + i < len; i++)\n+\t\t\tout += snprintf(line + out, LINE_LEN - out,\n+\t\t\t\t\t \" %02X\", (data[ofs + i] & 0xff));\n+\t\tfor (; i <= 16; i++)\n+\t\t\tout += snprintf(line + out, LINE_LEN - out, \" | \");\n+\n+\t\tfor (i = 0; (ofs < len) && (i < 16); i++, ofs++) {\n+\t\t\tunsigned char c = data[ofs];\n \n-/**************************************************************************//**\n-*\n-* rte_memdump - Dump out memory in hex bytes with colons.\n-*\n-* DESCRIPTION\n-* Dump out the message buffer in hex bytes with colons xx:xx:xx:xx:...\n-*\n-* RETURNS: N/A\n-*\n-* SEE ALSO:\n-*/\n+\t\t\tif (c < ' ' || c > '~')\n+\t\t\t\tc = '.';\n+\t\t\tout += snprintf(line + out, LINE_LEN - out, \"%c\", c);\n+\t\t}\n+\t\tfprintf(f, \"%s\\n\", line);\n+\t}\n+\tfflush(f);\n+}\n \n-void\n-rte_memdump(FILE *f, const char * title, const void * buf, unsigned int len)\n+void rte_memdump(FILE *f, const char *title, const void *buf, unsigned int len)\n {\n-    unsigned int i, out;\n-    const unsigned char *data = buf;\n-    char line[LINE_LEN];\n+\tunsigned int i, out;\n+\tconst unsigned char *data = buf;\n+\tchar line[LINE_LEN];\n \n-    if ( title )\n-\tfprintf(f, \"%s: \", title);\n+\tif (title)\n+\t\tfprintf(f, \"%s: \", title);\n \n-    line[0] = '\\0';\n-    for (i = 0, out = 0; i < len; i++) {\n-\t// Make sure we do not overrun the line buffer length.\n-\t\tif ( out >= (LINE_LEN - 4) ) {\n+\tline[0] = '\\0';\n+\tfor (i = 0, out = 0; i < len; i++) {\n+\t\t/* Make sure we do not overrun the line buffer length. */\n+\t\tif (out >= (LINE_LEN - 4)) {\n \t\t\tfprintf(f, \"%s\", line);\n \t\t\tout = 0;\n \t\t\tline[out] = '\\0';\n \t\t}\n-\t\tout += snprintf(line+out, LINE_LEN - out, \"%02x%s\",\n-\t\t\t\t(data[i] & 0xff), ((i+1) < len)? \":\" : \"\");\n-    }\n-    if ( out > 0 )\n-\tfprintf(f, \"%s\", line);\n-    fprintf(f, \"\\n\");\n+\t\tout += snprintf(line + out, LINE_LEN - out, \"%02x%s\",\n+\t\t\t\t(data[i] & 0xff), ((i + 1) < len) ? \":\" : \"\");\n+\t}\n+\tif (out > 0)\n+\t\tfprintf(f, \"%s\", line);\n+\tfprintf(f, \"\\n\");\n \n-    fflush(f);\n+\tfflush(f);\n }\n",
    "prefixes": [
        "1/2"
    ]
}