get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 54316,
    "url": "http://patches.dpdk.org/api/patches/54316/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190604054248.68510-41-leyi.rong@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": "<20190604054248.68510-41-leyi.rong@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190604054248.68510-41-leyi.rong@intel.com",
    "date": "2019-06-04T05:42:39",
    "name": "[40/49] net/ice/base: code clean up",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "aaa7991f06f8634ff85fcb492a29ef96ec69c41c",
    "submitter": {
        "id": 1204,
        "url": "http://patches.dpdk.org/api/people/1204/?format=api",
        "name": "Leyi Rong",
        "email": "leyi.rong@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190604054248.68510-41-leyi.rong@intel.com/mbox/",
    "series": [
        {
            "id": 4879,
            "url": "http://patches.dpdk.org/api/series/4879/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4879",
            "date": "2019-06-04T05:41:59",
            "name": "shared code update",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/4879/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/54316/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/54316/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 EF82C1BC79;\n\tTue,  4 Jun 2019 07:45:25 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id DA8B61BB2A\n\tfor <dev@dpdk.org>; Tue,  4 Jun 2019 07:44:38 +0200 (CEST)",
            "from fmsmga008.fm.intel.com ([10.253.24.58])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t03 Jun 2019 22:44:38 -0700",
            "from lrong-srv-03.sh.intel.com ([10.67.119.177])\n\tby fmsmga008.fm.intel.com with ESMTP; 03 Jun 2019 22:44:37 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Leyi Rong <leyi.rong@intel.com>",
        "To": "qi.z.zhang@intel.com",
        "Cc": "dev@dpdk.org, Leyi Rong <leyi.rong@intel.com>,\n\tPaul M Stillwell Jr <paul.m.stillwell.jr@intel.com>",
        "Date": "Tue,  4 Jun 2019 13:42:39 +0800",
        "Message-Id": "<20190604054248.68510-41-leyi.rong@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190604054248.68510-1-leyi.rong@intel.com>",
        "References": "<20190604054248.68510-1-leyi.rong@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 40/49] net/ice/base: code clean up",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Cleanup the useless code.\n\nSigned-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>\nSigned-off-by: Leyi Rong <leyi.rong@intel.com>\n---\n drivers/net/ice/base/ice_controlq.c  | 62 +---------------------------\n drivers/net/ice/base/ice_fdir.h      |  1 -\n drivers/net/ice/base/ice_flex_pipe.c |  5 ++-\n drivers/net/ice/base/ice_sched.c     |  4 +-\n drivers/net/ice/base/ice_type.h      |  3 ++\n 5 files changed, 10 insertions(+), 65 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_controlq.c b/drivers/net/ice/base/ice_controlq.c\nindex 4cb6df113..3ef07e094 100644\n--- a/drivers/net/ice/base/ice_controlq.c\n+++ b/drivers/net/ice/base/ice_controlq.c\n@@ -262,7 +262,7 @@ ice_cfg_sq_regs(struct ice_hw *hw, struct ice_ctl_q_info *cq)\n  * @hw: pointer to the hardware structure\n  * @cq: pointer to the specific Control queue\n  *\n- * Configure base address and length registers for the receive (event q)\n+ * Configure base address and length registers for the receive (event queue)\n  */\n static enum ice_status\n ice_cfg_rq_regs(struct ice_hw *hw, struct ice_ctl_q_info *cq)\n@@ -772,9 +772,6 @@ static u16 ice_clean_sq(struct ice_hw *hw, struct ice_ctl_q_info *cq)\n \tstruct ice_ctl_q_ring *sq = &cq->sq;\n \tu16 ntc = sq->next_to_clean;\n \tstruct ice_sq_cd *details;\n-#if 0\n-\tstruct ice_aq_desc desc_cb;\n-#endif\n \tstruct ice_aq_desc *desc;\n \n \tdesc = ICE_CTL_Q_DESC(*sq, ntc);\n@@ -783,15 +780,6 @@ static u16 ice_clean_sq(struct ice_hw *hw, struct ice_ctl_q_info *cq)\n \twhile (rd32(hw, cq->sq.head) != ntc) {\n \t\tice_debug(hw, ICE_DBG_AQ_MSG,\n \t\t\t  \"ntc %d head %d.\\n\", ntc, rd32(hw, cq->sq.head));\n-#if 0\n-\t\tif (details->callback) {\n-\t\t\tICE_CTL_Q_CALLBACK cb_func =\n-\t\t\t\t(ICE_CTL_Q_CALLBACK)details->callback;\n-\t\t\tice_memcpy(&desc_cb, desc, sizeof(desc_cb),\n-\t\t\t\t   ICE_DMA_TO_DMA);\n-\t\t\tcb_func(hw, &desc_cb);\n-\t\t}\n-#endif\n \t\tice_memset(desc, 0, sizeof(*desc), ICE_DMA_MEM);\n \t\tice_memset(details, 0, sizeof(*details), ICE_NONDMA_MEM);\n \t\tntc++;\n@@ -941,38 +929,8 @@ ice_sq_send_cmd(struct ice_hw *hw, struct ice_ctl_q_info *cq,\n \tdetails = ICE_CTL_Q_DETAILS(cq->sq, cq->sq.next_to_use);\n \tif (cd)\n \t\t*details = *cd;\n-#if 0\n-\t\t/* FIXME: if/when this block gets enabled (when the #if 0\n-\t\t * is removed), add braces to both branches of the surrounding\n-\t\t * conditional expression. The braces have been removed to\n-\t\t * prevent checkpatch complaining.\n-\t\t */\n-\n-\t\t/* If the command details are defined copy the cookie. The\n-\t\t * CPU_TO_LE32 is not needed here because the data is ignored\n-\t\t * by the FW, only used by the driver\n-\t\t */\n-\t\tif (details->cookie) {\n-\t\t\tdesc->cookie_high =\n-\t\t\t\tCPU_TO_LE32(ICE_HI_DWORD(details->cookie));\n-\t\t\tdesc->cookie_low =\n-\t\t\t\tCPU_TO_LE32(ICE_LO_DWORD(details->cookie));\n-\t\t}\n-#endif\n \telse\n \t\tice_memset(details, 0, sizeof(*details), ICE_NONDMA_MEM);\n-#if 0\n-\t/* clear requested flags and then set additional flags if defined */\n-\tdesc->flags &= ~CPU_TO_LE16(details->flags_dis);\n-\tdesc->flags |= CPU_TO_LE16(details->flags_ena);\n-\n-\tif (details->postpone && !details->async) {\n-\t\tice_debug(hw, ICE_DBG_AQ_MSG,\n-\t\t\t  \"Async flag not set along with postpone flag\\n\");\n-\t\tstatus = ICE_ERR_PARAM;\n-\t\tgoto sq_send_command_error;\n-\t}\n-#endif\n \n \t/* Call clean and check queue available function to reclaim the\n \t * descriptors that were processed by FW/MBX; the function returns the\n@@ -1019,20 +977,8 @@ ice_sq_send_cmd(struct ice_hw *hw, struct ice_ctl_q_info *cq,\n \t(cq->sq.next_to_use)++;\n \tif (cq->sq.next_to_use == cq->sq.count)\n \t\tcq->sq.next_to_use = 0;\n-#if 0\n-\t/* FIXME - handle this case? */\n-\tif (!details->postpone)\n-#endif\n \twr32(hw, cq->sq.tail, cq->sq.next_to_use);\n \n-#if 0\n-\t/* if command details are not defined or async flag is not set,\n-\t * we need to wait for desc write back\n-\t */\n-\tif (!details->async && !details->postpone) {\n-\t\t/* FIXME - handle this case? */\n-\t}\n-#endif\n \tdo {\n \t\tif (ice_sq_done(hw, cq))\n \t\t\tbreak;\n@@ -1087,9 +1033,6 @@ ice_sq_send_cmd(struct ice_hw *hw, struct ice_ctl_q_info *cq,\n \n \t/* update the error if time out occurred */\n \tif (!cmd_completed) {\n-#if 0\n-\t    (!details->async && !details->postpone)) {\n-#endif\n \t\tice_debug(hw, ICE_DBG_AQ_MSG,\n \t\t\t  \"Control Send Queue Writeback timeout.\\n\");\n \t\tstatus = ICE_ERR_AQ_TIMEOUT;\n@@ -1208,9 +1151,6 @@ ice_clean_rq_elem(struct ice_hw *hw, struct ice_ctl_q_info *cq,\n \tcq->rq.next_to_clean = ntc;\n \tcq->rq.next_to_use = ntu;\n \n-#if 0\n-\tice_nvmupd_check_wait_event(hw, LE16_TO_CPU(e->desc.opcode));\n-#endif\n clean_rq_elem_out:\n \t/* Set pending if needed, unlock and return */\n \tif (pending) {\ndiff --git a/drivers/net/ice/base/ice_fdir.h b/drivers/net/ice/base/ice_fdir.h\nindex 2ecb147f1..f8f06658c 100644\n--- a/drivers/net/ice/base/ice_fdir.h\n+++ b/drivers/net/ice/base/ice_fdir.h\n@@ -173,7 +173,6 @@ struct ice_fdir_fltr {\n \tu32 fltr_id;\n };\n \n-\n /* Dummy packet filter definition structure. */\n struct ice_fdir_base_pkt {\n \tenum ice_fltr_ptype flow;\ndiff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c\nindex 2a310b6e1..46234c014 100644\n--- a/drivers/net/ice/base/ice_flex_pipe.c\n+++ b/drivers/net/ice/base/ice_flex_pipe.c\n@@ -398,7 +398,7 @@ ice_find_boost_entry(struct ice_seg *ice_seg, u16 addr,\n  * Handles enumeration of individual label entries.\n  */\n static void *\n-ice_label_enum_handler(u32 __always_unused sect_type, void *section, u32 index,\n+ice_label_enum_handler(u32 __ALWAYS_UNUSED sect_type, void *section, u32 index,\n \t\t       u32 *offset)\n {\n \tstruct ice_label_section *labels;\n@@ -640,7 +640,7 @@ static bool ice_bits_max_set(const u8 *mask, u16 size, u16 max)\n  * @size: the size of the complete key in bytes (must be even)\n  * @val: array of 8-bit values that makes up the value portion of the key\n  * @upd: array of 8-bit masks that determine what key portion to update\n- * @dc: array of 8-bit masks that make up the dont' care mask\n+ * @dc: array of 8-bit masks that make up the don't care mask\n  * @nm: array of 8-bit masks that make up the never match mask\n  * @off: the offset of the first byte in the key to update\n  * @len: the number of bytes in the key update\n@@ -4544,6 +4544,7 @@ ice_move_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 vsig,\n \tstatus = ice_vsig_find_vsi(hw, blk, vsi, &orig_vsig);\n \tif (!status)\n \t\tstatus = ice_vsig_add_mv_vsi(hw, blk, vsi, vsig);\n+\n \tif (status) {\n \t\tice_free(hw, p);\n \t\treturn status;\ndiff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c\nindex a72e72982..fa3158a7b 100644\n--- a/drivers/net/ice/base/ice_sched.c\n+++ b/drivers/net/ice/base/ice_sched.c\n@@ -1233,7 +1233,7 @@ enum ice_status ice_sched_init_port(struct ice_port_info *pi)\n \t\tgoto err_init_port;\n \t}\n \n-\t/* If the last node is a leaf node then the index of the Q group\n+\t/* If the last node is a leaf node then the index of the queue group\n \t * layer is two less than the number of elements.\n \t */\n \tif (num_elems > 2 && buf[0].generic[num_elems - 1].data.elem_type ==\n@@ -3529,9 +3529,11 @@ ice_cfg_agg_vsi_priority_per_tc(struct ice_port_info *pi, u32 agg_id,\n \t\tLIST_FOR_EACH_ENTRY(agg_vsi_info, &agg_info->agg_vsi_list,\n \t\t\t\t    ice_sched_agg_vsi_info, list_entry)\n \t\t\tif (agg_vsi_info->vsi_handle == vsi_handle) {\n+\t\t\t\t/* cppcheck-suppress unreadVariable */\n \t\t\t\tvsi_handle_valid = true;\n \t\t\t\tbreak;\n \t\t\t}\n+\n \t\tif (!vsi_handle_valid)\n \t\t\tgoto exit_agg_priority_per_tc;\n \ndiff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h\nindex f4e151c55..f76be2b58 100644\n--- a/drivers/net/ice/base/ice_type.h\n+++ b/drivers/net/ice/base/ice_type.h\n@@ -114,6 +114,9 @@ static inline u32 ice_round_to_num(u32 N, u32 R)\n #define ICE_DBG_USER\t\tBIT_ULL(31)\n #define ICE_DBG_ALL\t\t0xFFFFFFFFFFFFFFFFULL\n \n+#ifndef __ALWAYS_UNUSED\n+#define __ALWAYS_UNUSED\n+#endif\n \n \n \n",
    "prefixes": [
        "40/49"
    ]
}