get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1191947,
    "url": "http://patchwork.ozlabs.org/api/patches/1191947/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20191108130123.6839-33-linux@rasmusvillemoes.dk/",
    "project": {
        "id": 2,
        "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api",
        "name": "Linux PPC development",
        "link_name": "linuxppc-dev",
        "list_id": "linuxppc-dev.lists.ozlabs.org",
        "list_email": "linuxppc-dev@lists.ozlabs.org",
        "web_url": "https://github.com/linuxppc/wiki/wiki",
        "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git",
        "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/",
        "list_archive_url": "https://lore.kernel.org/linuxppc-dev/",
        "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/",
        "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"
    },
    "msgid": "<20191108130123.6839-33-linux@rasmusvillemoes.dk>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20191108130123.6839-33-linux@rasmusvillemoes.dk/",
    "date": "2019-11-08T13:01:08",
    "name": "[v4,32/47] serial: ucc_uart: use of_property_read_u32() in ucc_uart_probe()",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "59bc7f88d9d56cd2580d33715f4050056d6110fa",
    "submitter": {
        "id": 27394,
        "url": "http://patchwork.ozlabs.org/api/people/27394/?format=api",
        "name": "Rasmus Villemoes",
        "email": "linux@rasmusvillemoes.dk"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20191108130123.6839-33-linux@rasmusvillemoes.dk/mbox/",
    "series": [
        {
            "id": 141654,
            "url": "http://patchwork.ozlabs.org/api/series/141654/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=141654",
            "date": "2019-11-08T13:00:38",
            "name": "QUICC Engine support on ARM and ARM64",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/141654/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1191947/comments/",
    "check": "success",
    "checks": "http://patchwork.ozlabs.org/api/patches/1191947/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>",
        "X-Original-To": [
            "patchwork-incoming@ozlabs.org",
            "linuxppc-dev@lists.ozlabs.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@ozlabs.org",
            "linuxppc-dev@lists.ozlabs.org"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (4096 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 478k2n6BjCz9s4Y\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat,  9 Nov 2019 02:00:01 +1100 (AEDT)",
            "from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 478k2n3Ck1zF6SK\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat,  9 Nov 2019 02:00:01 +1100 (AEDT)",
            "from mail-lf1-x144.google.com (mail-lf1-x144.google.com\n\t[IPv6:2a00:1450:4864:20::144])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (2048 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 478gQr168QzF6tP\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tSat,  9 Nov 2019 00:02:12 +1100 (AEDT)",
            "by mail-lf1-x144.google.com with SMTP id v8so4386308lfa.12\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri, 08 Nov 2019 05:02:11 -0800 (PST)",
            "from prevas-ravi.prevas.se ([81.216.59.226])\n\tby smtp.gmail.com with ESMTPSA id\n\td28sm2454725lfn.33.2019.11.08.05.02.07\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 08 Nov 2019 05:02:08 -0800 (PST)"
        ],
        "Authentication-Results": [
            "ozlabs.org; dmarc=none (p=none dis=none)\n\theader.from=rasmusvillemoes.dk",
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=rasmusvillemoes.dk header.i=@rasmusvillemoes.dk\n\theader.b=\"aPlA/IoE\"; dkim-atps=neutral",
            "lists.ozlabs.org; spf=pass (sender SPF authorized)\n\tsmtp.mailfrom=rasmusvillemoes.dk (client-ip=2a00:1450:4864:20::144;\n\thelo=mail-lf1-x144.google.com; envelope-from=linux@rasmusvillemoes.dk;\n\treceiver=<UNKNOWN>)",
            "lists.ozlabs.org; dmarc=none (p=none dis=none)\n\theader.from=rasmusvillemoes.dk",
            "lists.ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=rasmusvillemoes.dk header.i=@rasmusvillemoes.dk\n\theader.b=\"aPlA/IoE\"; dkim-atps=neutral"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=rasmusvillemoes.dk; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=D4oV4L5jtcWTxjf1oA8VyXP7dsMMZPn/dF9MUNC7L/c=;\n\tb=aPlA/IoEhffEEFblnc9V412rJ8ksNjaxqTklchpJf/K3W357zmqd5+CvTMVOjUGR9f\n\tvHpBOP8gHlMWtsf0tBnmICEexywoHMojiuEDFPSR7FbopkcwuW99c0TFG3mLnJli/rDJ\n\tuIN1m9iOBe+LG2yqEIrL2SRuPet7yWk+uHSH4=",
        "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:mime-version:content-transfer-encoding;\n\tbh=D4oV4L5jtcWTxjf1oA8VyXP7dsMMZPn/dF9MUNC7L/c=;\n\tb=DWKTWavihiIH8jI72kXSb8Cdj50AfG+W8dapx6xKQ4wJd1U7YEAPjzF++wMAQSR/8D\n\tpHf3X2CE3Q/xy10zGjmxqeXyI262qP8rKDHpkmfXDHh9+BvDbmA9DmrKrU/q/CADX9i4\n\tAtxZrdEjScf/EaGftuaZHEqhG3LlyX98oEgp1fxDN7vurWtJZaLjBJ3tIgw7W/gVxs98\n\tqOwpSxdYsi6KB2whxbSgphivwnoIUo4t6E4Rt6OpKNRAO8wWcDJdU9mFidEAeL2DC04z\n\tyWdNiAuaCwK+dwarMjILFMfUfrOnYf2XaLYRqM6KCLXQT5T2irm1y5wnmbXSsIfwSa61\n\tmtfg==",
        "X-Gm-Message-State": "APjAAAVOEXnZnEMHmWxnCLVRTceXOT2BZeRbdDheK73R6cG4eHpish8c\n\ty/6Z4Y8iv1nFg9R6r6tAo2U8Rw==",
        "X-Google-Smtp-Source": "APXvYqx/gMz4mkd5jKISKNXvWqvyaBmxQjDUwz3+6YpcYYTuJ8t1hWtanWE3i6cbS5YimIzMWNnZtg==",
        "X-Received": "by 2002:a19:911c:: with SMTP id t28mr6379304lfd.84.1573218128817;\n\tFri, 08 Nov 2019 05:02:08 -0800 (PST)",
        "From": "Rasmus Villemoes <linux@rasmusvillemoes.dk>",
        "To": "Qiang Zhao <qiang.zhao@nxp.com>, Li Yang <leoyang.li@nxp.com>,\n\tChristophe Leroy <christophe.leroy@c-s.fr>",
        "Subject": "[PATCH v4 32/47] serial: ucc_uart: use of_property_read_u32() in\n\tucc_uart_probe()",
        "Date": "Fri,  8 Nov 2019 14:01:08 +0100",
        "Message-Id": "<20191108130123.6839-33-linux@rasmusvillemoes.dk>",
        "X-Mailer": "git-send-email 2.23.0",
        "In-Reply-To": "<20191108130123.6839-1-linux@rasmusvillemoes.dk>",
        "References": "<20191108130123.6839-1-linux@rasmusvillemoes.dk>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "linuxppc-dev@lists.ozlabs.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>",
        "List-Unsubscribe": "<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.ozlabs.org/pipermail/linuxppc-dev/>",
        "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>",
        "List-Help": "<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>",
        "List-Subscribe": "<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>",
        "Cc": "Rasmus Villemoes <linux@rasmusvillemoes.dk>, linux-kernel@vger.kernel.org,\n\tScott Wood <oss@buserror.net>, linux-serial@vger.kernel.org,\n\tlinuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org",
        "Errors-To": "linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org",
        "Sender": "\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"
    },
    "content": "For this to work correctly on little-endian hosts, don't access the\ndevice-tree properties directly in native endianness, but use the\nof_property_read_u32() helper.\n\nSigned-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>\n---\n drivers/tty/serial/ucc_uart.c | 41 +++++++++++++++--------------------\n 1 file changed, 17 insertions(+), 24 deletions(-)",
    "diff": "diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c\nindex 313697842e24..f5ea84928a3b 100644\n--- a/drivers/tty/serial/ucc_uart.c\n+++ b/drivers/tty/serial/ucc_uart.c\n@@ -1256,10 +1256,10 @@ static int soft_uart_init(struct platform_device *ofdev)\n static int ucc_uart_probe(struct platform_device *ofdev)\n {\n \tstruct device_node *np = ofdev->dev.of_node;\n-\tconst unsigned int *iprop;      /* Integer OF properties */\n \tconst char *sprop;      /* String OF properties */\n \tstruct uart_qe_port *qe_port = NULL;\n \tstruct resource res;\n+\tu32 val;\n \tint ret;\n \n \t/*\n@@ -1290,23 +1290,19 @@ static int ucc_uart_probe(struct platform_device *ofdev)\n \n \t/* Get the UCC number (device ID) */\n \t/* UCCs are numbered 1-7 */\n-\tiprop = of_get_property(np, \"cell-index\", NULL);\n-\tif (!iprop) {\n-\t\tiprop = of_get_property(np, \"device-id\", NULL);\n-\t\tif (!iprop) {\n-\t\t\tdev_err(&ofdev->dev, \"UCC is unspecified in \"\n-\t\t\t\t\"device tree\\n\");\n-\t\t\tret = -EINVAL;\n-\t\t\tgoto out_free;\n-\t\t}\n+\tif (of_property_read_u32(np, \"cell-index\", &val) &&\n+\t    of_property_read_u32(np, \"device-id\", &val)) {\n+\t\tdev_err(&ofdev->dev, \"UCC is unspecified in device tree\\n\");\n+\t\tret = -EINVAL;\n+\t\tgoto out_free;\n \t}\n \n-\tif ((*iprop < 1) || (*iprop > UCC_MAX_NUM)) {\n-\t\tdev_err(&ofdev->dev, \"no support for UCC%u\\n\", *iprop);\n+\tif (val < 1 || val > UCC_MAX_NUM) {\n+\t\tdev_err(&ofdev->dev, \"no support for UCC%u\\n\", val);\n \t\tret = -ENODEV;\n \t\tgoto out_free;\n \t}\n-\tqe_port->ucc_num = *iprop - 1;\n+\tqe_port->ucc_num = val - 1;\n \n \t/*\n \t * In the future, we should not require the BRG to be specified in the\n@@ -1350,13 +1346,12 @@ static int ucc_uart_probe(struct platform_device *ofdev)\n \t}\n \n \t/* Get the port number, numbered 0-3 */\n-\tiprop = of_get_property(np, \"port-number\", NULL);\n-\tif (!iprop) {\n+\tif (of_property_read_u32(np, \"port-number\", &val)) {\n \t\tdev_err(&ofdev->dev, \"missing port-number in device tree\\n\");\n \t\tret = -EINVAL;\n \t\tgoto out_free;\n \t}\n-\tqe_port->port.line = *iprop;\n+\tqe_port->port.line = val;\n \tif (qe_port->port.line >= UCC_MAX_UART) {\n \t\tdev_err(&ofdev->dev, \"port-number must be 0-%u\\n\",\n \t\t\tUCC_MAX_UART - 1);\n@@ -1386,31 +1381,29 @@ static int ucc_uart_probe(struct platform_device *ofdev)\n \t\t}\n \t}\n \n-\tiprop = of_get_property(np, \"brg-frequency\", NULL);\n-\tif (!iprop) {\n+\tif (of_property_read_u32(np, \"brg-frequency\", &val)) {\n \t\tdev_err(&ofdev->dev,\n \t\t       \"missing brg-frequency in device tree\\n\");\n \t\tret = -EINVAL;\n \t\tgoto out_np;\n \t}\n \n-\tif (*iprop)\n-\t\tqe_port->port.uartclk = *iprop;\n+\tif (val)\n+\t\tqe_port->port.uartclk = val;\n \telse {\n \t\t/*\n \t\t * Older versions of U-Boot do not initialize the brg-frequency\n \t\t * property, so in this case we assume the BRG frequency is\n \t\t * half the QE bus frequency.\n \t\t */\n-\t\tiprop = of_get_property(np, \"bus-frequency\", NULL);\n-\t\tif (!iprop) {\n+\t\tif (of_property_read_u32(np, \"bus-frequency\", &val)) {\n \t\t\tdev_err(&ofdev->dev,\n \t\t\t\t\"missing QE bus-frequency in device tree\\n\");\n \t\t\tret = -EINVAL;\n \t\t\tgoto out_np;\n \t\t}\n-\t\tif (*iprop)\n-\t\t\tqe_port->port.uartclk = *iprop / 2;\n+\t\tif (val)\n+\t\t\tqe_port->port.uartclk = val / 2;\n \t\telse {\n \t\t\tdev_err(&ofdev->dev,\n \t\t\t\t\"invalid QE bus-frequency in device tree\\n\");\n",
    "prefixes": [
        "v4",
        "32/47"
    ]
}