get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1191997,
    "url": "http://patchwork.ozlabs.org/api/patches/1191997/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20191108130123.6839-43-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-43-linux@rasmusvillemoes.dk>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20191108130123.6839-43-linux@rasmusvillemoes.dk/",
    "date": "2019-11-08T13:01:18",
    "name": "[v4,42/47] soc: fsl: qe: avoid IS_ERR_VALUE in ucc_fast.c",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "6c41c1ec2adf2899628e1cae8e3d6b4db57f29ed",
    "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-43-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/1191997/comments/",
    "check": "success",
    "checks": "http://patchwork.ozlabs.org/api/patches/1191997/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 [203.11.71.2])\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 478kq12mGMz9sNT\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat,  9 Nov 2019 02:34:53 +1100 (AEDT)",
            "from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 478kq10PbJzF3bK\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat,  9 Nov 2019 02:34:53 +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 478gR40bZtzF6qp\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tSat,  9 Nov 2019 00:02:24 +1100 (AEDT)",
            "by mail-lf1-x144.google.com with SMTP id d6so4019196lfc.0\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri, 08 Nov 2019 05:02:23 -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.19\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 08 Nov 2019 05:02:20 -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=\"OMJjEfRd\"; 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=\"OMJjEfRd\"; 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=uKxtxAnStDtPqjNJxBgJ+/b3/LBB3oZn+H7vofIc/Cg=;\n\tb=OMJjEfRd48l9yUpyE2357XcIsRJLdOdGu6cqnnbciUlwZHeZovkZpyp0t0N/AXUB0G\n\tmmPymXL+MPaOrKkaQbKIZvzq8vi1p6BeMnR73GkDYliRrt73eSaJgjoKJvIjcrt4ppVh\n\tteAlmhXN/Smyo6qtACnfhoCrC+ohYMOVNT7Ag=",
        "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=uKxtxAnStDtPqjNJxBgJ+/b3/LBB3oZn+H7vofIc/Cg=;\n\tb=bWhPSciw/V2IqipO3ZWwWQOaYRk3rOO7T9qSSNeWqsKxGkM4FEoX2dOQGVB7R4FFxv\n\tHG9tAPKagje7VTtdOyOJ8GWOG0LEhk4fegqWOCfm0jdN9Bhp+fKWPyOuSg7Yi2sEDd2c\n\tYPnPrAc7mTNZnxjT7mpjnVQE/z7EM+vDLP/Sg8dbwk+GUNoRO/gj9R+5sk+94g5MkAiB\n\tV1HyOvhtjHjPN9Rj2efqInbWypLSHjsEomOYwZeGti6cFnlIVmFjXzRaEfrLxilPL/z1\n\tRB9N8faV71xisZo8z/euapXfcG3w4B2mGj0UaRZ1zvHrtoq6xCyZLy76srwDRpMnMc3r\n\tB8qA==",
        "X-Gm-Message-State": "APjAAAX5vByQge/xwXZxYTO6iyevZCgVTJwkVdoTOLYleq+4EaynvVNh\n\trM/tUQS/JqMZ54Xe4C17t/Dnqw==",
        "X-Google-Smtp-Source": "APXvYqzW9GccVQq0zDWdsR9ctlnzwu1b/T1nps4OEjOIXr9eNiXW/Fjo4xt7Q+aH6wPhZ4yaknWlsg==",
        "X-Received": "by 2002:a19:706:: with SMTP id 6mr1175198lfh.93.1573218140577;\n\tFri, 08 Nov 2019 05:02:20 -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 42/47] soc: fsl: qe: avoid IS_ERR_VALUE in ucc_fast.c",
        "Date": "Fri,  8 Nov 2019 14:01:18 +0100",
        "Message-Id": "<20191108130123.6839-43-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": "Scott Wood <oss@buserror.net>,\n\tRasmus Villemoes <linux@rasmusvillemoes.dk>, \n\tlinuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,\n\tlinux-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": "When building this on a 64-bit platform gcc rightly warns that the\nerror checking is broken (-ENOMEM stored in an u32 does not compare\ngreater than (unsigned long)-MAX_ERRNO). Instead, change the\nucc_fast_[tr]x_virtual_fifo_base_offset members to s32 and use an\nordinary check-for-negative. Also, this avoids treating 0 as \"this\ncannot have been returned from qe_muram_alloc() so don't free it\".\n\nSigned-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>\n---\n drivers/soc/fsl/qe/ucc_fast.c | 15 ++++++---------\n include/soc/fsl/qe/ucc_fast.h |  4 ++--\n 2 files changed, 8 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/drivers/soc/fsl/qe/ucc_fast.c b/drivers/soc/fsl/qe/ucc_fast.c\nindex ca0452497a20..ad6193ea4597 100644\n--- a/drivers/soc/fsl/qe/ucc_fast.c\n+++ b/drivers/soc/fsl/qe/ucc_fast.c\n@@ -197,6 +197,8 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc\n \t\t\t__func__);\n \t\treturn -ENOMEM;\n \t}\n+\tuccf->ucc_fast_tx_virtual_fifo_base_offset = -1;\n+\tuccf->ucc_fast_rx_virtual_fifo_base_offset = -1;\n \n \t/* Fill fast UCC structure */\n \tuccf->uf_info = uf_info;\n@@ -265,10 +267,9 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc\n \t/* Allocate memory for Tx Virtual Fifo */\n \tuccf->ucc_fast_tx_virtual_fifo_base_offset =\n \t    qe_muram_alloc(uf_info->utfs, UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT);\n-\tif (IS_ERR_VALUE(uccf->ucc_fast_tx_virtual_fifo_base_offset)) {\n+\tif (uccf->ucc_fast_tx_virtual_fifo_base_offset < 0) {\n \t\tprintk(KERN_ERR \"%s: cannot allocate MURAM for TX FIFO\\n\",\n \t\t\t__func__);\n-\t\tuccf->ucc_fast_tx_virtual_fifo_base_offset = 0;\n \t\tucc_fast_free(uccf);\n \t\treturn -ENOMEM;\n \t}\n@@ -278,10 +279,9 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc\n \t\tqe_muram_alloc(uf_info->urfs +\n \t\t\t   UCC_FAST_RECEIVE_VIRTUAL_FIFO_SIZE_FUDGE_FACTOR,\n \t\t\t   UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT);\n-\tif (IS_ERR_VALUE(uccf->ucc_fast_rx_virtual_fifo_base_offset)) {\n+\tif (uccf->ucc_fast_rx_virtual_fifo_base_offset < 0) {\n \t\tprintk(KERN_ERR \"%s: cannot allocate MURAM for RX FIFO\\n\",\n \t\t\t__func__);\n-\t\tuccf->ucc_fast_rx_virtual_fifo_base_offset = 0;\n \t\tucc_fast_free(uccf);\n \t\treturn -ENOMEM;\n \t}\n@@ -384,11 +384,8 @@ void ucc_fast_free(struct ucc_fast_private * uccf)\n \tif (!uccf)\n \t\treturn;\n \n-\tif (uccf->ucc_fast_tx_virtual_fifo_base_offset)\n-\t\tqe_muram_free(uccf->ucc_fast_tx_virtual_fifo_base_offset);\n-\n-\tif (uccf->ucc_fast_rx_virtual_fifo_base_offset)\n-\t\tqe_muram_free(uccf->ucc_fast_rx_virtual_fifo_base_offset);\n+\tqe_muram_free(uccf->ucc_fast_tx_virtual_fifo_base_offset);\n+\tqe_muram_free(uccf->ucc_fast_rx_virtual_fifo_base_offset);\n \n \tif (uccf->uf_regs)\n \t\tiounmap(uccf->uf_regs);\ndiff --git a/include/soc/fsl/qe/ucc_fast.h b/include/soc/fsl/qe/ucc_fast.h\nindex e9cc46042a83..ba0e838f962a 100644\n--- a/include/soc/fsl/qe/ucc_fast.h\n+++ b/include/soc/fsl/qe/ucc_fast.h\n@@ -188,9 +188,9 @@ struct ucc_fast_private {\n \tint stopped_tx;\t\t/* Whether channel has been stopped for Tx\n \t\t\t\t   (STOP_TX, etc.) */\n \tint stopped_rx;\t\t/* Whether channel has been stopped for Rx */\n-\tu32 ucc_fast_tx_virtual_fifo_base_offset;/* pointer to base of Tx\n+\ts32 ucc_fast_tx_virtual_fifo_base_offset;/* pointer to base of Tx\n \t\t\t\t\t\t    virtual fifo */\n-\tu32 ucc_fast_rx_virtual_fifo_base_offset;/* pointer to base of Rx\n+\ts32 ucc_fast_rx_virtual_fifo_base_offset;/* pointer to base of Rx\n \t\t\t\t\t\t    virtual fifo */\n #ifdef STATISTICS\n \tu32 tx_frames;\t\t/* Transmitted frames counter. */\n",
    "prefixes": [
        "v4",
        "42/47"
    ]
}