get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 733158,
    "url": "http://patchwork.ozlabs.org/api/patches/733158/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170227204235.3547639-1-arnd@arndb.de/",
    "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": "<20170227204235.3547639-1-arnd@arndb.de>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20170227204235.3547639-1-arnd@arndb.de/",
    "date": "2017-02-27T20:42:16",
    "name": "staging: fsl-mc: fix warning in DT ranges parser",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "b4ef54f8c7fa3f66370a043d1095982a1ca36f2f",
    "submitter": {
        "id": 30,
        "url": "http://patchwork.ozlabs.org/api/people/30/?format=api",
        "name": "Arnd Bergmann",
        "email": "arnd@arndb.de"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170227204235.3547639-1-arnd@arndb.de/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/733158/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/733158/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.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3vXDRs3nK9z9s8X\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 28 Feb 2017 07:52:41 +1100 (AEDT)",
            "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3vXDRs1hmpzDqLS\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 28 Feb 2017 07:52:41 +1100 (AEDT)",
            "from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73])\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 3vXDQm36dVzDqC0\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tTue, 28 Feb 2017 07:51:43 +1100 (AEDT)",
            "from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de\n\t(mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id\n\t0LlFaA-1c8Ysc0oVy-00azSv; Mon, 27 Feb 2017 21:42:44 +0100"
        ],
        "From": "Arnd Bergmann <arnd@arndb.de>",
        "To": "Stuart Yoder <stuyoder@gmail.com>,\n\tLaurentiu Tudor <laurentiu.tudor@nxp.com>,\n\tGreg Kroah-Hartman <gregkh@linuxfoundation.org>",
        "Subject": "[PATCH] staging: fsl-mc: fix warning in DT ranges parser",
        "Date": "Mon, 27 Feb 2017 21:42:16 +0100",
        "Message-Id": "<20170227204235.3547639-1-arnd@arndb.de>",
        "X-Mailer": "git-send-email 2.9.0",
        "X-Provags-ID": "V03:K0:+M0Upr+ca4LFbQB98cVrbxjmFRRwEu5UJyZ0+DeFku8YNDlGW7o\n\tSjUMV3lymeoCDwSBY9KGkuh8CF29QvFCEvE+AMDo+Pge9c4lzG3YwaLQpwlcISfP9dXo7+M\n\t0VrSDuDwk0TITaMzHNYISbUbjIUrQrMEKMn7ehbSnSPSls3+f1Tf2c3b6NQlGu51TQcucdz\n\txu4b0CcxAZSaLA83doomQ==",
        "X-UI-Out-Filterresults": "notjunk:1; V01:K0:TfcU4yRrbvs=:lPUTXW1doyWTvctlhZsIjp\n\t3gvXDhJ/RYr05hsYXz67I1hVLzQxLyQ3l28jzgS9emBe2JFMeIScseKMO8493myoBz8PhZRDh\n\tf8Rl3TmLf7y7wsiqlaURAQx1eq1ZFLne76HPIDyYL9D4XLqkFVSNlqctF3qNjOsfofAr0Nurq\n\tsEsd7Xdti7imfTa+wwHvR2LQnFQgdlw8YV3NEWpJ6YBplZFd2/OTz3xhrSgQRHeTeKuabh+EM\n\tMqwC2p7VCnXXP73kyiwCVWuld0mH5T/BncSbuF27DzVHllNVDxE0W3L1AeDHVjxYpp2RDCs8G\n\tMd+mzRqGoL1Pf3wB7zP37klCwdl7r2zHCttoEl5EPbWprfezB312lf6nwbtyyCTNKLuWfpaIq\n\to4TFoU6BJ6LSNCCA1kXOstUlPgzLsaAL2IE81rPrg+Uy5ypKJE8KfVX/xG381p/NIxXBYMSwa\n\tQwvkfdVgQ6yH1PzFvZklgdxe6kPxyPBn0vLGbadxGD4Du27owT6NI3i6iDasAauFpUTZq3WKM\n\tN6+kPXAp5/lhQM5x/OlqtAIZLKLbhEIrJdxsLF9JB2dL4yBqPHoyC9WV3O8ofg/EGGqFroXWM\n\tmra0gNco+LZr0v9RkYqmxPXTEgqd2qhFHuyypJtjGodWMoG4SbixYPNlBGc6Ra16EpH/p+S0n\n\t8UAKS7ZhNFKrNCdss/N6i2VUMAUJdueY4QLSRDIqmVXOhXGp3nKRNqZWLKcawoqH4CFw=",
        "X-BeenThere": "linuxppc-dev@lists.ozlabs.org",
        "X-Mailman-Version": "2.1.23",
        "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": "devel@driverdev.osuosl.org, devicetree@vger.kernel.org,\n\tRamiro Oliveira <Ramiro.Oliveira@synopsys.com>,\n\tArnd Bergmann <arnd@arndb.de>, \n\tlinuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,\n\tRob Herring <robh+dt@kernel.org>, German Rivera <german.rivera@nxp.com>, \n\tFrank Rowand <frowand.list@gmail.com>, Itai Katz <itai.katz@nxp.com>, \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": "The fsl-mc-bus driver in staging contains a copy of the standard\n'ranges' property parsing algorithm with a hack to treat a missing\nproperty the same way as an empty one. This code produces false-positive\nwarnings for me in an allmodconfig build:\n\ndrivers/staging/fsl-mc/bus/fsl-mc-bus.c: In function 'fsl_mc_bus_probe':\ndrivers/staging/fsl-mc/bus/fsl-mc-bus.c:645:6: error: 'mc_size_cells' may be used uninitialized in this function [-Werror=maybe-uninitialized]\ndrivers/staging/fsl-mc/bus/fsl-mc-bus.c:682:8: error: 'mc_addr_cells' may be used uninitialized in this function [-Werror=maybe-uninitialized]\ndrivers/staging/fsl-mc/bus/fsl-mc-bus.c:644:6: note: 'mc_addr_cells' was declared here\ndrivers/staging/fsl-mc/bus/fsl-mc-bus.c:684:8: error: 'paddr_cells' may be used uninitialized in this function [-Werror=maybe-uninitialized]\ndrivers/staging/fsl-mc/bus/fsl-mc-bus.c:643:6: note: 'paddr_cells' was declared here\n\nTo avoid the warnings, I'm simplifying the argument handling to pass\nthe number of valid ranges in the property as the function return code\nrather than passing it by reference. With this change, gcc can see that\nwe don't evaluate the cell numbers for an missing ranges property.\n\nSigned-off-by: Arnd Bergmann <arnd@arndb.de>\n---\n drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 22 +++++++++-------------\n 1 file changed, 9 insertions(+), 13 deletions(-)",
    "diff": "diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c\nindex 47acb0a29842..3be5f25ff113 100644\n--- a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c\n+++ b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c\n@@ -588,8 +588,7 @@ static int parse_mc_ranges(struct device *dev,\n \t\t\t   int *paddr_cells,\n \t\t\t   int *mc_addr_cells,\n \t\t\t   int *mc_size_cells,\n-\t\t\t   const __be32 **ranges_start,\n-\t\t\t   u8 *num_ranges)\n+\t\t\t   const __be32 **ranges_start)\n {\n \tconst __be32 *prop;\n \tint range_tuple_cell_count;\n@@ -602,8 +601,6 @@ static int parse_mc_ranges(struct device *dev,\n \t\tdev_warn(dev,\n \t\t\t \"missing or empty ranges property for device tree node '%s'\\n\",\n \t\t\t mc_node->name);\n-\n-\t\t*num_ranges = 0;\n \t\treturn 0;\n \t}\n \n@@ -630,8 +627,7 @@ static int parse_mc_ranges(struct device *dev,\n \t\treturn -EINVAL;\n \t}\n \n-\t*num_ranges = ranges_len / tuple_len;\n-\treturn 0;\n+\treturn ranges_len / tuple_len;\n }\n \n static int get_mc_addr_translation_ranges(struct device *dev,\n@@ -639,7 +635,7 @@ static int get_mc_addr_translation_ranges(struct device *dev,\n \t\t\t\t\t\t**ranges,\n \t\t\t\t\t  u8 *num_ranges)\n {\n-\tint error;\n+\tint ret;\n \tint paddr_cells;\n \tint mc_addr_cells;\n \tint mc_size_cells;\n@@ -647,16 +643,16 @@ static int get_mc_addr_translation_ranges(struct device *dev,\n \tconst __be32 *ranges_start;\n \tconst __be32 *cell;\n \n-\terror = parse_mc_ranges(dev,\n+\tret = parse_mc_ranges(dev,\n \t\t\t\t&paddr_cells,\n \t\t\t\t&mc_addr_cells,\n \t\t\t\t&mc_size_cells,\n-\t\t\t\t&ranges_start,\n-\t\t\t\tnum_ranges);\n-\tif (error < 0)\n-\t\treturn error;\n+\t\t\t\t&ranges_start);\n+\tif (ret < 0)\n+\t\treturn ret;\n \n-\tif (!(*num_ranges)) {\n+\t*num_ranges = ret;\n+\tif (!ret) {\n \t\t/*\n \t\t * Missing or empty ranges property (\"ranges;\") for the\n \t\t * 'fsl,qoriq-mc' node. In this case, identity mapping\n",
    "prefixes": []
}