Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/71885/?format=api
http://patches.dpdk.org/api/patches/71885/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200622064634.70941-19-guinanx.sun@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": "<20200622064634.70941-19-guinanx.sun@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200622064634.70941-19-guinanx.sun@intel.com", "date": "2020-06-22T06:45:42", "name": "[18/70] net/e1000/base: modify klockwork about unused return values", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "d966c9ca886049af12501a8df671773912b228fb", "submitter": { "id": 1476, "url": "http://patches.dpdk.org/api/people/1476/?format=api", "name": "Guinan Sun", "email": "guinanx.sun@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/20200622064634.70941-19-guinanx.sun@intel.com/mbox/", "series": [ { "id": 10543, "url": "http://patches.dpdk.org/api/series/10543/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=10543", "date": "2020-06-22T06:45:24", "name": "update e1000 base code", "version": 1, "mbox": "http://patches.dpdk.org/series/10543/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/71885/comments/", "check": "warning", "checks": "http://patches.dpdk.org/api/patches/71885/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 3E5CFA0350;\n\tMon, 22 Jun 2020 09:08:39 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 5504F1D170;\n\tMon, 22 Jun 2020 09:05:51 +0200 (CEST)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by dpdk.org (Postfix) with ESMTP id B59EC1D168\n for <dev@dpdk.org>; Mon, 22 Jun 2020 09:05:48 +0200 (CEST)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 22 Jun 2020 00:05:48 -0700", "from dpdk.sh.intel.com ([10.239.255.83])\n by fmsmga001.fm.intel.com with ESMTP; 22 Jun 2020 00:05:46 -0700" ], "IronPort-SDR": [ "\n JYAcKtDv92iOSimqXwr6NtPLh6+//BjAZHm0i8S7UPYaQOkLmRXHPwNrvUIKDY9V6axOjYvDG3\n AelAxuoxnuNg==", "\n Z/D+VC3BSXCjkpjqXfMsacUvNuWsm/15Ug+SDhCB5loVNODL19L5tueTnHKpJHTx7ViboOBkOM\n QK+LENwjXgwA==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9659\"; a=\"141944764\"", "E=Sophos;i=\"5.75,266,1589266800\"; d=\"scan'208\";a=\"141944764\"", "E=Sophos;i=\"5.75,266,1589266800\"; d=\"scan'208\";a=\"384408874\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "Guinan Sun <guinanx.sun@intel.com>", "To": "dev@dpdk.org", "Cc": "Jeff Guo <jia.guo@intel.com>, Zhao1 Wei <wei.zhao1@intel.com>,\n Guinan Sun <guinanx.sun@intel.com>, Todd Fujinaka <todd.fujinaka@intel.com>", "Date": "Mon, 22 Jun 2020 06:45:42 +0000", "Message-Id": "<20200622064634.70941-19-guinanx.sun@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20200622064634.70941-1-guinanx.sun@intel.com>", "References": "<20200622064634.70941-1-guinanx.sun@intel.com>", "Subject": "[dpdk-dev] [PATCH 18/70] net/e1000/base: modify klockwork about\n\tunused return values", "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": "Klockwork found unreachable code since *clock_in_i2c_* always return\nsuccess. Don't return unused s32 and don't check for constants.\n\nSigned-off-by: Todd Fujinaka <todd.fujinaka@intel.com>\nSigned-off-by: Guinan Sun <guinanx.sun@intel.com>\n---\n drivers/net/e1000/base/e1000_82575.c | 16 +++++-----------\n 1 file changed, 5 insertions(+), 11 deletions(-)", "diff": "diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c\nindex 627349de8..49c065014 100644\n--- a/drivers/net/e1000/base/e1000_82575.c\n+++ b/drivers/net/e1000/base/e1000_82575.c\n@@ -76,10 +76,10 @@ STATIC void e1000_clear_vfta_i350(struct e1000_hw *hw);\n \n STATIC void e1000_i2c_start(struct e1000_hw *hw);\n STATIC void e1000_i2c_stop(struct e1000_hw *hw);\n-STATIC s32 e1000_clock_in_i2c_byte(struct e1000_hw *hw, u8 *data);\n+STATIC void e1000_clock_in_i2c_byte(struct e1000_hw *hw, u8 *data);\n STATIC s32 e1000_clock_out_i2c_byte(struct e1000_hw *hw, u8 data);\n STATIC s32 e1000_get_i2c_ack(struct e1000_hw *hw);\n-STATIC s32 e1000_clock_in_i2c_bit(struct e1000_hw *hw, bool *data);\n+STATIC void e1000_clock_in_i2c_bit(struct e1000_hw *hw, bool *data);\n STATIC s32 e1000_clock_out_i2c_bit(struct e1000_hw *hw, bool data);\n STATIC void e1000_raise_i2c_clk(struct e1000_hw *hw, u32 *i2cctl);\n STATIC void e1000_lower_i2c_clk(struct e1000_hw *hw, u32 *i2cctl);\n@@ -3305,9 +3305,7 @@ s32 e1000_read_i2c_byte_generic(struct e1000_hw *hw, u8 byte_offset,\n \t\tif (status != E1000_SUCCESS)\n \t\t\tgoto fail;\n \n-\t\tstatus = e1000_clock_in_i2c_byte(hw, data);\n-\t\tif (status != E1000_SUCCESS)\n-\t\t\tgoto fail;\n+\t\te1000_clock_in_i2c_byte(hw, data);\n \n \t\tstatus = e1000_clock_out_i2c_bit(hw, nack);\n \t\tif (status != E1000_SUCCESS)\n@@ -3471,7 +3469,7 @@ STATIC void e1000_i2c_stop(struct e1000_hw *hw)\n *\n * Clocks in one byte data via I2C data/clock\n **/\n-STATIC s32 e1000_clock_in_i2c_byte(struct e1000_hw *hw, u8 *data)\n+STATIC void e1000_clock_in_i2c_byte(struct e1000_hw *hw, u8 *data)\n {\n \ts32 i;\n \tbool bit = 0;\n@@ -3483,8 +3481,6 @@ STATIC s32 e1000_clock_in_i2c_byte(struct e1000_hw *hw, u8 *data)\n \t\te1000_clock_in_i2c_bit(hw, &bit);\n \t\t*data |= bit << i;\n \t}\n-\n-\treturn E1000_SUCCESS;\n }\n \n /**\n@@ -3573,7 +3569,7 @@ STATIC s32 e1000_get_i2c_ack(struct e1000_hw *hw)\n *\n * Clocks in one bit via I2C data/clock\n **/\n-STATIC s32 e1000_clock_in_i2c_bit(struct e1000_hw *hw, bool *data)\n+STATIC void e1000_clock_in_i2c_bit(struct e1000_hw *hw, bool *data)\n {\n \tu32 i2cctl = E1000_READ_REG(hw, E1000_I2CPARAMS);\n \n@@ -3591,8 +3587,6 @@ STATIC s32 e1000_clock_in_i2c_bit(struct e1000_hw *hw, bool *data)\n \n \t/* Minimum low period of clock is 4.7 us */\n \tusec_delay(E1000_I2C_T_LOW);\n-\n-\treturn E1000_SUCCESS;\n }\n \n /**\n", "prefixes": [ "18/70" ] }{ "id": 71885, "url": "