get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 813388,
    "url": "http://patchwork.ozlabs.org/api/patches/813388/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1505303106-9780-2-git-send-email-yamada.masahiro@socionext.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": "<1505303106-9780-2-git-send-email-yamada.masahiro@socionext.com>",
    "list_archive_url": null,
    "date": "2017-09-13T11:45:01",
    "name": "[U-Boot,1/6] printk: collect printk stuff into <linux/printk.h>",
    "commit_ref": null,
    "pull_url": null,
    "state": "deferred",
    "archived": false,
    "hash": "1f7408905562eddb6838bc276bf7f242937d15cf",
    "submitter": {
        "id": 65882,
        "url": "http://patchwork.ozlabs.org/api/people/65882/?format=api",
        "name": "Masahiro Yamada",
        "email": "yamada.masahiro@socionext.com"
    },
    "delegate": {
        "id": 38701,
        "url": "http://patchwork.ozlabs.org/api/users/38701/?format=api",
        "username": "masahir0y",
        "first_name": "Masahiro",
        "last_name": "Yamada",
        "email": "yamada.m@jp.panasonic.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/1505303106-9780-2-git-send-email-yamada.masahiro@socionext.com/mbox/",
    "series": [
        {
            "id": 2896,
            "url": "http://patchwork.ozlabs.org/api/series/2896/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=2896",
            "date": "2017-09-13T11:45:01",
            "name": "Sync and consolidate Linux-derived printk, BUILD_BUG, BUG, WARN, etc.",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/2896/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/813388/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/813388/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=nifty.com header.i=@nifty.com\n\theader.b=\"KFaHu8Vy\"; dkim-atps=neutral"
        ],
        "Received": [
            "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xsfxR6jxsz9sPk\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 21:45:47 +1000 (AEST)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid A9775C225AD; Wed, 13 Sep 2017 11:45:44 +0000 (UTC)",
            "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 9EB80C220CB;\n\tWed, 13 Sep 2017 11:45:41 +0000 (UTC)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid 937BBC22515; Wed, 13 Sep 2017 11:45:32 +0000 (UTC)",
            "from conuserg-10.nifty.com (conuserg-10.nifty.com [210.131.2.77])\n\tby lists.denx.de (Postfix) with ESMTPS id 1357CC22527\n\tfor <u-boot@lists.denx.de>; Wed, 13 Sep 2017 11:45:31 +0000 (UTC)",
            "from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp\n\t[153.142.97.92]) (authenticated)\n\tby conuserg-10.nifty.com with ESMTP id v8DBjE4o018351;\n\tWed, 13 Sep 2017 20:45:15 +0900"
        ],
        "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=T_DKIM_INVALID\n\tautolearn=unavailable autolearn_force=no version=3.4.0",
        "DKIM-Filter": "OpenDKIM Filter v2.10.3 conuserg-10.nifty.com v8DBjE4o018351",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com;\n\ts=dec2015msa; t=1505303116;\n\tbh=K3gEn0BJiU0mJk70g9E3EiwpwXh2HFdhw5fOJVMChIY=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=KFaHu8VyOgOxdZbdRlA3zxpz7c3QS/x+bAHFutVBiOzX6fNNnc5JtUySXJFtai0nT\n\t0yOeXhEtjwc6Hb2nfNqiY3YUMiCUkA0QrxoLd2szWPl0I3fiydRGcnfU/WqmbgLFGD\n\tlR14y/RL9Q60ss4yVZ9/beEtHyhA/bFUhINvFUhziRfhyLK6FZsh4at+oUrvshW5/k\n\tovwJPS7pUlazlSreaWej71p7ZDPNXhditvxBzbC5uznKnC8tqkyTBe3iROZHKu9kkD\n\teE7YUPaF+YQt7Db9FOfPy7HBBQgcwEoyJGWM/eO+apAq4Cv/UFEyLJCaXnCCBn7m1r\n\tYWco5rYx5e00g==",
        "X-Nifty-SrcIP": "[153.142.97.92]",
        "From": "Masahiro Yamada <yamada.masahiro@socionext.com>",
        "To": "u-boot@lists.denx.de",
        "Date": "Wed, 13 Sep 2017 20:45:01 +0900",
        "Message-Id": "<1505303106-9780-2-git-send-email-yamada.masahiro@socionext.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1505303106-9780-1-git-send-email-yamada.masahiro@socionext.com>",
        "References": "<1505303106-9780-1-git-send-email-yamada.masahiro@socionext.com>",
        "Cc": "Marek Vasut <marex@denx.de>, Albert Aribaud <albert.u.boot@aribaud.net>",
        "Subject": "[U-Boot] [PATCH 1/6] printk: collect printk stuff into\n\t<linux/printk.h>",
        "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": "When we want to print something to the console, we generally include\n<common.h>, then use printf() and friends.\n\nWhen we import code from Linux, planning to sync it from time to time,\nwe want to use printk() and pr_*().  U-Boot does not support them in\na clean way.  So, people end up with local macros, or compat headers\nhere and there, then we occasionally see build errors of definition\nconflicts.\n\nWe have some compat macros in include/linux/compat.h, but putting all\nsorts of unrelated things into a single header looks a bad idea to me.\nOne more thing, <linux/compat.h> simply replaces \"printk\" pattern with\n\"printf\", so it needs <common.h> included.  This header pulls in tons\nof headers.  Putting #include <common.h> at the beginning of every file\nis a bad convention.\n\nHence this patch, to move all printk stuff into <linux/printk.h>.\nIf you want to use printk() stuff, just include this header, and that's\nit.\n\nCurrently, all printk() and pr_*() behave as printf(), except that\npr_debug() is enabled only when DEBUG is defined.  Of course, it will\nbe easy to implement \"loglevel\" concept to differentiate pr_*(), but\nthis kind of clean-up must happen first.\n\nSigned-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>\n---\n\n arch/arm/mach-uniphier/dram_init.c             |  3 -\n arch/arm/mach-uniphier/init.h                  |  5 --\n drivers/bios_emulator/include/x86emu/x86emui.h |  3 -\n drivers/usb/dwc3/linux-compat.h                |  1 -\n drivers/usb/musb-new/linux-compat.h            |  2 -\n include/common.h                               |  6 +-\n include/linux/compat.h                         | 11 ----\n include/linux/mtd/mtd.h                        | 10 +---\n include/linux/printk.h                         | 77 ++++++++++++++++++++++++++\n 9 files changed, 79 insertions(+), 39 deletions(-)\n create mode 100644 include/linux/printk.h",
    "diff": "diff --git a/arch/arm/mach-uniphier/dram_init.c b/arch/arm/mach-uniphier/dram_init.c\nindex 32d3593..2213685 100644\n--- a/arch/arm/mach-uniphier/dram_init.c\n+++ b/arch/arm/mach-uniphier/dram_init.c\n@@ -15,9 +15,6 @@\n #include \"sg-regs.h\"\n #include \"soc-info.h\"\n \n-#define pr_warn(fmt, args...)\tprintf(fmt, ##args)\n-#define pr_err(fmt, args...)\tprintf(fmt, ##args)\n-\n DECLARE_GLOBAL_DATA_PTR;\n \n struct uniphier_memif_data {\ndiff --git a/arch/arm/mach-uniphier/init.h b/arch/arm/mach-uniphier/init.h\nindex 29f638d..da20935 100644\n--- a/arch/arm/mach-uniphier/init.h\n+++ b/arch/arm/mach-uniphier/init.h\n@@ -104,9 +104,4 @@ int uniphier_have_internal_stm(void);\n int uniphier_boot_from_backend(void);\n int uniphier_pin_init(const char *pinconfig_name);\n \n-#undef pr_warn\n-#define pr_warn(fmt, args...)\tprintf(fmt, ##args)\n-#undef pr_err\n-#define pr_err(fmt, args...)\tprintf(fmt, ##args)\n-\n #endif /* __MACH_INIT_H */\ndiff --git a/drivers/bios_emulator/include/x86emu/x86emui.h b/drivers/bios_emulator/include/x86emu/x86emui.h\nindex a74957d..3537255 100644\n--- a/drivers/bios_emulator/include/x86emu/x86emui.h\n+++ b/drivers/bios_emulator/include/x86emu/x86emui.h\n@@ -72,9 +72,6 @@\n #include <string.h>\n #endif\n \n-#define printk printf\n-\n-\n /*--------------------------- Inline Functions ----------------------------*/\n \n #ifdef  __cplusplus\ndiff --git a/drivers/usb/dwc3/linux-compat.h b/drivers/usb/dwc3/linux-compat.h\nindex 9e944a3..64db4ec 100644\n--- a/drivers/usb/dwc3/linux-compat.h\n+++ b/drivers/usb/dwc3/linux-compat.h\n@@ -12,7 +12,6 @@\n #ifndef __DWC3_LINUX_COMPAT__\n #define __DWC3_LINUX_COMPAT__\n \n-#define pr_debug(format)                debug(format)\n #define WARN(val, format, arg...)\tdebug(format, ##arg)\n #define dev_WARN(dev, format, arg...)\tdebug(format, ##arg)\n #define WARN_ON_ONCE(val)\t\tdebug(\"Error %d\\n\", val)\ndiff --git a/drivers/usb/musb-new/linux-compat.h b/drivers/usb/musb-new/linux-compat.h\nindex 4dae83e..7bb53d2 100644\n--- a/drivers/usb/musb-new/linux-compat.h\n+++ b/drivers/usb/musb-new/linux-compat.h\n@@ -5,8 +5,6 @@\n #include <linux/list.h>\n #include <linux/compat.h>\n \n-#define pr_debug(fmt, args...) debug(fmt, ##args)\n-\n #define WARN(condition, fmt, args...) ({\t\\\n \tint ret_warn = !!condition;\t\t\\\n \tif (ret_warn)\t\t\t\t\\\ndiff --git a/include/common.h b/include/common.h\nindex aaed131..ae3b876 100644\n--- a/include/common.h\n+++ b/include/common.h\n@@ -25,6 +25,7 @@ typedef volatile unsigned char\tvu_char;\n #include <linux/bitops.h>\n #include <linux/delay.h>\n #include <linux/types.h>\n+#include <linux/printk.h>\n #include <linux/string.h>\n #include <linux/stringify.h>\n #include <asm/ptrace.h>\n@@ -54,11 +55,6 @@ typedef volatile unsigned char\tvu_char;\n #define _SPL_BUILD\t0\n #endif\n \n-/* Define this at the top of a file to add a prefix to debug messages */\n-#ifndef pr_fmt\n-#define pr_fmt(fmt) fmt\n-#endif\n-\n /*\n  * Output a debug text when condition \"cond\" is met. The \"cond\" should be\n  * computed by a preprocessor in the best case, allowing for the best\ndiff --git a/include/linux/compat.h b/include/linux/compat.h\nindex 2336b56..bc027ad 100644\n--- a/include/linux/compat.h\n+++ b/include/linux/compat.h\n@@ -25,17 +25,6 @@ extern struct p_current *current;\n \tprintf(fmt, ##args)\n #define dev_warn(dev, fmt, args...)\t\t\\\n \tprintf(fmt, ##args)\n-#define printk\tprintf\n-#define printk_once\tprintf\n-\n-#define KERN_EMERG\n-#define KERN_ALERT\n-#define KERN_CRIT\n-#define KERN_ERR\n-#define KERN_WARNING\n-#define KERN_NOTICE\n-#define KERN_INFO\n-#define KERN_DEBUG\n \n #define GFP_ATOMIC ((gfp_t) 0)\n #define GFP_KERNEL ((gfp_t) 0)\ndiff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h\nindex 1fd17c3..3e1694b 100644\n--- a/include/linux/mtd/mtd.h\n+++ b/include/linux/mtd/mtd.h\n@@ -452,28 +452,20 @@ static inline void mtd_erase_callback(struct erase_info *instr)\n #define MTD_DEBUG_LEVEL3\t(3)\t/* Noisy   */\n \n #ifdef CONFIG_MTD_DEBUG\n-#define pr_debug(args...)\tMTDDEBUG(MTD_DEBUG_LEVEL0, args)\n #define MTDDEBUG(n, args...)\t\t\t\t\\\n \tdo {\t\t\t\t\t\t\\\n \t\tif (n <= CONFIG_MTD_DEBUG_VERBOSE)\t\\\n \t\t\tprintk(KERN_INFO args);\t\t\\\n \t} while(0)\n #else /* CONFIG_MTD_DEBUG */\n-#define pr_debug(args...)\n #define MTDDEBUG(n, args...)\t\t\t\t\\\n \tdo {\t\t\t\t\t\t\\\n \t\tif (0)\t\t\t\t\t\\\n \t\t\tprintk(KERN_INFO args);\t\t\\\n \t} while(0)\n #endif /* CONFIG_MTD_DEBUG */\n-#define pr_info(args...)\tMTDDEBUG(MTD_DEBUG_LEVEL0, args)\n-#define pr_warn(args...)\tMTDDEBUG(MTD_DEBUG_LEVEL0, args)\n-#define pr_err(args...)\t\tMTDDEBUG(MTD_DEBUG_LEVEL0, args)\n-#define pr_crit(args...)\tMTDDEBUG(MTD_DEBUG_LEVEL0, args)\n-#define pr_cont(args...)\tMTDDEBUG(MTD_DEBUG_LEVEL0, args)\n-#define pr_notice(args...)\tMTDDEBUG(MTD_DEBUG_LEVEL0, args)\n #endif\n- \n+\n static inline int mtd_is_bitflip(int err) {\n \treturn err == -EUCLEAN;\n }\ndiff --git a/include/linux/printk.h b/include/linux/printk.h\nnew file mode 100644\nindex 0000000..3752567\n--- /dev/null\n+++ b/include/linux/printk.h\n@@ -0,0 +1,77 @@\n+#ifndef __KERNEL_PRINTK__\n+#define __KERNEL_PRINTK__\n+\n+#include <linux/compiler.h>\n+\n+#define KERN_EMERG\n+#define KERN_ALERT\n+#define KERN_CRIT\n+#define KERN_ERR\n+#define KERN_WARNING\n+#define KERN_NOTICE\n+#define KERN_INFO\n+#define KERN_DEBUG\n+#define KERN_CONT\n+\n+__printf(1, 2) int printf(const char *fmt, ...);\n+\n+/*\n+ * Dummy printk for disabled debugging statements to use whilst maintaining\n+ * gcc's format checking.\n+ */\n+#define no_printk(fmt, ...)\t\t\t\t\\\n+({\t\t\t\t\t\t\t\\\n+\tdo {\t\t\t\t\t\t\\\n+\t\tif (0)\t\t\t\t\t\\\n+\t\t\tprintk(fmt, ##__VA_ARGS__);\t\\\n+\t} while (0);\t\t\t\t\t\\\n+\t0;\t\t\t\t\t\t\\\n+})\n+\n+#define printk(fmt, ...) \\\n+\tprintf(fmt, ##__VA_ARGS__)\n+\n+#ifndef pr_fmt\n+#define pr_fmt(fmt) fmt\n+#endif\n+\n+#define pr_emerg(fmt, ...) \\\n+\tprintk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)\n+#define pr_alert(fmt, ...) \\\n+\tprintk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)\n+#define pr_crit(fmt, ...) \\\n+\tprintk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)\n+#define pr_err(fmt, ...) \\\n+\tprintk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)\n+#define pr_warning(fmt, ...) \\\n+\tprintk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)\n+#define pr_warn pr_warning\n+#define pr_notice(fmt, ...) \\\n+\tprintk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)\n+#define pr_info(fmt, ...) \\\n+\tprintk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)\n+\n+#define pr_cont(fmt, ...) \\\n+\tprintk(KERN_CONT fmt, ##__VA_ARGS__)\n+\n+/* pr_devel() should produce zero code unless DEBUG is defined */\n+#ifdef DEBUG\n+#define pr_devel(fmt, ...) \\\n+\tprintk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)\n+#else\n+#define pr_devel(fmt, ...) \\\n+\tno_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)\n+#endif\n+\n+#ifdef DEBUG\n+#define pr_debug(fmt, ...) \\\n+\tprintk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)\n+#else\n+#define pr_debug(fmt, ...) \\\n+\tno_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)\n+#endif\n+\n+#define printk_once(fmt, ...) \\\n+\tprintk(fmt, ##__VA_ARGS__)\n+\n+#endif\n",
    "prefixes": [
        "U-Boot",
        "1/6"
    ]
}