get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1048,
    "url": "http://patchwork.ozlabs.org/api/patches/1048/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/patch/000001c91d6f$238a6ea0$3dd66c6b@sisodomain.com/",
    "project": {
        "id": 3,
        "url": "http://patchwork.ozlabs.org/api/projects/3/?format=api",
        "name": "Linux MTD development",
        "link_name": "linux-mtd",
        "list_id": "linux-mtd.lists.infradead.org",
        "list_email": "linux-mtd@lists.infradead.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<000001c91d6f$238a6ea0$3dd66c6b@sisodomain.com>",
    "list_archive_url": null,
    "date": "2008-09-23T11:25:50",
    "name": "[MTD-UTILS] Add support for 4KB page flash devices",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": false,
    "hash": "7a26ded63f9c8589a0c209ec52f5ce28a6a0e846",
    "submitter": {
        "id": 305,
        "url": "http://patchwork.ozlabs.org/api/people/305/?format=api",
        "name": "AYYANARPONNUSAMY GANGHEYAMOORTHY",
        "email": "moorthy.apg@samsung.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-mtd/patch/000001c91d6f$238a6ea0$3dd66c6b@sisodomain.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/1048/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1048/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@ozlabs.org",
        "Received": [
            "from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34])\n\t(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\n\t(Client did not present a certificate)\n\tby ozlabs.org (Postfix) with ESMTPS id 4B4BADDDEA\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 23 Sep 2008 21:27:26 +1000 (EST)",
            "from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.68 #1 (Red Hat Linux))\n\tid 1Ki5zm-0006a6-TW; Tue, 23 Sep 2008 11:23:55 +0000",
            "from mailout1.samsung.com ([203.254.224.24])\n\tby bombadil.infradead.org with esmtp (Exim 4.68 #1 (Red Hat Linux))\n\tid 1Ki5zQ-0006Zn-Ju\n\tfor linux-mtd@lists.infradead.org; Tue, 23 Sep 2008 11:23:33 +0000",
            "from epmmp1 (mailout1.samsung.com [203.254.224.24])\n\tby mailout1.samsung.com\n\t(iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004))\n\twith ESMTP id <0K7N000E2BN23Y@mailout1.samsung.com> for\n\tlinux-mtd@lists.infradead.org; Tue, 23 Sep 2008 20:23:26 +0900 (KST)",
            "from apgmoorthy ([107.108.214.61])\n\tby mmp1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul\n\t14 2004)) with ESMTPA id <0K7N00JC1BMZ55@mmp1.samsung.com> for\n\tlinux-mtd@lists.infradead.org; Tue, 23 Sep 2008 20:23:26 +0900 (KST)"
        ],
        "Date": "Tue, 23 Sep 2008 16:55:50 +0530",
        "From": "apgmoorthy <moorthy.apg@samsung.com>",
        "Subject": "RE: [PATCH] [MTD-UTILS] Add support for 4KB page flash devices",
        "In-reply-to": "<9c9fda240809212322h4d9ac26eqfd7c3cfb9630c97b@mail.gmail.com>",
        "To": "'Kyungmin Park' <kmpark@infradead.org>",
        "Message-id": "<000001c91d6f$238a6ea0$3dd66c6b@sisodomain.com>",
        "MIME-version": "1.0",
        "X-MIMEOLE": "Produced By Microsoft MimeOLE V6.00.2900.3198",
        "X-Mailer": "Microsoft Office Outlook 11",
        "Thread-index": "Ackce6wPiLpW4kUMRDSAP9W0tP25pAA7bBYg",
        "References": "<33142758.53091221828088797.JavaMail.weblogic@epml16>\n\t<9c9fda240809212322h4d9ac26eqfd7c3cfb9630c97b@mail.gmail.com>",
        "X-Spam-Score": "-4.0 (----)",
        "X-Spam-Report": "SpamAssassin version 3.2.5 on bombadil.infradead.org summary:\n\tContent analysis details:   (-4.0 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-4.0 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\n\tmedium trust [203.254.224.24 listed in list.dnswl.org]",
        "Cc": "linux-mtd@lists.infradead.org, David.Woodhouse@intel.com",
        "X-BeenThere": "linux-mtd@lists.infradead.org",
        "X-Mailman-Version": "2.1.9",
        "Precedence": "list",
        "List-Id": "Linux MTD discussion mailing list <linux-mtd.lists.infradead.org>",
        "List-Unsubscribe": "<http://lists.infradead.org/mailman/listinfo/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.infradead.org/pipermail/linux-mtd>",
        "List-Post": "<mailto:linux-mtd@lists.infradead.org>",
        "List-Help": "<mailto:linux-mtd-request@lists.infradead.org?subject=help>",
        "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "linux-mtd-bounces@lists.infradead.org",
        "Errors-To": "linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"
    },
    "content": "Hi,\n\n     I find not much issue with that, but still as a fair practice , I'll\nabsorb your comment in the patch. Have done the memory allocation later in\nthe function to avoid unnecessary freeing code. \n     And malloced with mtdInfo.writesize instead of constants , let us know\nyour comments. \n\nWe can now use these utilities on 4KB devices.\n\nSigned-off-by: Rohit Hagargundgi <h.rohit@samsung.com>\n---\n\n\n\n\n\n-----Original Message-----\nFrom: kyungmin78@gmail.com [mailto:kyungmin78@gmail.com] On Behalf Of\nKyungmin Park\nSent: Monday, September 22, 2008 11:53 AM\nTo: moorthy.apg@samsung.com\nCc: linux-mtd@lists.infradead.org; David.Woodhouse@intel.com\nSubject: Re: [PATCH] [MTD-UTILS] Add support for 4KB page flash devices\n\nHi,\n\nOn Fri, Sep 19, 2008 at 9:41 PM, AYYANARPONNUSAMY GANGHEYAMOORTHY\n<moorthy.apg@samsung.com> wrote:\n> We can now use these utilities on 4KB devices.\n>\n> Signed-off-by: Rohit Hagargundgi <h.rohit@samsung.com>\n> ---\n> --- a/flash_otp_write.c 2008-06-27 21:51:28.000000000 +0530\n> +++ b/flash_otp_write.c 2008-07-01 16:04:12.000000000 +0530\n> @@ -18,7 +18,7 @@ int main(int argc,char *argv[])\n>        int fd, val, ret, size, wrote, len;\n>        mtd_info_t mtdInfo;\n>        off_t offset;\n> -       char *p, buf[2048];\n> +       char *p, buf[4096];\n>\n\nIs it no problem the stack overflow in application?\nHow about to use malloc & free?\n\nThank you,\nKyungmin Park",
    "diff": "--- a/flashcp.c\t2008-09-23 15:36:26.000000000 +0530\n+++ b/flashcp.c\t2008-09-23 15:49:42.000000000 +0530\n@@ -61,7 +61,7 @@ typedef int bool;\n #define PERCENTAGE(x,total) (((x) * 100) / (total))\n \n /* size of read/write buffer */\n-#define BUFSIZE (10 * 1024)\n+#define BUFSIZE (10 * 4096)\n \n /* cmd-line flags */\n #define FLAG_NONE\t\t0x00\n--- a/flash_otp_write.c\t2008-09-23 15:36:26.000000000 +0530\n+++ b/flash_otp_write.c\t2008-09-23 16:45:01.000000000 +0530\n@@ -18,7 +18,7 @@ int main(int argc,char *argv[])\n \tint fd, val, ret, size, wrote, len;\n \tmtd_info_t mtdInfo;\n \toff_t offset;\n-\tchar *p, buf[2048];\n+\tchar *p, *buf;\n \n \tif (argc != 4 || strcmp(argv[1], \"-u\")) {\n \t\tfprintf(stderr, \"Usage: %s -u <device> <offset>\\n\",\nargv[0]);\n@@ -64,9 +64,16 @@ int main(int argc,char *argv[])\n \t\tlen = 256;\n \n \twrote = 0;\n+\n+\tbuf = (char *)malloc(mtdInfo.writesize);\n+\tif (!buf) {\n+\t\treturn -ENOMEM;\n+\t}\n+\n \twhile ((size = read(0, buf, len))) {\n \t\tif (size < 0) {\n \t\t\tperror(\"read()\");\n+\t\t\tfree(buf);\n \t\t\treturn errno;\n \t\t}\n \t\tp = buf;\n@@ -79,10 +86,12 @@ int main(int argc,char *argv[])\n \t\t\tret = write(fd, p, size);\n \t\t\tif (ret < 0) {\n \t\t\t\tperror(\"write()\");\n+\t\t\t\tfree(buf);\n \t\t\t\treturn errno;\n \t\t\t}\n \t\t\tif (ret == 0) {\n \t\t\t\tprintf(\"write() returned 0 after writing %d\nbytes\\n\", wrote);\n+\t\t\t\tfree(buf);\n \t\t\t\treturn 0;\n \t\t\t}\n \t\t\tp += ret;\n@@ -92,5 +101,6 @@ int main(int argc,char *argv[])\n \t}\n \n \tprintf(\"Wrote %d bytes of OTP user data\\n\", wrote);\n+\tfree(buf);\n \treturn 0;\n }\n--- a/include/mtd/mtd-abi.h\t2008-09-23 15:36:26.000000000 +0530\n+++ b/include/mtd/mtd-abi.h\t2008-09-23 15:48:48.000000000 +0530\n@@ -104,7 +104,7 @@ struct nand_oobinfo {\n \tuint32_t useecc;\n \tuint32_t eccbytes;\n \tuint32_t oobfree[8][2];\n-\tuint32_t eccpos[32];\n+\tuint32_t eccpos[128];\n };\n \n struct nand_oobfree {\n@@ -119,7 +119,7 @@ struct nand_oobfree {\n  */\n struct nand_ecclayout {\n \tuint32_t eccbytes;\n-\tuint32_t eccpos[64];\n+\tuint32_t eccpos[128];\n \tuint32_t oobavail;\n \tstruct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES];\n };\n",
    "prefixes": [
        "MTD-UTILS"
    ]
}