Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/806299/?format=api
{ "id": 806299, "url": "http://patchwork.ozlabs.org/api/patches/806299/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ide/patch/20170827195613.904715064@cogentembedded.com/", "project": { "id": 13, "url": "http://patchwork.ozlabs.org/api/projects/13/?format=api", "name": "Linux IDE development", "link_name": "linux-ide", "list_id": "linux-ide.vger.kernel.org", "list_email": "linux-ide@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170827195613.904715064@cogentembedded.com>", "list_archive_url": null, "date": "2017-08-27T19:55:09", "name": "pata_octeon_cf: use of_property_read_{bool|u32}()", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": false, "hash": "a3b210adfa36aeaba4844b3138671a5a7c5d45ef", "submitter": { "id": 22564, "url": "http://patchwork.ozlabs.org/api/people/22564/?format=api", "name": "Sergei Shtylyov", "email": "sergei.shtylyov@cogentembedded.com" }, "delegate": { "id": 34, "url": "http://patchwork.ozlabs.org/api/users/34/?format=api", "username": "davem", "first_name": "David", "last_name": "Miller", "email": "davem@davemloft.net" }, "mbox": "http://patchwork.ozlabs.org/project/linux-ide/patch/20170827195613.904715064@cogentembedded.com/mbox/", "series": [ { "id": 41, "url": "http://patchwork.ozlabs.org/api/series/41/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ide/list/?series=41", "date": "2017-08-27T19:55:09", "name": "pata_octeon_cf: use of_property_read_{bool|u32}()", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/41/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/806299/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/806299/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linux-ide-owner@vger.kernel.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-ide-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=cogentembedded-com.20150623.gappssmtp.com\n\theader.i=@cogentembedded-com.20150623.gappssmtp.com\n\theader.b=\"ORvJhERa\"; dkim-atps=neutral" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xgQdK2HFJz9s8V\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 28 Aug 2017 05:56:21 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751300AbdH0T4U (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tSun, 27 Aug 2017 15:56:20 -0400", "from mail-lf0-f53.google.com ([209.85.215.53]:34164 \"EHLO\n\tmail-lf0-f53.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751294AbdH0T4T (ORCPT\n\t<rfc822; linux-ide@vger.kernel.org>); Sun, 27 Aug 2017 15:56:19 -0400", "by mail-lf0-f53.google.com with SMTP id d17so15181433lfe.1\n\tfor <linux-ide@vger.kernel.org>; Sun, 27 Aug 2017 12:56:18 -0700 (PDT)", "from wasted.cogentembedded.com ([31.173.80.216])\n\tby smtp.gmail.com with ESMTPSA id\n\td192sm2007659lfe.89.2017.08.27.12.56.14\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSun, 27 Aug 2017 12:56:16 -0700 (PDT)", "by wasted.cogentembedded.com (sSMTP sendmail emulation);\n\tSun, 27 Aug 2017 22:56:13 +0300" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=cogentembedded-com.20150623.gappssmtp.com; s=20150623;\n\th=from:message-id:user-agent:date:to:cc:subject:mime-version\n\t:content-disposition;\n\tbh=hqgIbfFzBoqE3Jf00o1qxQY5jW5m2Cqnj3W5z+bjDmM=;\n\tb=ORvJhERaTs08HFujA3oXj3Fiue4yxACnGctCyOJEiT1770V7wKK1A+QGmKPG+n2kTL\n\tNjvkDazTtZlQlsYc17rX2I5fO+J//so8+w0Gz89ZaZFuMjprrl7aItHrq7pZDkkOWTNU\n\tz9HshBfAYbFm1DlDbBGexuaMm4rHOLTqNgPDFV4N9x8UNZS1VBScgdpzzA7X4SptjLwj\n\tRG2TkYYxYjEp7M9umRRF04kZsWkAwm/3rh2TROGN+s87vX0/4aAMdQlrllReMU3ArKBG\n\tGtOq8gkbx0O0732wcQxqVNagapHURKB1lM17k6fGTWbDfSNkycicdTXLEVqBvqNiGRlV\n\tYIsA==", "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:message-id:user-agent:date:to:cc:subject\n\t:mime-version:content-disposition;\n\tbh=hqgIbfFzBoqE3Jf00o1qxQY5jW5m2Cqnj3W5z+bjDmM=;\n\tb=KUwEtK1Be7cthfzxZCsnHdQdcne0c2EzYZwhAt39pjTTRpyyNRJwwQ5WsOFR3yPxH2\n\tnAPfcAuof3d6UQcUVA/SwONwDgXTjg7JTPfCSiYEY2rQwMWTEB9ZUP3aHYDpdny0aPlc\n\t1QpIpenuoWd9NXSYlcA6Ruf8dWtN1SHNkSD5Cnd0sL+8IWAyDmrxHf0dAOWiBr7TOAiN\n\tTgx3a+uTMzayQwEFK0WWQtDdytx9H/8WnRFJJiqaDmB+BEXbhd0EuiT83NpRHrfnDN7N\n\tADFuyZEcgeyxqm4zxvgy4CGWCii12amihdz65hBzywCW6Nz4+mvkmcy6jccQ0oDl7SnO\n\tZl1g==", "X-Gm-Message-State": "AHYfb5jwSbMhnHuJYt5NrNRk8ezwC9x11DH2/RyIgofpj//NcgY7l4y4\n\tbqhSqNR/J11FzeOo", "X-Received": "by 10.46.69.131 with SMTP id s125mr1959653lja.131.1503863778027; \n\tSun, 27 Aug 2017 12:56:18 -0700 (PDT)", "From": "Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>", "X-Google-Original-From": "\"Sergei Shtylyov\"\n\t<headless@wasted.cogentembedded.com>", "Message-Id": "<20170827195613.904715064@cogentembedded.com>", "User-Agent": "quilt/0.64", "Date": "Sun, 27 Aug 2017 22:55:09 +0300", "To": "Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,\n\tTejun Heo <tj@kernel.org>,\n\tlinux-ide@vger.kernel.org (\"open list:LIBATA PATA DRIVERS\")", "Cc": "linux-mips@linux-mips.org,\n\tSergei Shtylyov <sergei.shtylyov@cogentembedded.com>", "Subject": "[PATCH] pata_octeon_cf: use of_property_read_{bool|u32}()", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=ISO-8859-15", "Content-Disposition": "inline;\n\tfilename=pata_octeon_cf-use-of_property_read_-bool-u32.patch", "Sender": "linux-ide-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<linux-ide.vger.kernel.org>", "X-Mailing-List": "linux-ide@vger.kernel.org" }, "content": "The Octeon CF driver basically open-codes of_property_read_{bool|u32}()\nusing of_{find|get}_property() calls in its probe() method. Using the\nmodern DT APIs saves 2 LoCs and 16 bytes of object code (MIPS gcc 3.4.3).\n\nSigned-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>\n\n---\n drivers/ata/pata_octeon_cf.c | 10 ++++------\n 1 file changed, 4 insertions(+), 6 deletions(-)\n\n\n--\nTo unsubscribe from this list: send the line \"unsubscribe linux-ide\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at http://vger.kernel.org/majordomo-info.html", "diff": "Index: libata/drivers/ata/pata_octeon_cf.c\n===================================================================\n--- libata.orig/drivers/ata/pata_octeon_cf.c\n+++ libata/drivers/ata/pata_octeon_cf.c\n@@ -840,7 +840,6 @@ static int octeon_cf_probe(struct platfo\n \tstruct property *reg_prop;\n \tint n_addr, n_size, reg_len;\n \tstruct device_node *node;\n-\tconst void *prop;\n \tvoid __iomem *cs0;\n \tvoid __iomem *cs1 = NULL;\n \tstruct ata_host *host;\n@@ -850,7 +849,7 @@ static int octeon_cf_probe(struct platfo\n \tvoid __iomem *base;\n \tstruct octeon_cf_port *cf_port;\n \tint rv = -ENOMEM;\n-\n+\tu32 bus_width;\n \n \tnode = pdev->dev.of_node;\n \tif (node == NULL)\n@@ -860,11 +859,10 @@ static int octeon_cf_probe(struct platfo\n \tif (!cf_port)\n \t\treturn -ENOMEM;\n \n-\tcf_port->is_true_ide = (of_find_property(node, \"cavium,true-ide\", NULL) != NULL);\n+\tcf_port->is_true_ide = of_property_read_bool(node, \"cavium,true-ide\");\n \n-\tprop = of_get_property(node, \"cavium,bus-width\", NULL);\n-\tif (prop)\n-\t\tis_16bit = (be32_to_cpup(prop) == 16);\n+\tif (of_property_read_u32(node, \"cavium,bus-width\", &bus_width) == 0)\n+\t\tis_16bit = (bus_width == 16);\n \telse\n \t\tis_16bit = false;\n \n", "prefixes": [] }