get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 809111,
    "url": "http://patchwork.ozlabs.org/api/patches/809111/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20170902163806.27265-9-robdclark@gmail.com/",
    "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": "<20170902163806.27265-9-robdclark@gmail.com>",
    "list_archive_url": null,
    "date": "2017-09-02T16:38:03",
    "name": "[U-Boot,v2,8/8] fs/fat: fix case for FAT shortnames",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "08ac850e93367959051383389f8f0c25275c86fd",
    "submitter": {
        "id": 18760,
        "url": "http://patchwork.ozlabs.org/api/people/18760/?format=api",
        "name": "Rob Clark",
        "email": "robdclark@gmail.com"
    },
    "delegate": {
        "id": 3651,
        "url": "http://patchwork.ozlabs.org/api/users/3651/?format=api",
        "username": "trini",
        "first_name": "Tom",
        "last_name": "Rini",
        "email": "trini@ti.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20170902163806.27265-9-robdclark@gmail.com/mbox/",
    "series": [
        {
            "id": 1165,
            "url": "http://patchwork.ozlabs.org/api/series/1165/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=1165",
            "date": "2017-09-02T16:37:55",
            "name": "fs/fat: cleanups + readdir implementation",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/1165/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/809111/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/809111/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": [
            "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"pn+phmH7\"; dkim-atps=neutral"
        ],
        "Received": [
            "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xl241732hz9sRW\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun,  3 Sep 2017 02:43:29 +1000 (AEST)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid A5CF5C21F67; Sat,  2 Sep 2017 16:41:00 +0000 (UTC)",
            "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id D12B7C21F95;\n\tSat,  2 Sep 2017 16:40:26 +0000 (UTC)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid B9040C21E2F; Sat,  2 Sep 2017 16:39:08 +0000 (UTC)",
            "from mail-qk0-f195.google.com (mail-qk0-f195.google.com\n\t[209.85.220.195])\n\tby lists.denx.de (Postfix) with ESMTPS id AC81DC21F40\n\tfor <u-boot@lists.denx.de>; Sat,  2 Sep 2017 16:39:03 +0000 (UTC)",
            "by mail-qk0-f195.google.com with SMTP id o63so2020329qkb.5\n\tfor <u-boot@lists.denx.de>; Sat, 02 Sep 2017 09:39:03 -0700 (PDT)",
            "from localhost ([2601:184:4780:aac0:25f8:dd96:a084:785a])\n\tby smtp.gmail.com with ESMTPSA id\n\t92sm2103372qta.42.2017.09.02.09.39.01\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tSat, 02 Sep 2017 09:39:01 -0700 (PDT)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-0.0 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID\n\tautolearn=unavailable autolearn_force=no version=3.4.0",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=dCWDkvvh2VqQKh4EF1jOkphHVAD5RT0vwqwJn8hdU5g=;\n\tb=pn+phmH7qenv/zg43lhj0BciRr/qt4mbP6FUXXAk/veDL0aWnmwug4NLp6QSzEQv2R\n\tV292OwRIywU4mQqNE4/9gpyUNQrex4P7iYCKHIQpmNnyDjcMDx/j6T9wfrjocYPQXzxf\n\t/gjavQdR0etSpered1ML2Jpp2jskqdD2oHe7XsXkHqVEfnnoRhKyFh4TKV5lyPehkzP1\n\tRQ0M9Jvh+kRJPaz6q+3x6FBHkn6YAg/VFWqbhh2KRo87KPilCXloD3mv4F3DzwWOIeVC\n\thOV9B5j2hp6ww06Wb8DYrcgRnqlGIQ7PvLA9wc4ABgE9s1LG3SLAuhzE2tnnCPPYQax7\n\t7Wkw==",
        "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=dCWDkvvh2VqQKh4EF1jOkphHVAD5RT0vwqwJn8hdU5g=;\n\tb=nPwPcxEk8eaqQyetYKGgQnyVBoN4HcBlPpmaUPAK0hMLl3ihcj/DcyNyrs631oEa9P\n\t+1No0HxmArwt9cwmO+mzpUA6MbbXBUo8kWngP5RNW8HyhU37KJIHTxfCHK4XiGnGLmFS\n\t4XN/7BXB1F/ebbJkKmS2A8fHAn9YzgOuIsZgBvPt7d8Km0/b3hyOpyUUjBdfksKLhX/D\n\t2lgQhewteNpAn1A5pHmylT/lIYKvbTWDwAxEENc8QcU+vZrq6JQ8+Rg/5TPr/0bWEBUl\n\tfqCYoyxbN9gHQpJwemYXnnfIHDJRvGAnDRMHehxEADLbxJnYsXMsCxapJaL3mckwflzT\n\t5upQ==",
        "X-Gm-Message-State": "AHPjjUgKWVAq/3xfwbIjp2MLt57P6vO5HzYgHAUNt2FoiSs1G2zb4FEH\n\tcAQE2iItIiLaTzzD0EY=",
        "X-Google-Smtp-Source": "ADKCNb5sn48OE0YYvEfjblYm3dDgvA4WFpqmnglenUxVFFhO9IkagkBHDNyxX5E7UbRjJKjp2XR81w==",
        "X-Received": "by 10.55.201.155 with SMTP id m27mr7878548qkl.57.1504370342394; \n\tSat, 02 Sep 2017 09:39:02 -0700 (PDT)",
        "From": "Rob Clark <robdclark@gmail.com>",
        "To": "U-Boot Mailing List <u-boot@lists.denx.de>",
        "Date": "Sat,  2 Sep 2017 12:38:03 -0400",
        "Message-Id": "<20170902163806.27265-9-robdclark@gmail.com>",
        "X-Mailer": "git-send-email 2.13.5",
        "In-Reply-To": "<20170902163806.27265-1-robdclark@gmail.com>",
        "References": "<20170902163806.27265-1-robdclark@gmail.com>",
        "Cc": "Stephen Warren <swarren@nvidia.com>,\n\tPhilipp Skadorov <philipp.skadorov@savoirfairelinux.com>,\n\tGenevieve Chan <ccheauya@altera.com>, Tien Fong Chee <tfchee@altera.com>",
        "Subject": "[U-Boot] [PATCH v2 8/8] fs/fat: fix case for FAT shortnames",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.18",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>",
        "List-Archive": "<http://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\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>"
    },
    "content": "Noticed when comparing our output to linux.  There are some lcase bits\nwhich control whether filename and/or extension should be downcase'd.\n\nSigned-off-by: Rob Clark <robdclark@gmail.com>\n---\n fs/fat/fat.c       | 17 ++++++++++++-----\n fs/fat/fat_write.c |  4 ++--\n include/fat.h      |  3 +++\n 3 files changed, 17 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/fs/fat/fat.c b/fs/fat/fat.c\nindex fc3106aacb..ccbf7ba1c8 100644\n--- a/fs/fat/fat.c\n+++ b/fs/fat/fat.c\n@@ -29,11 +29,13 @@ static const int vfat_enabled = 0;\n #endif\n \n /*\n- * Convert a string to lowercase.\n+ * Convert a string to lowercase.  Converts at most 'len' characters,\n+ * 'len' may be larger than the length of 'str' if 'str' is NULL\n+ * terminated.\n  */\n-static void downcase(char *str)\n+static void downcase(char *str, size_t len)\n {\n-\twhile (*str != '\\0') {\n+\twhile (*str != '\\0' && len--) {\n \t\t*str = tolower(*str);\n \t\tstr++;\n \t}\n@@ -131,10 +133,16 @@ static void get_name(dir_entry *dirent, char *s_name)\n \tptr = s_name;\n \twhile (*ptr && *ptr != ' ')\n \t\tptr++;\n+\tif (dirent->lcase & CASE_LOWER_BASE)\n+\t\tdowncase(s_name, (unsigned)(ptr - s_name));\n \tif (dirent->ext[0] && dirent->ext[0] != ' ') {\n+\t\tchar *ext;\n+\n \t\t*ptr = '.';\n-\t\tptr++;\n+\t\text = ++ptr;\n \t\tmemcpy(ptr, dirent->ext, 3);\n+\t\tif (dirent->lcase & CASE_LOWER_EXT)\n+\t\t\tdowncase(ext, 3);\n \t\tptr[3] = '\\0';\n \t\twhile (*ptr && *ptr != ' ')\n \t\t\tptr++;\n@@ -144,7 +152,6 @@ static void get_name(dir_entry *dirent, char *s_name)\n \t\t*s_name = '\\0';\n \telse if (*s_name == aRING)\n \t\t*s_name = DELETED_FLAG;\n-\tdowncase(s_name);\n }\n \n static int flush_dirty_fat_buffer(fsdata *mydata);\ndiff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c\nindex 4ca024c208..655ad4ec84 100644\n--- a/fs/fat/fat_write.c\n+++ b/fs/fat/fat_write.c\n@@ -345,7 +345,7 @@ get_long_file_name(fsdata *mydata, int curclust, __u8 *cluster,\n \t\t*l_name = '\\0';\n \telse if (*l_name == aRING)\n \t\t*l_name = DELETED_FLAG;\n-\tdowncase(l_name);\n+\tdowncase(l_name, ~0);\n \n \t/* Return the real directory entry */\n \t*retdent = realdent;\n@@ -981,7 +981,7 @@ static int do_fat_write(const char *filename, void *buffer, loff_t size,\n \n \tmemcpy(l_filename, filename, name_len);\n \tl_filename[name_len] = 0; /* terminate the string */\n-\tdowncase(l_filename);\n+\tdowncase(l_filename, ~0);\n \n \tstartsect = mydata->rootdir_sect;\n \tretdent = find_directory_entry(mydata, startsect,\ndiff --git a/include/fat.h b/include/fat.h\nindex b2d4b952fd..5e4924316a 100644\n--- a/include/fat.h\n+++ b/include/fat.h\n@@ -128,6 +128,9 @@ typedef struct volume_info\n \t/* Boot sign comes last, 2 bytes */\n } volume_info;\n \n+#define CASE_LOWER_BASE\t8\t/* base is lower case */\n+#define CASE_LOWER_EXT\t16\t/* extension is lower case */\n+\n typedef struct dir_entry {\n \tchar\tname[8],ext[3];\t/* Name and extension */\n \t__u8\tattr;\t\t/* Attribute bits */\n",
    "prefixes": [
        "U-Boot",
        "v2",
        "8/8"
    ]
}