get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 77393,
    "url": "http://patches.dpdk.org/api/patches/77393/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200911131954.15999-7-qi.z.zhang@intel.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20200911131954.15999-7-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200911131954.15999-7-qi.z.zhang@intel.com",
    "date": "2020-09-11T13:19:20",
    "name": "[v2,06/40] net/ice/base: clean the code wrapping",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "f22203b53df41c1c2cfdad8e3b95352122dec585",
    "submitter": {
        "id": 504,
        "url": "http://patches.dpdk.org/api/people/504/?format=api",
        "name": "Qi Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200911131954.15999-7-qi.z.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 12148,
            "url": "http://patches.dpdk.org/api/series/12148/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12148",
            "date": "2020-09-11T13:19:15",
            "name": "ice base code update",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/12148/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/77393/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/77393/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 5849BA04B7;\n\tFri, 11 Sep 2020 15:17:08 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 8F0BE1C124;\n\tFri, 11 Sep 2020 15:16:13 +0200 (CEST)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by dpdk.org (Postfix) with ESMTP id AE7161C116\n for <dev@dpdk.org>; Fri, 11 Sep 2020 15:16:09 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 11 Sep 2020 06:16:09 -0700",
            "from dpdk51.sh.intel.com ([10.67.111.82])\n by FMSMGA003.fm.intel.com with ESMTP; 11 Sep 2020 06:16:06 -0700"
        ],
        "IronPort-SDR": [
            "\n 4C42aV6/btQHuwyia9uNBKe3h55Uc8sQGcsS8xNgQIxdlwb8SpV1U70KjJut3/z+ffFpcBwLi1\n FjVulIYmADgQ==",
            "\n W4joRkjKY6V/Ffn+/ugsuFQF4tJ4E+WLP/bZXVA/Zw7NkFnm5pAXoRDZFjTvBxRMcNXmNSa560\n Z1DQXb6TTa2w=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9740\"; a=\"146482140\"",
            "E=Sophos;i=\"5.76,415,1592895600\"; d=\"scan'208\";a=\"146482140\"",
            "E=Sophos;i=\"5.76,415,1592895600\"; d=\"scan'208\";a=\"342296472\""
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "To": "ferruh.yigit@intel.com",
        "Cc": "dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>,\n Tony Nguyen <anthony.l.nguyen@intel.com>",
        "Date": "Fri, 11 Sep 2020 21:19:20 +0800",
        "Message-Id": "<20200911131954.15999-7-qi.z.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.13.6",
        "In-Reply-To": "<20200911131954.15999-1-qi.z.zhang@intel.com>",
        "References": "<20200907112826.48493-1-qi.z.zhang@intel.com>\n <20200911131954.15999-1-qi.z.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 06/40] net/ice/base: clean the code wrapping",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "To make the wrapping a little cleaner, move the variables only applicable\nto ICE_FC_AUTO into that case. Also move caching of the value to only occur\non success.\n\nSigned-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\nAcked-by: Qiming Yang <qiming.yang@intel.com>\n---\n drivers/net/ice/base/ice_common.c | 37 +++++++++++++++++++++----------------\n 1 file changed, 21 insertions(+), 16 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c\nindex 4be363047..92b2df741 100644\n--- a/drivers/net/ice/base/ice_common.c\n+++ b/drivers/net/ice/base/ice_common.c\n@@ -2754,36 +2754,39 @@ static enum ice_status\n ice_cfg_phy_fc(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg,\n \t       enum ice_fc_mode req_mode)\n {\n-\tstruct ice_aqc_get_phy_caps_data *pcaps = NULL;\n \tstruct ice_phy_cache_mode_data cache_data;\n-\tenum ice_status status = ICE_SUCCESS;\n \tu8 pause_mask = 0x0;\n \n \tif (!pi || !cfg)\n \t\treturn ICE_ERR_BAD_PTR;\n \n-\tpcaps = (struct ice_aqc_get_phy_caps_data *)\n-\t\tice_malloc(pi->hw, sizeof(*pcaps));\n-\tif (!pcaps)\n-\t\treturn ICE_ERR_NO_MEMORY;\n-\n-\t/* Cache user FC request */\n-\tcache_data.data.curr_user_fc_req = req_mode;\n-\tice_cache_phy_user_req(pi, cache_data, ICE_FC_MODE);\n-\n \tswitch (req_mode) {\n \tcase ICE_FC_AUTO:\n+\t{\n+\t\tstruct ice_aqc_get_phy_caps_data *pcaps;\n+\t\tenum ice_status status;\n+\n+\t\tpcaps = (struct ice_aqc_get_phy_caps_data *)\n+\t\t\tice_malloc(pi->hw, sizeof(*pcaps));\n+\t\tif (!pcaps)\n+\t\t\treturn ICE_ERR_NO_MEMORY;\n+\n \t\t/* Query the value of FC that both the NIC and attached media\n \t\t * can do.\n \t\t */\n \t\tstatus = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_TOPO_CAP,\n \t\t\t\t\t     pcaps, NULL);\n-\t\tif (status)\n-\t\t\tgoto out;\n+\t\tif (status) {\n+\t\t\tice_free(pi->hw, pcaps);\n+\t\t\treturn status;\n+\t\t}\n \n \t\tpause_mask |= pcaps->caps & ICE_AQC_PHY_EN_TX_LINK_PAUSE;\n \t\tpause_mask |= pcaps->caps & ICE_AQC_PHY_EN_RX_LINK_PAUSE;\n+\n+\t\tice_free(pi->hw, pcaps);\n \t\tbreak;\n+\t}\n \tcase ICE_FC_FULL:\n \t\tpause_mask |= ICE_AQC_PHY_EN_TX_LINK_PAUSE;\n \t\tpause_mask |= ICE_AQC_PHY_EN_RX_LINK_PAUSE;\n@@ -2805,9 +2808,11 @@ ice_cfg_phy_fc(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg,\n \t/* set the new capabilities */\n \tcfg->caps |= pause_mask;\n \n-out:\n-\tice_free(pi->hw, pcaps);\n-\treturn status;\n+\t/* Cache user FC request */\n+\tcache_data.data.curr_user_fc_req = req_mode;\n+\tice_cache_phy_user_req(pi, cache_data, ICE_FC_MODE);\n+\n+\treturn ICE_SUCCESS;\n }\n \n /**\n",
    "prefixes": [
        "v2",
        "06/40"
    ]
}