get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 814559,
    "url": "http://patchwork.ozlabs.org/api/patches/814559/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20170916212331.170463-14-sjg@chromium.org/",
    "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": "<20170916212331.170463-14-sjg@chromium.org>",
    "list_archive_url": null,
    "date": "2017-09-16T21:23:26",
    "name": "[U-Boot,13/13] log: Add documentation",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "9a7495103c67ad1db27d9bc79debfd628fd6f2bc",
    "submitter": {
        "id": 6170,
        "url": "http://patchwork.ozlabs.org/api/people/6170/?format=api",
        "name": "Simon Glass",
        "email": "sjg@chromium.org"
    },
    "delegate": {
        "id": 3184,
        "url": "http://patchwork.ozlabs.org/api/users/3184/?format=api",
        "username": "sjg",
        "first_name": "Simon",
        "last_name": "Glass",
        "email": "sjg@chromium.org"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20170916212331.170463-14-sjg@chromium.org/mbox/",
    "series": [
        {
            "id": 3473,
            "url": "http://patchwork.ozlabs.org/api/series/3473/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=3473",
            "date": "2017-09-16T21:23:14",
            "name": "log: Add a new logging feature",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/3473/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/814559/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/814559/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=google.com header.i=@google.com\n\theader.b=\"jyodQwJR\"; dkim-atps=neutral"
        ],
        "Received": [
            "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xvlmV3tNHz9sPr\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun, 17 Sep 2017 07:30:18 +1000 (AEST)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid 45F4DC21DDE; Sat, 16 Sep 2017 21:27:15 +0000 (UTC)",
            "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 47A8DC21DA1;\n\tSat, 16 Sep 2017 21:25:46 +0000 (UTC)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid 0F19DC21D63; Sat, 16 Sep 2017 21:24:23 +0000 (UTC)",
            "from mail-oi0-f44.google.com (mail-oi0-f44.google.com\n\t[209.85.218.44])\n\tby lists.denx.de (Postfix) with ESMTPS id 1C3ECC21DCE\n\tfor <u-boot@lists.denx.de>; Sat, 16 Sep 2017 21:24:20 +0000 (UTC)",
            "by mail-oi0-f44.google.com with SMTP id v66so2372352oig.5\n\tfor <u-boot@lists.denx.de>; Sat, 16 Sep 2017 14:24:20 -0700 (PDT)",
            "from kiwi.bld.corp.google.com ([100.101.164.89])\n\tby smtp.gmail.com with ESMTPSA id\n\t199sm597664oie.58.2017.09.16.14.24.15\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSat, 16 Sep 2017 14:24:15 -0700 (PDT)",
            "by kiwi.bld.corp.google.com (Postfix, from userid 121222)\n\tid 3A48C140DF1; Sat, 16 Sep 2017 15:24:15 -0600 (MDT)"
        ],
        "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=RCVD_IN_DNSWL_NONE,\n\tRCVD_IN_MSPIKE_H2,\n\tT_DKIM_INVALID autolearn=unavailable autolearn_force=no\n\tversion=3.4.0",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=20161025; \n\th=sender:from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=mvvIOIERR+c2AI1tQjTCoPHy52He1JqgtBRBI+OaLj4=;\n\tb=jyodQwJRcn+tFZo5+JxLihVHr/UwvexWccZHsHo71YSv+DVRmtSwYdMtcKNhTAPMhi\n\tWQwUbUaHDRoqtm3Q9SGnYG2FkXpTp6/E7XWGyYk0pAdQZE7UmtUajuHK/ZBU4Lh7XMk9\n\tQy9l8UPiHBx2mIY1mWU1wYYUvuyb3eSE0YGkTPQAvOdeYeTcn676hSE1xWapEseXsNOS\n\tpFpcY0f2hTJyUgqZEU/z68H2YekfJiObPzu15gBIRzL19555dj7YceTMteVA1K1IzQVm\n\tqZ4+IcgT4I96S49R+k3M9m45R+MaUAWqudNp59VHriiNwlmcAFprNinpRqT44qV5bje7\n\tOWcg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:from:to:cc:subject:date:message-id\n\t:in-reply-to:references;\n\tbh=mvvIOIERR+c2AI1tQjTCoPHy52He1JqgtBRBI+OaLj4=;\n\tb=tkJL0Q8bxSINP2eX8OSh1ejGPEBpHuP6wzzCXR9T+XwDTZTF/Y7x9Z2laGEHzuqkXu\n\tQND31tdIFaA6aGyXcK8eIpVhMkjjMOJSljLM6u8eRzcTszgoYPx1tLpsODQ3b7h4DY1P\n\t/gwBWVQed1oOq0NT+2etql4q9cEeh/kRg13SXOpDabGJhOIYAOmksRUi7uidLch3qwNO\n\tBBkyC2MFDUabwZIaKYa5VuDWCiYi9nx5mJ/rUQNdmDPb/orCHzOub7yQBFkAoIxke5Mv\n\ti0vTUFIH31IV/QxsiEclqJETvaHjdQUeoRj/iLZQPHdNOiv9fnj29UKY28be5t+COqbV\n\tItmg==",
        "X-Gm-Message-State": "AHPjjUg/KwGMbShlO8jj1XsKswu4QOBy0cQr8iAWgVT9TET26Nlvfrnq\n\tAZKJk2d48+v1bz/Ny/4vfA==",
        "X-Google-Smtp-Source": "AOwi7QBsKTXFbz5rU7aF/5eNa0pPwkj2YBMWqEK8tAR2u9gwG95n1kqMqa9xjkHlJOXXXJe0Xk23Bw==",
        "X-Received": "by 10.202.58.2 with SMTP id h2mr12022557oia.38.1505597058572;\n\tSat, 16 Sep 2017 14:24:18 -0700 (PDT)",
        "From": "Simon Glass <sjg@chromium.org>",
        "To": "U-Boot Mailing List <u-boot@lists.denx.de>",
        "Date": "Sat, 16 Sep 2017 15:23:26 -0600",
        "Message-Id": "<20170916212331.170463-14-sjg@chromium.org>",
        "X-Mailer": "git-send-email 2.14.1.690.gbb1197296e-goog",
        "In-Reply-To": "<20170916212331.170463-1-sjg@chromium.org>",
        "References": "<20170916212331.170463-1-sjg@chromium.org>",
        "Cc": "Tom Rini <trini@konsulko.com>",
        "Subject": "[U-Boot] [PATCH 13/13] log: Add documentation",
        "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": "Add documentation for the log system.\n\nSigned-off-by: Simon Glass <sjg@chromium.org>\n---\n\n doc/README.log | 220 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 220 insertions(+)\n create mode 100644 doc/README.log",
    "diff": "diff --git a/doc/README.log b/doc/README.log\nnew file mode 100644\nindex 0000000000..0f2d8b84dd\n--- /dev/null\n+++ b/doc/README.log\n@@ -0,0 +1,220 @@\n+Logging in U-Boot\n+=================\n+\n+Introduction\n+------------\n+\n+U-Boot's internal operation involves many different steps and actions. From\n+setting up the board to displaying a start-up screen to loading an Operating\n+System, there are many component parts each with many actions.\n+\n+Most of the time this internal detail is not useful. Displaying it on the\n+console would delay booting (U-Boot's primary purpose) and confuse users.\n+\n+But for digging into what is happening in a particular area, or for debugging\n+a problem it is often useful to see what U-Boot is doing in more detail than\n+is visible from the basic console output.\n+\n+U-Boot's logging feature aims to satisfy this goal for both users and\n+developers.\n+\n+\n+Logging levels\n+--------------\n+\n+There are a number logging levels available, in increasing order of verbosity:\n+\n+   LOGL_PANIC\t- Printed before U-Boot halts\n+   LOGL_CRIT\t- Indicates a critical error that will cause boot failure\n+   LOGL_ERR\t- Indicates an error that may cause boot failure\n+   LOGL_WARN\t- Warning about an unexpected condition\n+   LOGL_NOTE\t- Important information about progress\n+   LOGL_INFO\t- Information about normal boot progress\n+   LOGL_DETAIL\t- Detailed information (e.g. internal operation of drivers)\n+   LOGL_DEBUG\t- Debug information (useful for debugging a driver or subsystem)\n+\n+\n+Logging category\n+----------------\n+\n+Logging can come from a wide variety of places within U-Boot. Each log message\n+has a category which is intended to allow messages to be filtered according to\n+their source.\n+\n+The following main categories are defined:\n+\n+   LOGC_NONE\t- Unknown category (e.g. a debug() statement)\n+   UCLASS_...\t- Related to a particular uclass (e.g. UCLASS_USB)\n+   LOGC_ARCH\t- Related to architecture-specific code\n+   LOGC_BOARD\t- Related to board-specific code\n+   LOGC_CORE\t- Related to core driver-model support\n+   LOGC_DT\t- Related to device tree control\n+\n+\n+Enabling logging\n+----------------\n+\n+The following options are used to enable logging at compile time:\n+\n+   CONFIG_LOG\t\t- Enables the logging system\n+   CONFIG_MAX_LOG_LEVEL - Max log level to build (anything higher is compiled\n+\t\t\t\tout)\n+   CONFIG_LOG_CONSOLE\t- Enable writing log records to the console\n+\n+If CONFIG_LOG is not set, then no logging will be available.\n+\n+The above have SPL versions also, e.g. CONFIG_SPL_MAX_LOG_LEVEL.\n+\n+\n+Using DEBUG\n+-----------\n+\n+U-Boot has traditionally used a #define called DEBUG to enable debugging on a\n+file-by-file basis. The debug() macro compiles to a printf() statement if\n+DEBUG is enabled, and an empty statement if not.\n+\n+With logging enabled, debug() statements are interpreted as logging output\n+with a level of LOGL_DEBUG and a category of LOGC_NONE.\n+\n+The logging facilities are intended to replace DEBUG, but if DEBUG is defined\n+at the top of a file, then it takes precedence. This means that debug()\n+statements will result in output to the console and this output will not be\n+logged.\n+\n+\n+Logging destinations\n+--------------------\n+\n+If logging information goes nowhere then it serves no purpose. U-Boot provides\n+several possible determinations for logging information, all of which can be\n+enabled or disabled independently:\n+\n+   console - goes to stdout\n+\n+\n+Filters\n+-------\n+\n+Filters are attached to log drivers to control what those drivers emit. Only\n+records that pass through the filter make it to the driver.\n+\n+Filters can be based on several criteria:\n+\n+   - maximum log level\n+   - in a set of categories\n+   - in a set of files\n+\n+If no filters are attached to a driver then a default filter is used, which\n+limits output to records with a level less than CONFIG_LOG_MAX_LEVEL.\n+\n+\n+Logging statements\n+------------------\n+\n+The main logging function is:\n+\n+   log(category, level, format_string, ...)\n+\n+Also debug() and error() will generate log records  - these use LOG_CATEGORY\n+as the category, so you should #define this right at the top of the source\n+file to ensure the category is correct.\n+\n+\n+Code size\n+---------\n+\n+Code size impact depends largely on what is enabled. The following numbers are\n+for snow, which is a Thumb-2 board:\n+\n+This series: adds bss +20.0 data +4.0 rodata +4.0 text +44.0\n+CONFIG_LOG: bss -52.0 data +92.0 rodata -635.0 text +1048.0\n+CONFIG_LOG_MAX_LEVEL=7: bss +188.0 data +4.0 rodata +49183.0 text +98124.0\n+\n+The last option turns every debug() statement into a logging call, which\n+bloats the code hugely. The advantage is that it is then possible to enable\n+all logging within U-Boot.\n+\n+\n+To Do\n+-----\n+\n+There are lots of useful additions that could be made. None of the below is\n+implemented! If you do one, please add a test in test/py/tests/test_log.py\n+\n+Convenience functions to support setting the category:\n+\n+   log_arch(level, format_string, ...) - category LOGC_ARCH\n+   log_board(level, format_string, ...) - category LOGC_BOARD\n+   log_core(level, format_string, ...) - category LOGC_CORE\n+   log_dt(level, format_string, ...) - category LOGC_DT\n+\n+Convenience functions to support a category defined for a single file, for\n+example:\n+\n+   #define LOG_CATEGORY   UCLASS_USB\n+\n+all of these can use LOG_CATEGORY as the category, and a log level\n+corresponding to the function name:\n+\n+   logc(level, format_string, ...)\n+   pr_panic(format_string, ...)\n+   pr_crit(format_string, ...)\n+   pr_err(format_string, ...)\n+   pr_warn(format_string, ...)\n+   pr_note(format_string, ...)\n+   pr_info(format_string, ...)\n+   pr_detail(format_string, ...)\n+   pr_debug(format_string, ...)\n+\n+More logging destinations:\n+\n+   device - goes to a device (e.g. serial)\n+   buffer - recorded in a memory buffer\n+\n+Convert debug() statements in the code to log() statements\n+\n+Support making printf() emit log statements a L_INFO level\n+\n+Convert error() statements in the code to log() statements\n+\n+Figure out what to do with BUG(), BUG_ON() and warn_non_spl()\n+\n+Figure out what to do with assert()\n+\n+Add a way to browse log records\n+\n+Add a way to record log records for browsing using an external tool\n+\n+Add commands to add and remove filters\n+\n+Add commands to add and remove log devices\n+\n+Allow sharing of printf format strings in log records to reduce storage size\n+for large numbers of log records\n+\n+Add a command-line option to sandbox to set the default logging level\n+\n+Convert core driver model code to use logging\n+\n+Convert uclasses to use logging with the correct category\n+\n+Consider making log() calls emit an automatic newline, perhaps with a logn()\n+   function to avoid that\n+\n+Passing log records through to linux (e.g. via device tree /chosen)\n+\n+Provide a command to access the number of log records generated, and the\n+number dropped due to them being generated before the log system was ready.\n+\n+Add a printf() format string pragma so that log statements are checked properly\n+\n+Enhance the log console driver to show level / category / file / line\n+information\n+\n+Add a command to add new log records and delete existing records.\n+\n+Provide additional log() functions - e.g. logc() to specify the category\n+\n+--\n+Simon Glass <sjg@chromium.org>\n+15-Sep-17\n",
    "prefixes": [
        "U-Boot",
        "13/13"
    ]
}