get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 30357,
    "url": "https://patches.dpdk.org/api/patches/30357/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1507897902-49657-1-git-send-email-david.hunt@intel.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<1507897902-49657-1-git-send-email-david.hunt@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1507897902-49657-1-git-send-email-david.hunt@intel.com",
    "date": "2017-10-13T12:31:42",
    "name": "[dpdk-dev] examples/power: fix build",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "af11cdbf223fc5a685711592750b932c8ed898d8",
    "submitter": {
        "id": 342,
        "url": "https://patches.dpdk.org/api/people/342/?format=api",
        "name": "Hunt, David",
        "email": "david.hunt@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1507897902-49657-1-git-send-email-david.hunt@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/30357/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/30357/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 8EAE21B6BC;\n\tFri, 13 Oct 2017 14:31:50 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 0BB241B6BB\n\tfor <dev@dpdk.org>; Fri, 13 Oct 2017 14:31:48 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t13 Oct 2017 05:31:48 -0700",
            "from silpixa00397898.ir.intel.com ([10.237.223.116])\n\tby orsmga002.jf.intel.com with ESMTP; 13 Oct 2017 05:31:46 -0700"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.43,371,1503385200\"; d=\"scan'208\";a=\"146100586\"",
        "From": "David Hunt <david.hunt@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net,\n\tDavid Hunt <david.hunt@intel.com>",
        "Date": "Fri, 13 Oct 2017 13:31:42 +0100",
        "Message-Id": "<1507897902-49657-1-git-send-email-david.hunt@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "Subject": "[dpdk-dev] [PATCH] examples/power: fix build",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Remove variable declaration from within for loop.\n\nFixes: f14791a8126e (\"examples/vm_power_mgr: add policy to channels\")\n\nSigned-off-by: David Hunt <david.hunt@intel.com>\n---\n examples/vm_power_manager/channel_monitor.c | 9 ++++++---\n 1 file changed, 6 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c\nindex f16358d..f8e3491 100644\n--- a/examples/vm_power_manager/channel_monitor.c\n+++ b/examples/vm_power_manager/channel_monitor.c\n@@ -169,8 +169,9 @@ update_policy(struct channel_packet *pkt)\n {\n \n \tunsigned int updated = 0;\n+\tint i;\n \n-\tfor (int i = 0; i < MAX_VMS; i++) {\n+\tfor (i = 0; i < MAX_VMS; i++) {\n \t\tif (strcmp(policies[i].pkt.vm_name, pkt->vm_name) == 0) {\n \t\t\tpolicies[i].pkt = *pkt;\n \t\t\tget_pcpu_to_control(&policies[i]);\n@@ -184,7 +185,7 @@ update_policy(struct channel_packet *pkt)\n \t\t}\n \t}\n \tif (!updated) {\n-\t\tfor (int i = 0; i < MAX_VMS; i++) {\n+\t\tfor (i = 0; i < MAX_VMS; i++) {\n \t\t\tif (policies[i].enabled == 0) {\n \t\t\t\tpolicies[i].pkt = *pkt;\n \t\t\t\tget_pcpu_to_control(&policies[i]);\n@@ -543,7 +544,9 @@ run_channel_monitor(void)\n \t\t}\n \t\trte_delay_us(time_period_s*1000000);\n \t\tif (policy_is_set) {\n-\t\t\tfor (int j = 0; j < MAX_VMS; j++) {\n+\t\t\tint j;\n+\n+\t\t\tfor (j = 0; j < MAX_VMS; j++) {\n \t\t\t\tif (policies[j].enabled == 1)\n \t\t\t\t\tapply_policy(&policies[j]);\n \t\t\t}\n",
    "prefixes": [
        "dpdk-dev"
    ]
}