get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 777583,
    "url": "http://patchwork.ozlabs.org/api/patches/777583/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/skiboot/patch/20170619060138.5314-6-oohall@gmail.com/",
    "project": {
        "id": 44,
        "url": "http://patchwork.ozlabs.org/api/projects/44/?format=api",
        "name": "skiboot firmware development",
        "link_name": "skiboot",
        "list_id": "skiboot.lists.ozlabs.org",
        "list_email": "skiboot@lists.ozlabs.org",
        "web_url": "http://github.com/open-power/skiboot",
        "scm_url": "http://github.com/open-power/skiboot",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170619060138.5314-6-oohall@gmail.com>",
    "list_archive_url": null,
    "date": "2017-06-19T06:01:38",
    "name": "[6/6] console: excise flush_to_drivers",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "506288d0678b88a056cbfc108adda2997fd815ae",
    "submitter": {
        "id": 68108,
        "url": "http://patchwork.ozlabs.org/api/people/68108/?format=api",
        "name": "Oliver O'Halloran",
        "email": "oohall@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/skiboot/patch/20170619060138.5314-6-oohall@gmail.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/777583/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/777583/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "skiboot@lists.ozlabs.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "skiboot@lists.ozlabs.org"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3wrgQK3NV6z9s76\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 19 Jun 2017 16:03:37 +1000 (AEST)",
            "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3wrgQK2J28zDqhF\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 19 Jun 2017 16:03:37 +1000 (AEST)",
            "from mail-pg0-x243.google.com (mail-pg0-x243.google.com\n\t[IPv6:2607:f8b0:400e:c05::243])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3wrgPP21L0zDqb5\n\tfor <skiboot@lists.ozlabs.org>; Mon, 19 Jun 2017 16:02:48 +1000 (AEST)",
            "by mail-pg0-x243.google.com with SMTP id u62so8578257pgb.0\n\tfor <skiboot@lists.ozlabs.org>; Sun, 18 Jun 2017 23:02:48 -0700 (PDT)",
            "from flat-canetoad.ozlabs.ibm.com ([122.99.82.10])\n\tby smtp.gmail.com with ESMTPSA id\n\tx64sm19638626pff.123.2017.06.18.23.02.45\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSun, 18 Jun 2017 23:02:46 -0700 (PDT)"
        ],
        "Authentication-Results": [
            "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=\"Gk7mBqm+\"; dkim-atps=neutral",
            "lists.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=\"Gk7mBqm+\"; dkim-atps=neutral",
            "lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"Gk7mBqm+\"; dkim-atps=neutral"
        ],
        "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=MG1uxebalZkyrTuybjWrDeeh59zH7NF0w7hY3dlBews=;\n\tb=Gk7mBqm+q6Rf5w8B1GJbc+Cpg27G9Qdy1fKnmM7ELnzKvP/Av3GX5Q9TWV3trL+ypm\n\tRe4Ga6n46H27OKoC9LsjRaa65CbDTRzB2WzsgBlD190pn0VZshfOnOucCKRRf8/XCQ+c\n\txWghUjxDxyag/pEGA1IZ6ppt05nnGsaHZWsV4cQJYObCcnvf/O5phM7l8aZcasjWuwUC\n\tcGkDhu4Y896jKGyvEW3vJSt2hTt0RZS2lW2fb5lBG3b1kkxl0qVRUmYfkIjcRR4MNqTa\n\tL5hQA664blv/hW2jeLJ9s+qzvUTS5qtwkL53Goki8h3lAAiZEkMIQCjMfprPe4KMzxRh\n\t6UzA==",
        "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=MG1uxebalZkyrTuybjWrDeeh59zH7NF0w7hY3dlBews=;\n\tb=joy3SbQhg18EH8gSsskUbBYmOsqYPUaUiElELfhn0/SDvmLCaHz1lMwznkTiW+pcLe\n\t5s7GgW2Adc3HAOPIxbDBmK46+3vKOhOPz1HocNVNf4UW0cnUfpV+HJK9E4E9pefsL7Me\n\toYsmWgK0lBnrj3y4u/+pbStGT2sbig65MWXOhx5kzdtmEPbe0oQYUJD1D/DVw6r0AyFC\n\t2zjw6LnLVZJzrzQz68/CQQhFh/SaOPDdSjTiCxiezoQCgMi/gzmDrDhbNOItGuvjKlnF\n\tZgaEsErd7dwPaED9l/yfcdoWGUOFTBFHM5tL6MFBwCelS92V+uEEoKrCDlqxR2WyotNV\n\t+7PA==",
        "X-Gm-Message-State": "AKS2vOxTZ9FfL+hcxYe4LYfJQgenK1UtCMeVFEfoVdvEuF9KSR30C99W\n\t1PPAnsRLNB6qN3AX",
        "X-Received": "by 10.84.176.3 with SMTP id u3mr27618007plb.119.1497852167003;\n\tSun, 18 Jun 2017 23:02:47 -0700 (PDT)",
        "From": "Oliver O'Halloran <oohall@gmail.com>",
        "To": "skiboot@lists.ozlabs.org",
        "Date": "Mon, 19 Jun 2017 16:01:38 +1000",
        "Message-Id": "<20170619060138.5314-6-oohall@gmail.com>",
        "X-Mailer": "git-send-email 2.9.3",
        "In-Reply-To": "<20170619060138.5314-1-oohall@gmail.com>",
        "References": "<20170619060138.5314-1-oohall@gmail.com>",
        "Subject": "[Skiboot] [PATCH 6/6] console: excise flush_to_drivers",
        "X-BeenThere": "skiboot@lists.ozlabs.org",
        "X-Mailman-Version": "2.1.23",
        "Precedence": "list",
        "List-Id": "Mailing list for skiboot development <skiboot.lists.ozlabs.org>",
        "List-Unsubscribe": "<https://lists.ozlabs.org/options/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.ozlabs.org/pipermail/skiboot/>",
        "List-Post": "<mailto:skiboot@lists.ozlabs.org>",
        "List-Help": "<mailto:skiboot-request@lists.ozlabs.org?subject=help>",
        "List-Subscribe": "<https://lists.ozlabs.org/listinfo/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Errors-To": "skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org",
        "Sender": "\"Skiboot\"\n\t<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"
    },
    "content": "This is no longer used and can be removed.\n\nSigned-off-by: Oliver O'Halloran <oohall@gmail.com>\n---\n core/console-log.c                      |  6 +-----\n core/console.c                          | 20 +++++---------------\n core/test/run-console-flush.c           |  2 +-\n core/test/run-console-log-buf-overrun.c |  5 +----\n core/test/run-console-log-pr_fmt.c      | 16 ++++------------\n core/test/run-console-log.c             | 13 +------------\n include/console.h                       |  2 +-\n 7 files changed, 14 insertions(+), 50 deletions(-)",
    "diff": "diff --git a/core/console-log.c b/core/console-log.c\nindex 0b8cef53fc64..bf000a92b4e9 100644\n--- a/core/console-log.c\n+++ b/core/console-log.c\n@@ -32,7 +32,6 @@ static int vprlog(int log_level, const char *fmt, va_list ap)\n {\n \tint count;\n \tchar buffer[320];\n-\tbool flush_to_drivers = true;\n \tunsigned long tb = mftb();\n \n \t/* It's safe to return 0 when we \"did\" something here\n@@ -50,10 +49,7 @@ static int vprlog(int log_level, const char *fmt, va_list ap)\n \t\t\t tb_to_secs(tb), tb_remaining_nsecs(tb), log_level);\n \tcount+= vsnprintf(buffer+count, sizeof(buffer)-count, fmt, ap);\n \n-\tif (log_level > (debug_descriptor.console_log_levels & 0x0f))\n-\t\tflush_to_drivers = false;\n-\n-\tconsole_write(flush_to_drivers, buffer, count);\n+\tconsole_write(buffer, count);\n \n \treturn count;\n }\ndiff --git a/core/console.c b/core/console.c\nindex fbab5a38e21e..b5679d77695c 100644\n--- a/core/console.c\n+++ b/core/console.c\n@@ -143,7 +143,7 @@ static int parse_loghdr(int start, int *log_level)\n  * if there is more to go, but that only happens when the\n  * underlying driver failed so don't call it again.\n  */\n-static bool __flush_console(bool flush_to_drivers __unused)\n+static bool __flush_console(void)\n {\n \tint flush_lvl = debug_descriptor.console_log_levels & 0xf;\n \tstruct cpu_thread *cpu = this_cpu();\n@@ -179,16 +179,6 @@ static bool __flush_console(bool flush_to_drivers __unused)\n \n \tin_flush = true;\n \n-\t/*\n-\t * NB: this must appear after the in_flush check since it modifies\n-\t *     con_out.\n-\t */\n-\tif (!flush_to_drivers) {\n-\t\tcon_out = con_in;\n-\t\tin_flush = false;\n-\t\treturn false;\n-\t}\n-\n \tdo {\n \t\tint start, req, len, log_lvl;\n \n@@ -234,7 +224,7 @@ bool flush_console(void)\n \tbool ret;\n \n \tlock(&con_lock);\n-\tret = __flush_console(true);\n+\tret = __flush_console();\n \tunlock(&con_lock);\n \n \treturn ret;\n@@ -293,7 +283,7 @@ static void write_char(char c)\n \tinmem_write(c);\n }\n \n-ssize_t console_write(bool flush_to_drivers, const void *buf, size_t count)\n+ssize_t console_write(const void *buf, size_t count)\n {\n \t/* We use recursive locking here as we can get called\n \t * from fairly deep debug path\n@@ -308,7 +298,7 @@ ssize_t console_write(bool flush_to_drivers, const void *buf, size_t count)\n \t\twrite_char(c);\n \t}\n \n-\t__flush_console(flush_to_drivers);\n+\t__flush_console();\n \n \tif (need_unlock)\n \t\tunlock(&con_lock);\n@@ -318,7 +308,7 @@ ssize_t console_write(bool flush_to_drivers, const void *buf, size_t count)\n \n ssize_t write(int fd __unused, const void *buf, size_t count)\n {\n-\treturn console_write(true, buf, count);\n+\treturn console_write(buf, count);\n }\n \n ssize_t read(int fd __unused, void *buf, size_t req_count)\ndiff --git a/core/test/run-console-flush.c b/core/test/run-console-flush.c\nindex 33db0460da8f..3c74b0eaab6d 100644\n--- a/core/test/run-console-flush.c\n+++ b/core/test/run-console-flush.c\n@@ -108,7 +108,7 @@ int main(void)\n \tmemcons.obuf_size = sizeof(console_buffer);\n \n \tpopulate_console(PR_INSANE, PR_NOTICE);\n-\t__flush_console(true);\n+\t__flush_console();\n \n \t/*\n \t * Refill the console buffer dropping everything above PR_NOTICE\ndiff --git a/core/test/run-console-log-buf-overrun.c b/core/test/run-console-log-buf-overrun.c\nindex 01fca9b8f6fb..a2b253e62ce5 100644\n--- a/core/test/run-console-log-buf-overrun.c\n+++ b/core/test/run-console-log-buf-overrun.c\n@@ -53,11 +53,8 @@ static inline unsigned long mftb(void)\n char console_buffer[4096];\n struct debug_descriptor debug_descriptor;\n \n-bool flushed_to_drivers;\n-\n-ssize_t console_write(bool flush_to_drivers, const void *buf, size_t count)\n+ssize_t console_write(const void *buf, size_t count)\n {\n-\tflushed_to_drivers = flush_to_drivers;\n \tmemcpy(console_buffer, buf, count);\n \treturn count;\n }\ndiff --git a/core/test/run-console-log-pr_fmt.c b/core/test/run-console-log-pr_fmt.c\nindex ae9d206cb626..b8204b90ce2b 100644\n--- a/core/test/run-console-log-pr_fmt.c\n+++ b/core/test/run-console-log-pr_fmt.c\n@@ -36,13 +36,10 @@ static inline unsigned long mftb(void)\n #include \"../../libc/stdio/vsnprintf.c\"\n \n struct debug_descriptor debug_descriptor;\n-\n-bool flushed_to_drivers;\n char console_buffer[4096];\n \n-ssize_t console_write(bool flush_to_drivers, const void *buf, size_t count)\n+ssize_t console_write(const void *buf, size_t count)\n {\n-\tflushed_to_drivers = flush_to_drivers;\n \tmemcpy(console_buffer, buf, count);\n \treturn count;\n }\n@@ -51,24 +48,19 @@ int main(void)\n {\n \tdebug_descriptor.console_log_levels = 0x75;\n \n+\t/* check basic functionality */\n \tprlog(PR_EMERG, \"Hello World\");\n \tassert(strcmp(console_buffer, \"[    0.000000042,0] PREFIX: Hello World\") == 0);\n-\tassert(flushed_to_drivers==true);\n \n \tmemset(console_buffer, 0, sizeof(console_buffer));\n \n-\t// Below log level\n+\t/* Below log level is filtered */\n \tprlog(PR_TRACE, \"Hello World\");\n \tassert(console_buffer[0] == 0);\n \n-\t// Should not be flushed to console\n-\tprlog(PR_DEBUG, \"Hello World\");\n-\tassert(strcmp(console_buffer, \"[    0.000000042,7] PREFIX: Hello World\") == 0);\n-\tassert(flushed_to_drivers==false);\n-\n+\t/* check printf */\n \tprintf(\"Hello World\");\n \tassert(strcmp(console_buffer, \"[    0.000000042,5] PREFIX: Hello World\") == 0);\n-\tassert(flushed_to_drivers==true);\n \n \treturn 0;\n }\ndiff --git a/core/test/run-console-log.c b/core/test/run-console-log.c\nindex 01376eee7334..1e2dd5039986 100644\n--- a/core/test/run-console-log.c\n+++ b/core/test/run-console-log.c\n@@ -36,13 +36,10 @@ int _printf(const char* fmt, ...);\n #include \"../console-log.c\"\n \n struct debug_descriptor debug_descriptor;\n-\n-bool flushed_to_drivers;\n char console_buffer[4096];\n \n-ssize_t console_write(bool flush_to_drivers, const void *buf, size_t count)\n+ssize_t console_write(const void *buf, size_t count)\n {\n-\tflushed_to_drivers = flush_to_drivers;\n \tmemcpy(console_buffer, buf, count);\n \treturn count;\n }\n@@ -53,22 +50,14 @@ int main(void)\n \n \tprlog(PR_EMERG, \"Hello World\");\n \tassert(strcmp(console_buffer, \"[    0.000000042,0] Hello World\") == 0);\n-\tassert(flushed_to_drivers==true);\n-\n \tmemset(console_buffer, 0, sizeof(console_buffer));\n \n \t// Below log level\n \tprlog(PR_TRACE, \"Hello World\");\n \tassert(console_buffer[0] == 0);\n \n-\t// Should not be flushed to console\n-\tprlog(PR_DEBUG, \"Hello World\");\n-\tassert(strcmp(console_buffer, \"[    0.000000042,7] Hello World\") == 0);\n-\tassert(flushed_to_drivers==false);\n-\n \tprintf(\"Hello World\");\n \tassert(strcmp(console_buffer, \"[    0.000000042,5] Hello World\") == 0);\n-\tassert(flushed_to_drivers==true);\n \n \treturn 0;\n }\ndiff --git a/include/console.h b/include/console.h\nindex 708b696bf03e..9783e4dee2e3 100644\n--- a/include/console.h\n+++ b/include/console.h\n@@ -86,7 +86,7 @@ extern void console_complete_flush(void);\n extern size_t mambo_console_write(const char *buf, size_t count);\n extern void enable_mambo_console(void);\n \n-ssize_t console_write(bool flush_to_drivers, const void *buf, size_t count);\n+ssize_t console_write(const void *buf, size_t count);\n \n extern void clear_console(void);\n extern void memcons_add_properties(void);\n",
    "prefixes": [
        "6/6"
    ]
}