Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/605076/?format=api
{ "id": 605076, "url": "http://patchwork.ozlabs.org/api/patches/605076/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1459552659-22959-6-git-send-email-jacob.e.keller@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": "<1459552659-22959-6-git-send-email-jacob.e.keller@intel.com>", "list_archive_url": null, "date": "2016-04-01T23:17:35", "name": "[v1,5/9] fm10k: fix documentation of fm10k_tlv_parse_attr", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "21c59b3c721c7563e6e35edfc567271241f6aa0d", "submitter": { "id": 9784, "url": "http://patchwork.ozlabs.org/api/people/9784/?format=api", "name": "Jacob Keller", "email": "jacob.e.keller@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/1459552659-22959-6-git-send-email-jacob.e.keller@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/605076/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/605076/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 whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ozlabs.org (Postfix) with ESMTP id 3qcHNf0w2Zz9s9Y\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 2 Apr 2016 10:17:54 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 67C4A91F5D;\n\tFri, 1 Apr 2016 23:17:53 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id jR9yiHFbI82j; Fri, 1 Apr 2016 23:17:49 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id E367591F91;\n\tFri, 1 Apr 2016 23:17:48 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id DA40D1C11DF\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 1 Apr 2016 23:17:44 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id D7371956CB\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 1 Apr 2016 23:17:44 +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 bHX86Vp-j5gU for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 1 Apr 2016 23:17:43 +0000 (UTC)", "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 3225195584\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 1 Apr 2016 23:17:43 +0000 (UTC)", "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby fmsmga104.fm.intel.com with ESMTP; 01 Apr 2016 16:17:42 -0700", "from jekeller-desk.amr.corp.intel.com (HELO\n\tjekeller-desk.jekeller.internal) ([134.134.3.173])\n\tby fmsmga002.fm.intel.com with ESMTP; 01 Apr 2016 16:17:42 -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.24,428,1455004800\"; d=\"scan'208\";a=\"949958945\"", "From": "Jacob Keller <jacob.e.keller@intel.com>", "To": "Intel Wired LAN <intel-wired-lan@lists.osuosl.org>", "Date": "Fri, 1 Apr 2016 16:17:35 -0700", "Message-Id": "<1459552659-22959-6-git-send-email-jacob.e.keller@intel.com>", "X-Mailer": "git-send-email 2.8.0.rc1.177.g5628860", "In-Reply-To": "<1459552659-22959-1-git-send-email-jacob.e.keller@intel.com>", "References": "<1459552659-22959-1-git-send-email-jacob.e.keller@intel.com>", "Subject": "[Intel-wired-lan] [PATCH v1 5/9] fm10k: fix documentation of\n\tfm10k_tlv_parse_attr", "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>", "MIME-Version": "1.0", "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": "fm10k_tlv_parse_attr is supposed to return FM10K_NOT_IMPLEMENTED for any\nTLV who's attribute id lies outside the range of results. It does not do\nthis today. In addition, the documentation does not indicate that other\nattributes which are not implemented for a given TLV will be silently\nignored. Fix this. Clean up the logic so that we don't rely on the fact\nthat FM10K_NOT_IMPLEMENTED is greater than zero, as this can easily\ncause confusion.\n\nA future extension could look into some way of reporting unknown TLVs\nin order to make issues more easily discoverable. We can't just return\nFM10K_NOT_IMPLEMENTED here because we don't want to drop the entire\nmessage if it has an unknown TLV.\n\nWhile here, update the copyright year.\n\nSigned-off-by: Jacob Keller <jacob.e.keller@intel.com>\n---\n drivers/net/ethernet/intel/fm10k/fm10k_tlv.c | 18 ++++++++++--------\n 1 file changed, 10 insertions(+), 8 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_tlv.c b/drivers/net/ethernet/intel/fm10k/fm10k_tlv.c\nindex b999897e50d8..6b500a6378e0 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_tlv.c\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k_tlv.c\n@@ -1,5 +1,5 @@\n /* Intel Ethernet Switch Host Interface Driver\n- * Copyright(c) 2013 - 2015 Intel Corporation.\n+ * Copyright(c) 2013 - 2016 Intel Corporation.\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms and conditions of the GNU General Public License,\n@@ -481,7 +481,8 @@ static s32 fm10k_tlv_attr_validate(u32 *attr,\n * up into an array of pointers stored in results. The function will\n * return FM10K_ERR_PARAM on any input or message error,\n * FM10K_NOT_IMPLEMENTED for any attribute that is outside of the array\n- * and 0 on success.\n+ * and 0 on success. Any attributes not found in tlv_attr will be silently\n+ * ignored.\n **/\n static s32 fm10k_tlv_attr_parse(u32 *attr, u32 **results,\n \t\t\t\tconst struct fm10k_tlv_attr *tlv_attr)\n@@ -518,14 +519,15 @@ static s32 fm10k_tlv_attr_parse(u32 *attr, u32 **results,\n \twhile (offset < len) {\n \t\tattr_id = *attr & FM10K_TLV_ID_MASK;\n \n-\t\tif (attr_id < FM10K_TLV_RESULTS_MAX)\n-\t\t\terr = fm10k_tlv_attr_validate(attr, tlv_attr);\n-\t\telse\n-\t\t\terr = FM10K_NOT_IMPLEMENTED;\n+\t\tif (attr_id >= FM10K_TLV_RESULTS_MAX)\n+\t\t\treturn FM10K_NOT_IMPLEMENTED;\n \n-\t\tif (err < 0)\n+\t\terr = fm10k_tlv_attr_validate(attr, tlv_attr);\n+\t\tif (err == FM10K_NOT_IMPLEMENTED)\n+\t\t\t; /* silently ignore non-implemented attributes */\n+\t\telse if (err)\n \t\t\treturn err;\n-\t\tif (!err)\n+\t\telse\n \t\t\tresults[attr_id] = attr;\n \n \t\t/* update offset */\n", "prefixes": [ "v1", "5/9" ] }