Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/813400/?format=api
{ "id": 813400, "url": "http://patchwork.ozlabs.org/api/patches/813400/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1505303106-9780-7-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-7-git-send-email-yamada.masahiro@socionext.com>", "list_archive_url": null, "date": "2017-09-13T11:45:06", "name": "[U-Boot,6/6] bug.h: move runtime BUG/WARN macros into <linux/bug.h>", "commit_ref": null, "pull_url": null, "state": "deferred", "archived": false, "hash": "b6ac3cd17acdeb581f2e2202c06c7a8f0e71b819", "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-7-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/813400/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/813400/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=\"ZLChMqyH\"; dkim-atps=neutral" ], "Received": [ "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xsg0y549Fz9s7g\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 21:48:50 +1000 (AEST)", "by lists.denx.de (Postfix, from userid 105)\n\tid 56609C220AA; Wed, 13 Sep 2017 11:47:02 +0000 (UTC)", "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id F175DC22606;\n\tWed, 13 Sep 2017 11:45:45 +0000 (UTC)", "by lists.denx.de (Postfix, from userid 105)\n\tid 02A1BC220CB; 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 EAE8FC22521\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 v8DBjE4t018351;\n\tWed, 13 Sep 2017 20:45:20 +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 v8DBjE4t018351", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com;\n\ts=dec2015msa; t=1505303121;\n\tbh=+sRqIcFE+69+EyVw9ph5oCFjxICzh6Xbafzl0a7O/z4=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=ZLChMqyHh6OprVkbOy9afLq0scuxtRTZ5fKM/7WgV/nUkaWihbkpIxabH3+4mAfWF\n\tbDXQDFwF5hFxyzLxmhEF+Ds9p2Sx/Z+dA/X+KZmuquhiV8YEXXitgLjHRBV6FXxU1+\n\tdesfr4Q+PvCm8/pmxn5UGom/JCdiJcQ82JlIrRujks4C8WX/kWrfJD5mlXswwky4Bx\n\tzkGq4YTSS76jg1jhP/8Mom++drzl9WsM2M5FaCmhkJQiy2c9bAB3jNQ2KIr4D9TtgF\n\tkB6uc1Q91qAbeSXuLP57/z5+R47qNg6Dkp1A/U6Be/agGIHOZdNu/HZtirPFYwAdSY\n\tOUO6AoON4B0Zg==", "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:06 +0900", "Message-Id": "<1505303106-9780-7-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>", "Subject": "[U-Boot] [PATCH 6/6] bug.h: move runtime BUG/WARN macros into\n\t<linux/bug.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": "<common.h> and <linux/bug.h> define BUG(_ON) in a different way.\nTo avoid the conflict, they wrap the defines with #ifndef BUG,\nenabling the first-included one. Horrible.\n\nCollect them into a self-contained header <linux/bug.h> to make\nthese macros easier to use.\n\nSigned-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>\n---\n\n drivers/usb/dwc3/linux-compat.h | 1 -\n include/common.h | 9 +--------\n include/linux/bug.h | 28 ++++++++++++++++++++++++++++\n include/linux/compat.h | 15 ---------------\n 4 files changed, 29 insertions(+), 24 deletions(-)", "diff": "diff --git a/drivers/usb/dwc3/linux-compat.h b/drivers/usb/dwc3/linux-compat.h\nindex 64db4ec..5cbe377 100644\n--- a/drivers/usb/dwc3/linux-compat.h\n+++ b/drivers/usb/dwc3/linux-compat.h\n@@ -14,7 +14,6 @@\n \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)\n \n static inline size_t strlcat(char *dest, const char *src, size_t n)\n {\ndiff --git a/include/common.h b/include/common.h\nindex e66b8ff..f5344a0 100644\n--- a/include/common.h\n+++ b/include/common.h\n@@ -23,6 +23,7 @@ typedef volatile unsigned char\tvu_char;\n #include <time.h>\n #include <asm-offsets.h>\n #include <linux/bitops.h>\n+#include <linux/bug.h>\n #include <linux/delay.h>\n #include <linux/types.h>\n #include <linux/printk.h>\n@@ -89,14 +90,6 @@ void __assert_fail(const char *assertion, const char *file, unsigned line,\n \t({ if (!(x) && _DEBUG) \\\n \t\t__assert_fail(#x, __FILE__, __LINE__, __func__); })\n \n-#ifndef BUG\n-#define BUG() do { \\\n-\tprintf(\"BUG: failure at %s:%d/%s()!\\n\", __FILE__, __LINE__, __FUNCTION__); \\\n-\tpanic(\"BUG!\"); \\\n-} while (0)\n-#define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0)\n-#endif /* BUG */\n-\n typedef void (interrupt_handler_t)(void *);\n \n #include <asm/u-boot.h> /* boot information for Linux kernel */\ndiff --git a/include/linux/bug.h b/include/linux/bug.h\nindex 133544c..f07bb71 100644\n--- a/include/linux/bug.h\n+++ b/include/linux/bug.h\n@@ -1,6 +1,34 @@\n #ifndef _LINUX_BUG_H\n #define _LINUX_BUG_H\n \n+#include <vsprintf.h> /* for panic() */\n #include <linux/build_bug.h>\n+#include <linux/compiler.h>\n+#include <linux/printk.h>\n+\n+#define BUG() do { \\\n+\tprintk(\"BUG at %s:%d/%s()!\\n\", __FILE__, __LINE__, __func__); \\\n+\tpanic(\"BUG!\"); \\\n+} while (0)\n+\n+#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)\n+\n+#define WARN_ON(condition) ({\t\t\t\t\t\t\\\n+\tint __ret_warn_on = !!(condition);\t\t\t\t\\\n+\tif (unlikely(__ret_warn_on))\t\t\t\t\t\\\n+\t\tprintk(\"WARNING at %s:%d/%s()!\\n\", __FILE__, __LINE__, __func__); \\\n+\tunlikely(__ret_warn_on);\t\t\t\t\t\\\n+})\n+\n+#define WARN_ON_ONCE(condition)\t({\t\t\t\t\\\n+\tstatic bool __warned;\t\t\t\t\t\\\n+\tint __ret_warn_once = !!(condition);\t\t\t\\\n+\t\t\t\t\t\t\t\t\\\n+\tif (unlikely(__ret_warn_once && !__warned)) {\t\t\\\n+\t\t__warned = true;\t\t\t\t\\\n+\t\tWARN_ON(1);\t\t\t\t\t\\\n+\t}\t\t\t\t\t\t\t\\\n+\tunlikely(__ret_warn_once);\t\t\t\t\\\n+})\n \n #endif\t/* _LINUX_BUG_H */\ndiff --git a/include/linux/compat.h b/include/linux/compat.h\nindex bc027ad..1b3f089 100644\n--- a/include/linux/compat.h\n+++ b/include/linux/compat.h\n@@ -87,21 +87,6 @@ static inline void kmem_cache_destroy(struct kmem_cache *cachep)\n \n #define KERNEL_VERSION(a,b,c)\t(((a) << 16) + ((b) << 8) + (c))\n \n-#ifndef BUG\n-#define BUG() do { \\\n-\tprintf(\"U-Boot BUG at %s:%d!\\n\", __FILE__, __LINE__); \\\n-} while (0)\n-\n-#define BUG_ON(condition) do { if (condition) BUG(); } while(0)\n-#endif /* BUG */\n-\n-#define WARN_ON(condition) ({\t\t\t\t\t\t\\\n-\tint __ret_warn_on = !!(condition);\t\t\t\t\\\n-\tif (unlikely(__ret_warn_on))\t\t\t\t\t\\\n-\t\tprintf(\"WARNING in %s line %d\\n\", __FILE__, __LINE__);\t\\\n-\tunlikely(__ret_warn_on);\t\t\t\t\t\\\n-})\n-\n #define PAGE_SIZE\t4096\n \n /* drivers/char/random.c */\n", "prefixes": [ "U-Boot", "6/6" ] }