Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/554127/?format=api
{ "id": 554127, "url": "http://patchwork.ozlabs.org/api/patches/554127/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20151208235039.125723.9402.stgit@bwallan-cwp1.jf.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": "<20151208235039.125723.9402.stgit@bwallan-cwp1.jf.intel.com>", "list_archive_url": null, "date": "2015-12-08T23:50:39", "name": "[2/2] fm10k: constify fm10k_mac_ops, fm10k_iov_ops and fm10k_info structures", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "6f45e6db1ff3943de4acee57a4128a617cbdd13c", "submitter": { "id": 503, "url": "http://patchwork.ozlabs.org/api/people/503/?format=api", "name": "Allan, Bruce W", "email": "bruce.w.allan@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/20151208235039.125723.9402.stgit@bwallan-cwp1.jf.intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/554127/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/554127/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 B68BF1402B4\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 9 Dec 2015 10:50:42 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 150428C2C1;\n\tTue, 8 Dec 2015 23:50:42 +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 jb+VfB41ciDR; Tue, 8 Dec 2015 23:50:41 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 64CBE8ABB5;\n\tTue, 8 Dec 2015 23:50:41 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 9404F1BFC09\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 8 Dec 2015 23:50:39 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 8E6E68C240\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 8 Dec 2015 23:50:39 +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 Rvro96ZABWjR for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 8 Dec 2015 23:50:39 +0000 (UTC)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 0497A8C235\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 8 Dec 2015 23:50:38 +0000 (UTC)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga102.jf.intel.com with ESMTP; 08 Dec 2015 15:50:38 -0800", "from bwallan-cwp1.jf.intel.com (HELO bwallan-cwp1)\n\t([10.166.136.47])\n\tby FMSMGA003.fm.intel.com with ESMTP; 08 Dec 2015 15:50:39 -0800", "from bwallan-cwp1.jf.intel.com (localhost [127.0.0.1])\n\tby bwallan-cwp1 (8.15.2/8.15.1) with ESMTP id tB8Nod4f125758\n\tfor <intel-wired-lan@lists.osuosl.org>; Tue, 8 Dec 2015 15:50:39 -0800" ], "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.20,401,1444719600\"; d=\"scan'208\";a=\"614817318\"", "From": "Bruce Allan <bruce.w.allan@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Tue, 08 Dec 2015 15:50:39 -0800", "Message-ID": "<20151208235039.125723.9402.stgit@bwallan-cwp1.jf.intel.com>", "In-Reply-To": "<20151208235034.125723.15232.stgit@bwallan-cwp1.jf.intel.com>", "References": "<20151208235034.125723.15232.stgit@bwallan-cwp1.jf.intel.com>", "User-Agent": "StGit/0.17.1-dirty", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [PATCH 2/2] fm10k: constify fm10k_mac_ops,\n\tfm10k_iov_ops and fm10k_info structures", "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>", "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": "These structures never change so declare them as const.\n\nSigned-off-by: Bruce Allan <bruce.w.allan@intel.com>\n---\n drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 6 +++---\n drivers/net/ethernet/intel/fm10k/fm10k_pf.h | 2 +-\n drivers/net/ethernet/intel/fm10k/fm10k_type.h | 8 ++++----\n drivers/net/ethernet/intel/fm10k/fm10k_vf.c | 4 ++--\n drivers/net/ethernet/intel/fm10k/fm10k_vf.h | 2 +-\n 5 files changed, 11 insertions(+), 11 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pf.c b/drivers/net/ethernet/intel/fm10k/fm10k_pf.c\nindex 606c0f1..62ccebc 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_pf.c\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pf.c\n@@ -1866,7 +1866,7 @@ static const struct fm10k_msg_data fm10k_msg_data_pf[] = {\n \tFM10K_TLV_MSG_ERROR_HANDLER(fm10k_tlv_msg_error),\n };\n \n-static struct fm10k_mac_ops mac_ops_pf = {\n+static const struct fm10k_mac_ops mac_ops_pf = {\n \t.get_bus_info\t\t= fm10k_get_bus_info_generic,\n \t.reset_hw\t\t= fm10k_reset_hw_pf,\n \t.init_hw\t\t= fm10k_init_hw_pf,\n@@ -1889,7 +1889,7 @@ static struct fm10k_mac_ops mac_ops_pf = {\n \t.read_systime\t\t= fm10k_read_systime_pf,\n };\n \n-static struct fm10k_iov_ops iov_ops_pf = {\n+static const struct fm10k_iov_ops iov_ops_pf = {\n \t.assign_resources\t\t= fm10k_iov_assign_resources_pf,\n \t.configure_tc\t\t\t= fm10k_iov_configure_tc_pf,\n \t.assign_int_moderator\t\t= fm10k_iov_assign_int_moderator_pf,\n@@ -1908,7 +1908,7 @@ static s32 fm10k_get_invariants_pf(struct fm10k_hw *hw)\n \treturn fm10k_sm_mbx_init(hw, &hw->mbx, fm10k_msg_data_pf);\n }\n \n-struct fm10k_info fm10k_pf_info = {\n+const struct fm10k_info fm10k_pf_info = {\n \t.mac\t\t= fm10k_mac_pf,\n \t.get_invariants\t= fm10k_get_invariants_pf,\n \t.mac_ops\t= &mac_ops_pf,\ndiff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pf.h b/drivers/net/ethernet/intel/fm10k/fm10k_pf.h\nindex 3378592..b2d96b4 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_pf.h\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pf.h\n@@ -133,5 +133,5 @@ s32 fm10k_iov_msg_mac_vlan_pf(struct fm10k_hw *, u32 **,\n s32 fm10k_iov_msg_lport_state_pf(struct fm10k_hw *, u32 **,\n \t\t\t\t struct fm10k_mbx_info *);\n \n-extern struct fm10k_info fm10k_pf_info;\n+extern const struct fm10k_info fm10k_pf_info;\n #endif /* _FM10K_PF_H */\ndiff --git a/drivers/net/ethernet/intel/fm10k/fm10k_type.h b/drivers/net/ethernet/intel/fm10k/fm10k_type.h\nindex 098883d..bc27c75 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_type.h\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k_type.h\n@@ -660,10 +660,10 @@ enum fm10k_devices {\n };\n \n struct fm10k_info {\n-\tenum fm10k_mac_type\tmac;\n-\ts32\t\t\t(*get_invariants)(struct fm10k_hw *);\n-\tstruct fm10k_mac_ops\t*mac_ops;\n-\tstruct fm10k_iov_ops\t*iov_ops;\n+\tenum fm10k_mac_type\t\tmac;\n+\ts32\t\t\t\t(*get_invariants)(struct fm10k_hw *);\n+\tconst struct fm10k_mac_ops\t*mac_ops;\n+\tconst struct fm10k_iov_ops\t*iov_ops;\n };\n \n struct fm10k_hw {\ndiff --git a/drivers/net/ethernet/intel/fm10k/fm10k_vf.c b/drivers/net/ethernet/intel/fm10k/fm10k_vf.c\nindex 38219f5..91f8d73 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_vf.c\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k_vf.c\n@@ -562,7 +562,7 @@ static const struct fm10k_msg_data fm10k_msg_data_vf[] = {\n \tFM10K_TLV_MSG_ERROR_HANDLER(fm10k_tlv_msg_error),\n };\n \n-static struct fm10k_mac_ops mac_ops_vf = {\n+static const struct fm10k_mac_ops mac_ops_vf = {\n \t.get_bus_info\t\t= fm10k_get_bus_info_generic,\n \t.reset_hw\t\t= fm10k_reset_hw_vf,\n \t.init_hw\t\t= fm10k_init_hw_vf,\n@@ -590,7 +590,7 @@ static s32 fm10k_get_invariants_vf(struct fm10k_hw *hw)\n \treturn fm10k_pfvf_mbx_init(hw, &hw->mbx, fm10k_msg_data_vf, 0);\n }\n \n-struct fm10k_info fm10k_vf_info = {\n+const struct fm10k_info fm10k_vf_info = {\n \t.mac\t\t= fm10k_mac_vf,\n \t.get_invariants\t= fm10k_get_invariants_vf,\n \t.mac_ops\t= &mac_ops_vf,\ndiff --git a/drivers/net/ethernet/intel/fm10k/fm10k_vf.h b/drivers/net/ethernet/intel/fm10k/fm10k_vf.h\nindex 06a99d7..c4439f1 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_vf.h\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k_vf.h\n@@ -74,5 +74,5 @@ extern const struct fm10k_tlv_attr fm10k_1588_msg_attr[];\n #define FM10K_VF_MSG_1588_HANDLER(func) \\\n \tFM10K_MSG_HANDLER(FM10K_VF_MSG_ID_1588, fm10k_1588_msg_attr, func)\n \n-extern struct fm10k_info fm10k_vf_info;\n+extern const struct fm10k_info fm10k_vf_info;\n #endif /* _FM10K_VF_H */\n", "prefixes": [ "2/2" ] }