get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 479152,
    "url": "http://patchwork.ozlabs.org/api/patches/479152/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/FC41C24E35F18A40888AACA1A36F3E418AE6C940@fmsmsx115.amr.corp.intel.com/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api",
        "name": "Intel Wired Ethernet development",
        "link_name": "intel-wired-lan",
        "list_id": "intel-wired-lan.osuosl.org",
        "list_email": "intel-wired-lan@osuosl.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<FC41C24E35F18A40888AACA1A36F3E418AE6C940@fmsmsx115.amr.corp.intel.com>",
    "list_archive_url": null,
    "date": "2015-06-01T19:33:03",
    "name": "i40e: clean up unneeded gotos",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "d117590119fea5ce339607d13c4fd8120e881897",
    "submitter": {
        "id": 21104,
        "url": "http://patchwork.ozlabs.org/api/people/21104/?format=api",
        "name": "Shannon Nelson",
        "email": "shannon.nelson@intel.com"
    },
    "delegate": {
        "id": 68,
        "url": "http://patchwork.ozlabs.org/api/users/68/?format=api",
        "username": "jtkirshe",
        "first_name": "Jeff",
        "last_name": "Kirsher",
        "email": "jeffrey.t.kirsher@intel.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/FC41C24E35F18A40888AACA1A36F3E418AE6C940@fmsmsx115.amr.corp.intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/479152/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/479152/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@lists.osuosl.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Received": [
            "from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133])\n\tby ozlabs.org (Postfix) with ESMTP id E89E01412E0\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  2 Jun 2015 05:33:09 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 39AC8961FE;\n\tMon,  1 Jun 2015 19:33:09 +0000 (UTC)",
            "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id CMmC4ELitP3x; Mon,  1 Jun 2015 19:33:07 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id DD7A9961F0;\n\tMon,  1 Jun 2015 19:33:07 +0000 (UTC)",
            "from silver.osuosl.org (silver.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id A2CCB1C0515\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon,  1 Jun 2015 19:33:06 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 9D9FA33532\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon,  1 Jun 2015 19:33:06 +0000 (UTC)",
            "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id M21pnNtB4v-Q for <intel-wired-lan@lists.osuosl.org>;\n\tMon,  1 Jun 2015 19:33:05 +0000 (UTC)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby silver.osuosl.org (Postfix) with ESMTP id 4981B334FE\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon,  1 Jun 2015 19:33:05 +0000 (UTC)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga103.jf.intel.com with ESMTP; 01 Jun 2015 12:33:05 -0700",
            "from orsmsx109.amr.corp.intel.com ([10.22.240.7])\n\tby FMSMGA003.fm.intel.com with ESMTP; 01 Jun 2015 12:33:06 -0700",
            "from orsmsx155.amr.corp.intel.com (10.22.240.21) by\n\tORSMSX109.amr.corp.intel.com (10.22.240.7) with Microsoft SMTP Server\n\t(TLS) id 14.3.224.2; Mon, 1 Jun 2015 12:33:04 -0700",
            "from fmsmsx106.amr.corp.intel.com (10.18.124.204) by\n\tORSMSX155.amr.corp.intel.com (10.22.240.21) with Microsoft SMTP\n\tServer (TLS) id 14.3.224.2; Mon, 1 Jun 2015 12:33:04 -0700",
            "from fmsmsx115.amr.corp.intel.com ([169.254.4.92]) by\n\tFMSMSX106.amr.corp.intel.com ([169.254.5.98]) with mapi id\n\t14.03.0224.002; Mon, 1 Jun 2015 12:33:04 -0700"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.13,534,1427785200\"; d=\"scan'208\";a=\"501126108\"",
        "From": "\"Nelson, Shannon\" <shannon.nelson@intel.com>",
        "To": "\"intel-wired-lan@lists.osuosl.org\" <intel-wired-lan@lists.osuosl.org>",
        "Thread-Topic": "[PATCH] i40e: clean up unneeded gotos ",
        "Thread-Index": "AdCcoW+JwJWaDaYOQR+fdKvjgHbsZA==",
        "Date": "Mon, 1 Jun 2015 19:33:03 +0000",
        "Message-ID": "<FC41C24E35F18A40888AACA1A36F3E418AE6C940@fmsmsx115.amr.corp.intel.com>",
        "Accept-Language": "en-US",
        "Content-Language": "en-US",
        "X-MS-Has-Attach": "",
        "X-MS-TNEF-Correlator": "",
        "x-originating-ip": "[10.1.200.107]",
        "MIME-Version": "1.0",
        "Cc": "\"laurent.navet@gmail.com\" <laurent.navet@gmail.com>",
        "Subject": "[Intel-wired-lan] [PATCH] i40e: clean up unneeded gotos",
        "X-BeenThere": "intel-wired-lan@lists.osuosl.org",
        "X-Mailman-Version": "2.1.18-1",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.lists.osuosl.org>",
        "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>",
        "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@lists.osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>"
    },
    "content": "With a little work we can clean up some unnecessary logic jumping and\ndrop a variable.\n\nSigned-off-by: Shannon Nelson <shannon.nelson@intel.com>\nCc: Laurent Navet <laurent.navet@gmail.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_hmc.c | 37 ++++++++++--------------------\n 1 file changed, 12 insertions(+), 25 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_hmc.c b/drivers/net/ethernet/intel/i40e/i40e_hmc.c\nindex 9b987cc..6c0dd54 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_hmc.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_hmc.c\n@@ -287,21 +287,15 @@ i40e_status i40e_remove_sd_bp_new(struct i40e_hw *hw,\n \t\t\t\t\t    u32 idx, bool is_pf)\n {\n \tstruct i40e_hmc_sd_entry *sd_entry;\n-\ti40e_status ret_code = 0;\n+\n+\tif (!is_pf)\n+\t\treturn I40E_NOT_SUPPORTED;\n \n \t/* get the entry and decrease its ref counter */\n \tsd_entry = &hmc_info->sd_table.sd_entry[idx];\n-\tif (is_pf) {\n-\t\tI40E_CLEAR_PF_SD_ENTRY(hw, idx, I40E_SD_TYPE_DIRECT);\n-\t} else {\n-\t\tret_code = I40E_NOT_SUPPORTED;\n-\t\tgoto exit;\n-\t}\n-\tret_code = i40e_free_dma_mem(hw, &(sd_entry->u.bp.addr));\n-\tif (ret_code)\n-\t\tgoto exit;\n-exit:\n-\treturn ret_code;\n+\tI40E_CLEAR_PF_SD_ENTRY(hw, idx, I40E_SD_TYPE_DIRECT);\n+\n+\treturn i40e_free_dma_mem(hw, &sd_entry->u.bp.addr);\n }\n \n /**\n@@ -341,20 +335,13 @@ i40e_status i40e_remove_pd_page_new(struct i40e_hw *hw,\n \t\t\t\t\t      struct i40e_hmc_info *hmc_info,\n \t\t\t\t\t      u32 idx, bool is_pf)\n {\n-\ti40e_status ret_code = 0;\n \tstruct i40e_hmc_sd_entry *sd_entry;\n \n+\tif (!is_pf)\n+\t\treturn I40E_NOT_SUPPORTED;\n+\n \tsd_entry = &hmc_info->sd_table.sd_entry[idx];\n-\tif (is_pf) {\n-\t\tI40E_CLEAR_PF_SD_ENTRY(hw, idx, I40E_SD_TYPE_PAGED);\n-\t} else {\n-\t\tret_code = I40E_NOT_SUPPORTED;\n-\t\tgoto exit;\n-\t}\n-\t/* free memory here */\n-\tret_code = i40e_free_dma_mem(hw, &(sd_entry->u.pd_table.pd_page_addr));\n-\tif (ret_code)\n-\t\tgoto exit;\n-exit:\n-\treturn ret_code;\n+\tI40E_CLEAR_PF_SD_ENTRY(hw, idx, I40E_SD_TYPE_PAGED);\n+\n+\treturn  i40e_free_dma_mem(hw, &sd_entry->u.pd_table.pd_page_addr);\n }\n",
    "prefixes": []
}