Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/321/?format=api
http://patches.dpdk.org/api/patches/321/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1410247299-4365-8-git-send-email-helin.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": "<1410247299-4365-8-git-send-email-helin.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1410247299-4365-8-git-send-email-helin.zhang@intel.com", "date": "2014-09-09T07:21:31", "name": "[dpdk-dev,07/15] i40e: Get rid of sparse warnings, and remove unreachable code", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "0a55f23a87792ea0c721152aa7a6758375331f4e", "submitter": { "id": 14, "url": "http://patches.dpdk.org/api/people/14/?format=api", "name": "Zhang, Helin", "email": "helin.zhang@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1410247299-4365-8-git-send-email-helin.zhang@intel.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/321/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/321/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 16379B39F;\n\tTue, 9 Sep 2014 09:17:09 +0200 (CEST)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 0FEFAB3B7\n\tfor <dev@dpdk.org>; Tue, 9 Sep 2014 09:17:06 +0200 (CEST)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga102.fm.intel.com with ESMTP; 09 Sep 2014 00:22:08 -0700", "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby fmsmga001.fm.intel.com with ESMTP; 09 Sep 2014 00:22:07 -0700", "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id s897M4hV008845;\n\tTue, 9 Sep 2014 15:22:04 +0800", "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid s897M25p004474; Tue, 9 Sep 2014 15:22:04 +0800", "(from hzhan75@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s897M2U4004470; \n\tTue, 9 Sep 2014 15:22:02 +0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.04,491,1406617200\"; d=\"scan'208\";a=\"588396220\"", "From": "Helin Zhang <helin.zhang@intel.com>", "To": "dev@dpdk.org", "Date": "Tue, 9 Sep 2014 15:21:31 +0800", "Message-Id": "<1410247299-4365-8-git-send-email-helin.zhang@intel.com>", "X-Mailer": "git-send-email 1.7.4.1", "In-Reply-To": "<1410247299-4365-1-git-send-email-helin.zhang@intel.com>", "References": "<1410247299-4365-1-git-send-email-helin.zhang@intel.com>", "Subject": "[dpdk-dev] [PATCH 07/15] i40e: Get rid of sparse warnings,\n\tand remove unreachable code", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <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": "There are variables that represent values in little endian.\nAdding prefix of '__Le' can remove warnings during sparse\nchecks. In addition, remove some unreachable 'break' statements,\nand add 'UL' on a couple of constants.\n\nSigned-off-by: Helin Zhang <helin.zhang@intel.com>\nReviewed-by: Chen Jing <jing.d.chen@intel.com>\n---\n lib/librte_pmd_i40e/i40e/i40e_lan_hmc.c | 24 ++++++++++++++----------\n lib/librte_pmd_i40e/i40e/i40e_lan_hmc.h | 1 -\n 2 files changed, 14 insertions(+), 11 deletions(-)", "diff": "diff --git a/lib/librte_pmd_i40e/i40e/i40e_lan_hmc.c b/lib/librte_pmd_i40e/i40e/i40e_lan_hmc.c\nindex 9f98d6d..b08534b 100644\n--- a/lib/librte_pmd_i40e/i40e/i40e_lan_hmc.c\n+++ b/lib/librte_pmd_i40e/i40e/i40e_lan_hmc.c\n@@ -424,7 +424,6 @@ enum i40e_status_code i40e_create_lan_hmc_object(struct i40e_hw *hw,\n \t\t\tdefault:\n \t\t\t\tret_code = I40E_ERR_INVALID_SD_TYPE;\n \t\t\t\tgoto exit;\n-\t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n@@ -509,7 +508,6 @@ try_type_paged:\n \t\tDEBUGOUT1(\"i40e_configure_lan_hmc: Unknown SD type: %d\\n\",\n \t\t\t ret_code);\n \t\tgoto configure_lan_hmc_out;\n-\t\tbreak;\n \t}\n \n \t/* Configure and program the FPM registers so objects can be created */\n@@ -803,9 +801,10 @@ static void i40e_write_word(u8 *hmc_bits,\n \t\t\t struct i40e_context_ele *ce_info,\n \t\t\t u8 *src)\n {\n-\tu16 src_word, dest_word, mask;\n+\tu16 src_word, mask;\n \tu8 *from, *dest;\n \tu16 shift_width;\n+\t__le16 dest_word;\n \n \t/* copy from the next struct field */\n \tfrom = src + ce_info->offset;\n@@ -846,9 +845,10 @@ static void i40e_write_dword(u8 *hmc_bits,\n \t\t\t struct i40e_context_ele *ce_info,\n \t\t\t u8 *src)\n {\n-\tu32 src_dword, dest_dword, mask;\n+\tu32 src_dword, mask;\n \tu8 *from, *dest;\n \tu16 shift_width;\n+\t__le32 dest_dword;\n \n \t/* copy from the next struct field */\n \tfrom = src + ce_info->offset;\n@@ -897,9 +897,10 @@ static void i40e_write_qword(u8 *hmc_bits,\n \t\t\t struct i40e_context_ele *ce_info,\n \t\t\t u8 *src)\n {\n-\tu64 src_qword, dest_qword, mask;\n+\tu64 src_qword, mask;\n \tu8 *from, *dest;\n \tu16 shift_width;\n+\t__le64 dest_qword;\n \n \t/* copy from the next struct field */\n \tfrom = src + ce_info->offset;\n@@ -914,7 +915,7 @@ static void i40e_write_qword(u8 *hmc_bits,\n \tif (ce_info->width < 64)\n \t\tmask = ((u64)1 << ce_info->width) - 1;\n \telse\n-\t\tmask = 0xFFFFFFFFFFFFFFFF;\n+\t\tmask = 0xFFFFFFFFFFFFFFFFUL;\n \n \t/* don't swizzle the bits until after the mask because the mask bits\n \t * will be in a different bit position on big endian machines\n@@ -985,9 +986,10 @@ static void i40e_read_word(u8 *hmc_bits,\n \t\t\t struct i40e_context_ele *ce_info,\n \t\t\t u8 *dest)\n {\n-\tu16 src_word, dest_word, mask;\n+\tu16 dest_word, mask;\n \tu8 *src, *target;\n \tu16 shift_width;\n+\t__le16 src_word;\n \n \t/* prepare the bits and mask */\n \tshift_width = ce_info->lsb % 8;\n@@ -1028,9 +1030,10 @@ static void i40e_read_dword(u8 *hmc_bits,\n \t\t\t struct i40e_context_ele *ce_info,\n \t\t\t u8 *dest)\n {\n-\tu32 src_dword, dest_dword, mask;\n+\tu32 dest_dword, mask;\n \tu8 *src, *target;\n \tu16 shift_width;\n+\t__le32 src_dword;\n \n \t/* prepare the bits and mask */\n \tshift_width = ce_info->lsb % 8;\n@@ -1080,9 +1083,10 @@ static void i40e_read_qword(u8 *hmc_bits,\n \t\t\t struct i40e_context_ele *ce_info,\n \t\t\t u8 *dest)\n {\n-\tu64 src_qword, dest_qword, mask;\n+\tu64 dest_qword, mask;\n \tu8 *src, *target;\n \tu16 shift_width;\n+\t__le64 src_qword;\n \n \t/* prepare the bits and mask */\n \tshift_width = ce_info->lsb % 8;\n@@ -1094,7 +1098,7 @@ static void i40e_read_qword(u8 *hmc_bits,\n \tif (ce_info->width < 64)\n \t\tmask = ((u64)1 << ce_info->width) - 1;\n \telse\n-\t\tmask = 0xFFFFFFFFFFFFFFFF;\n+\t\tmask = 0xFFFFFFFFFFFFFFFFUL;\n \n \t/* shift to correct alignment */\n \tmask <<= shift_width;\ndiff --git a/lib/librte_pmd_i40e/i40e/i40e_lan_hmc.h b/lib/librte_pmd_i40e/i40e/i40e_lan_hmc.h\nindex f0f0f89..70ef65c 100644\n--- a/lib/librte_pmd_i40e/i40e/i40e_lan_hmc.h\n+++ b/lib/librte_pmd_i40e/i40e/i40e_lan_hmc.h\n@@ -36,7 +36,6 @@ POSSIBILITY OF SUCH DAMAGE.\n \n /* forward-declare the HW struct for the compiler */\n struct i40e_hw;\n-enum i40e_status_code;\n \n /* HMC element context information */\n \n", "prefixes": [ "dpdk-dev", "07/15" ] }{ "id": 321, "url": "