get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 564390,
    "url": "http://patchwork.ozlabs.org/api/patches/564390/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20160107181303.82798.52945.stgit@mdrustad-wks.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": "<20160107181303.82798.52945.stgit@mdrustad-wks.jf.intel.com>",
    "list_archive_url": null,
    "date": "2016-01-07T18:13:03",
    "name": "ixgbe: Make all unchanging ops structures const",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "7b158f36caa3400cc71cc9c1abc0b561a897e83e",
    "submitter": {
        "id": 13252,
        "url": "http://patchwork.ozlabs.org/api/people/13252/?format=api",
        "name": "Rustad, Mark D",
        "email": "mark.d.rustad@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/20160107181303.82798.52945.stgit@mdrustad-wks.jf.intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/564390/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/564390/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 E4C561402B4\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  8 Jan 2016 05:13:12 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 465658BC04;\n\tThu,  7 Jan 2016 18:13:11 +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 sp3eDOVfOhHV; Thu,  7 Jan 2016 18:13:07 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id CB6428B656;\n\tThu,  7 Jan 2016 18:13:07 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 4F3B81C097E\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  7 Jan 2016 18:13:07 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 4A8D99361B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  7 Jan 2016 18:13:07 +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 zC4RAF-Jg3iy for <intel-wired-lan@lists.osuosl.org>;\n\tThu,  7 Jan 2016 18:13:04 +0000 (UTC)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 5002493608\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  7 Jan 2016 18:13:04 +0000 (UTC)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby fmsmga104.fm.intel.com with ESMTP; 07 Jan 2016 10:13:04 -0800",
            "from mdrustad-wks.jf.intel.com ([134.134.176.85])\n\tby fmsmga002.fm.intel.com with ESMTP; 07 Jan 2016 10:13:04 -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,533,1444719600\"; d=\"scan'208\";a=\"888404435\"",
        "From": "Mark D Rustad <mark.d.rustad@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Thu, 07 Jan 2016 10:13:03 -0800",
        "Message-ID": "<20160107181303.82798.52945.stgit@mdrustad-wks.jf.intel.com>",
        "User-Agent": "StGit/unknown-version",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [PATCH] ixgbe: Make all unchanging ops structures\n\tconst",
        "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": "The source for the ops structure contents are const, so make them\nso. Copy them in place with structure assignments instead of memcpys.\nMake the mbx_ops accessed by reference instead of making a copy of\nthe source structure. Update copyright date on the touched files.\n\nReported-by: Julia Lawall <Julia.Lawall@lip6.fr>\nSigned-off-by: Mark Rustad <mark.d.rustad@intel.com>\n---\nChanges in V2:\n- Access mbx_ops by reference instead of copying the structure. Saves a\n  little bloat.\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe.h       |   12 ++++---\n drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c |   10 +++---\n drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c |   10 +++---\n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c  |   10 +++---\n drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c   |   40 ++++++++++++------------\n drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h   |    4 +-\n drivers/net/ethernet/intel/ixgbe/ixgbe_type.h  |   12 ++++---\n drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c  |   10 +++---\n drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c  |   18 +++++------\n 9 files changed, 63 insertions(+), 63 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\nindex 5afd21cd0532..75dfbc36e138 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n@@ -1,7 +1,7 @@\n /*******************************************************************************\n \n   Intel 10 Gigabit PCI Express Linux driver\n-  Copyright(c) 1999 - 2013 Intel Corporation.\n+  Copyright(c) 1999 - 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@@ -860,11 +860,11 @@ enum ixgbe_boards {\n \tboard_X550EM_x,\n };\n \n-extern struct ixgbe_info ixgbe_82598_info;\n-extern struct ixgbe_info ixgbe_82599_info;\n-extern struct ixgbe_info ixgbe_X540_info;\n-extern struct ixgbe_info ixgbe_X550_info;\n-extern struct ixgbe_info ixgbe_X550EM_x_info;\n+extern const struct ixgbe_info ixgbe_82598_info;\n+extern const struct ixgbe_info ixgbe_82599_info;\n+extern const struct ixgbe_info ixgbe_X540_info;\n+extern const struct ixgbe_info ixgbe_X550_info;\n+extern const struct ixgbe_info ixgbe_X550EM_x_info;\n #ifdef CONFIG_IXGBE_DCB\n extern const struct dcbnl_rtnl_ops dcbnl_ops;\n #endif\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c\nindex d8a9fb8a59e2..9790d0274f7f 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c\n@@ -1,7 +1,7 @@\n /*******************************************************************************\n \n   Intel 10 Gigabit PCI Express Linux driver\n-  Copyright(c) 1999 - 2015 Intel Corporation.\n+  Copyright(c) 1999 - 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@@ -1160,7 +1160,7 @@ static void ixgbe_set_rxpba_82598(struct ixgbe_hw *hw, int num_pb,\n \t\tIXGBE_WRITE_REG(hw, IXGBE_TXPBSIZE(i), IXGBE_TXPBSIZE_40KB);\n }\n \n-static struct ixgbe_mac_operations mac_ops_82598 = {\n+static const struct ixgbe_mac_operations mac_ops_82598 = {\n \t.init_hw\t\t= &ixgbe_init_hw_generic,\n \t.reset_hw\t\t= &ixgbe_reset_hw_82598,\n \t.start_hw\t\t= &ixgbe_start_hw_82598,\n@@ -1203,7 +1203,7 @@ static struct ixgbe_mac_operations mac_ops_82598 = {\n \t.disable_rx\t\t= &ixgbe_disable_rx_generic,\n };\n \n-static struct ixgbe_eeprom_operations eeprom_ops_82598 = {\n+static const struct ixgbe_eeprom_operations eeprom_ops_82598 = {\n \t.init_params\t\t= &ixgbe_init_eeprom_params_generic,\n \t.read\t\t\t= &ixgbe_read_eerd_generic,\n \t.write\t\t\t= &ixgbe_write_eeprom_generic,\n@@ -1214,7 +1214,7 @@ static struct ixgbe_eeprom_operations eeprom_ops_82598 = {\n \t.update_checksum\t= &ixgbe_update_eeprom_checksum_generic,\n };\n \n-static struct ixgbe_phy_operations phy_ops_82598 = {\n+static const struct ixgbe_phy_operations phy_ops_82598 = {\n \t.identify\t\t= &ixgbe_identify_phy_generic,\n \t.identify_sfp\t\t= &ixgbe_identify_module_generic,\n \t.init\t\t\t= &ixgbe_init_phy_ops_82598,\n@@ -1230,7 +1230,7 @@ static struct ixgbe_phy_operations phy_ops_82598 = {\n \t.check_overtemp\t\t= &ixgbe_tn_check_overtemp,\n };\n \n-struct ixgbe_info ixgbe_82598_info = {\n+const struct ixgbe_info ixgbe_82598_info = {\n \t.mac\t\t\t= ixgbe_mac_82598EB,\n \t.get_invariants\t\t= &ixgbe_get_invariants_82598,\n \t.mac_ops\t\t= &mac_ops_82598,\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c\nindex fa8d4f40ac2a..b276fe0bc665 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c\n@@ -1,7 +1,7 @@\n /*******************************************************************************\n \n   Intel 10 Gigabit PCI Express Linux driver\n-  Copyright(c) 1999 - 2015 Intel Corporation.\n+  Copyright(c) 1999 - 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@@ -2181,7 +2181,7 @@ release_i2c_access:\n \treturn status;\n }\n \n-static struct ixgbe_mac_operations mac_ops_82599 = {\n+static const struct ixgbe_mac_operations mac_ops_82599 = {\n \t.init_hw                = &ixgbe_init_hw_generic,\n \t.reset_hw               = &ixgbe_reset_hw_82599,\n \t.start_hw               = &ixgbe_start_hw_82599,\n@@ -2235,7 +2235,7 @@ static struct ixgbe_mac_operations mac_ops_82599 = {\n \t.disable_rx\t\t= &ixgbe_disable_rx_generic,\n };\n \n-static struct ixgbe_eeprom_operations eeprom_ops_82599 = {\n+static const struct ixgbe_eeprom_operations eeprom_ops_82599 = {\n \t.init_params\t\t= &ixgbe_init_eeprom_params_generic,\n \t.read\t\t\t= &ixgbe_read_eeprom_82599,\n \t.read_buffer\t\t= &ixgbe_read_eeprom_buffer_82599,\n@@ -2246,7 +2246,7 @@ static struct ixgbe_eeprom_operations eeprom_ops_82599 = {\n \t.update_checksum\t= &ixgbe_update_eeprom_checksum_generic,\n };\n \n-static struct ixgbe_phy_operations phy_ops_82599 = {\n+static const struct ixgbe_phy_operations phy_ops_82599 = {\n \t.identify\t\t= &ixgbe_identify_phy_82599,\n \t.identify_sfp\t\t= &ixgbe_identify_module_generic,\n \t.init\t\t\t= &ixgbe_init_phy_ops_82599,\n@@ -2263,7 +2263,7 @@ static struct ixgbe_phy_operations phy_ops_82599 = {\n \t.check_overtemp\t\t= &ixgbe_tn_check_overtemp,\n };\n \n-struct ixgbe_info ixgbe_82599_info = {\n+const struct ixgbe_info ixgbe_82599_info = {\n \t.mac                    = ixgbe_mac_82599EB,\n \t.get_invariants         = &ixgbe_get_invariants_82599,\n \t.mac_ops                = &mac_ops_82599,\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex 202691793b38..4814f440273d 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -1,7 +1,7 @@\n /*******************************************************************************\n \n   Intel 10 Gigabit PCI Express Linux driver\n-  Copyright(c) 1999 - 2015 Intel Corporation.\n+  Copyright(c) 1999 - 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@@ -8926,12 +8926,12 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \tstrlcpy(netdev->name, pci_name(pdev), sizeof(netdev->name));\n \n \t/* Setup hw api */\n-\tmemcpy(&hw->mac.ops, ii->mac_ops, sizeof(hw->mac.ops));\n+\thw->mac.ops   = *ii->mac_ops;\n \thw->mac.type  = ii->mac;\n \thw->mvals     = ii->mvals;\n \n \t/* EEPROM */\n-\tmemcpy(&hw->eeprom.ops, ii->eeprom_ops, sizeof(hw->eeprom.ops));\n+\thw->eeprom.ops = *ii->eeprom_ops;\n \teec = IXGBE_READ_REG(hw, IXGBE_EEC(hw));\n \tif (ixgbe_removed(hw->hw_addr)) {\n \t\terr = -EIO;\n@@ -8942,7 +8942,7 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \t\thw->eeprom.ops.read = &ixgbe_read_eeprom_bit_bang_generic;\n \n \t/* PHY */\n-\tmemcpy(&hw->phy.ops, ii->phy_ops, sizeof(hw->phy.ops));\n+\thw->phy.ops = *ii->phy_ops;\n \thw->phy.sfp_type = ixgbe_sfp_type_unknown;\n \t/* ixgbe_identify_phy_generic will set prtad and mmds properly */\n \thw->phy.mdio.prtad = MDIO_PRTAD_NONE;\n@@ -9005,7 +9005,7 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \t\tgoto skip_sriov;\n \t/* Mailbox */\n \tixgbe_init_mbx_params_pf(hw);\n-\tmemcpy(&hw->mbx.ops, ii->mbx_ops, sizeof(hw->mbx.ops));\n+\thw->mbx.ops = ii->mbx_ops;\n \tpci_sriov_set_totalvfs(pdev, IXGBE_MAX_VFS_DRV_LIMIT);\n \tixgbe_enable_sriov(adapter);\n skip_sriov:\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c\nindex 9993a471d668..2837c94d6e35 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c\n@@ -1,7 +1,7 @@\n /*******************************************************************************\n \n   Intel 10 Gigabit PCI Express Linux driver\n-  Copyright(c) 1999 - 2014 Intel Corporation.\n+  Copyright(c) 1999 - 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@@ -48,10 +48,10 @@ s32 ixgbe_read_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size, u16 mbx_id)\n \tif (size > mbx->size)\n \t\tsize = mbx->size;\n \n-\tif (!mbx->ops.read)\n+\tif (!mbx->ops)\n \t\treturn IXGBE_ERR_MBX;\n \n-\treturn mbx->ops.read(hw, msg, size, mbx_id);\n+\treturn mbx->ops->read(hw, msg, size, mbx_id);\n }\n \n /**\n@@ -70,10 +70,10 @@ s32 ixgbe_write_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size, u16 mbx_id)\n \tif (size > mbx->size)\n \t\treturn IXGBE_ERR_MBX;\n \n-\tif (!mbx->ops.write)\n+\tif (!mbx->ops)\n \t\treturn IXGBE_ERR_MBX;\n \n-\treturn mbx->ops.write(hw, msg, size, mbx_id);\n+\treturn mbx->ops->write(hw, msg, size, mbx_id);\n }\n \n /**\n@@ -87,10 +87,10 @@ s32 ixgbe_check_for_msg(struct ixgbe_hw *hw, u16 mbx_id)\n {\n \tstruct ixgbe_mbx_info *mbx = &hw->mbx;\n \n-\tif (!mbx->ops.check_for_msg)\n+\tif (!mbx->ops)\n \t\treturn IXGBE_ERR_MBX;\n \n-\treturn mbx->ops.check_for_msg(hw, mbx_id);\n+\treturn mbx->ops->check_for_msg(hw, mbx_id);\n }\n \n /**\n@@ -104,10 +104,10 @@ s32 ixgbe_check_for_ack(struct ixgbe_hw *hw, u16 mbx_id)\n {\n \tstruct ixgbe_mbx_info *mbx = &hw->mbx;\n \n-\tif (!mbx->ops.check_for_ack)\n+\tif (!mbx->ops)\n \t\treturn IXGBE_ERR_MBX;\n \n-\treturn mbx->ops.check_for_ack(hw, mbx_id);\n+\treturn mbx->ops->check_for_ack(hw, mbx_id);\n }\n \n /**\n@@ -121,10 +121,10 @@ s32 ixgbe_check_for_rst(struct ixgbe_hw *hw, u16 mbx_id)\n {\n \tstruct ixgbe_mbx_info *mbx = &hw->mbx;\n \n-\tif (!mbx->ops.check_for_rst)\n+\tif (!mbx->ops)\n \t\treturn IXGBE_ERR_MBX;\n \n-\treturn mbx->ops.check_for_rst(hw, mbx_id);\n+\treturn mbx->ops->check_for_rst(hw, mbx_id);\n }\n \n /**\n@@ -139,10 +139,10 @@ static s32 ixgbe_poll_for_msg(struct ixgbe_hw *hw, u16 mbx_id)\n \tstruct ixgbe_mbx_info *mbx = &hw->mbx;\n \tint countdown = mbx->timeout;\n \n-\tif (!countdown || !mbx->ops.check_for_msg)\n+\tif (!countdown || !mbx->ops)\n \t\treturn IXGBE_ERR_MBX;\n \n-\twhile (mbx->ops.check_for_msg(hw, mbx_id)) {\n+\twhile (mbx->ops->check_for_msg(hw, mbx_id)) {\n \t\tcountdown--;\n \t\tif (!countdown)\n \t\t\treturn IXGBE_ERR_MBX;\n@@ -164,10 +164,10 @@ static s32 ixgbe_poll_for_ack(struct ixgbe_hw *hw, u16 mbx_id)\n \tstruct ixgbe_mbx_info *mbx = &hw->mbx;\n \tint countdown = mbx->timeout;\n \n-\tif (!countdown || !mbx->ops.check_for_ack)\n+\tif (!countdown || !mbx->ops)\n \t\treturn IXGBE_ERR_MBX;\n \n-\twhile (mbx->ops.check_for_ack(hw, mbx_id)) {\n+\twhile (mbx->ops->check_for_ack(hw, mbx_id)) {\n \t\tcountdown--;\n \t\tif (!countdown)\n \t\t\treturn IXGBE_ERR_MBX;\n@@ -193,7 +193,7 @@ static s32 ixgbe_read_posted_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size,\n \tstruct ixgbe_mbx_info *mbx = &hw->mbx;\n \ts32 ret_val;\n \n-\tif (!mbx->ops.read)\n+\tif (!mbx->ops)\n \t\treturn IXGBE_ERR_MBX;\n \n \tret_val = ixgbe_poll_for_msg(hw, mbx_id);\n@@ -201,7 +201,7 @@ static s32 ixgbe_read_posted_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size,\n \t\treturn ret_val;\n \n \t/* if ack received read message */\n-\treturn mbx->ops.read(hw, msg, size, mbx_id);\n+\treturn mbx->ops->read(hw, msg, size, mbx_id);\n }\n \n /**\n@@ -221,11 +221,11 @@ static s32 ixgbe_write_posted_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size,\n \ts32 ret_val;\n \n \t/* exit if either we can't write or there isn't a defined timeout */\n-\tif (!mbx->ops.write || !mbx->timeout)\n+\tif (!mbx->ops || !mbx->timeout)\n \t\treturn IXGBE_ERR_MBX;\n \n \t/* send msg */\n-\tret_val = mbx->ops.write(hw, msg, size, mbx_id);\n+\tret_val = mbx->ops->write(hw, msg, size, mbx_id);\n \tif (ret_val)\n \t\treturn ret_val;\n \n@@ -446,7 +446,7 @@ void ixgbe_init_mbx_params_pf(struct ixgbe_hw *hw)\n }\n #endif /* CONFIG_PCI_IOV */\n \n-struct ixgbe_mbx_operations mbx_ops_generic = {\n+const struct ixgbe_mbx_operations mbx_ops_generic = {\n \t.read                   = ixgbe_read_mbx_pf,\n \t.write                  = ixgbe_write_mbx_pf,\n \t.read_posted            = ixgbe_read_posted_mbx,\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h\nindex 8daa95f74548..01c2667c0f92 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h\n@@ -1,7 +1,7 @@\n /*******************************************************************************\n \n   Intel 10 Gigabit PCI Express Linux driver\n-  Copyright(c) 1999 - 2013 Intel Corporation.\n+  Copyright(c) 1999 - 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@@ -123,6 +123,6 @@ s32 ixgbe_check_for_rst(struct ixgbe_hw *, u16);\n void ixgbe_init_mbx_params_pf(struct ixgbe_hw *);\n #endif /* CONFIG_PCI_IOV */\n \n-extern struct ixgbe_mbx_operations mbx_ops_generic;\n+extern const struct ixgbe_mbx_operations mbx_ops_generic;\n \n #endif /* _IXGBE_MBX_H_ */\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\nindex bf7367a08716..29e0b0e1cb67 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\n@@ -1,7 +1,7 @@\n /*******************************************************************************\n \n   Intel 10 Gigabit PCI Express Linux driver\n-  Copyright(c) 1999 - 2015 Intel Corporation.\n+  Copyright(c) 1999 - 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@@ -3442,7 +3442,7 @@ struct ixgbe_mbx_stats {\n };\n \n struct ixgbe_mbx_info {\n-\tstruct ixgbe_mbx_operations ops;\n+\tconst struct ixgbe_mbx_operations *ops;\n \tstruct ixgbe_mbx_stats stats;\n \tu32 timeout;\n \tu32 usec_delay;\n@@ -3475,10 +3475,10 @@ struct ixgbe_hw {\n struct ixgbe_info {\n \tenum ixgbe_mac_type\t\tmac;\n \ts32 \t\t\t\t(*get_invariants)(struct ixgbe_hw *);\n-\tstruct ixgbe_mac_operations\t*mac_ops;\n-\tstruct ixgbe_eeprom_operations\t*eeprom_ops;\n-\tstruct ixgbe_phy_operations\t*phy_ops;\n-\tstruct ixgbe_mbx_operations\t*mbx_ops;\n+\tconst struct ixgbe_mac_operations\t*mac_ops;\n+\tconst struct ixgbe_eeprom_operations\t*eeprom_ops;\n+\tconst struct ixgbe_phy_operations\t*phy_ops;\n+\tconst struct ixgbe_mbx_operations\t*mbx_ops;\n \tconst u32\t\t\t*mvals;\n };\n \ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c\nindex 2358c1b7d586..0d69564f3a1b 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c\n@@ -1,7 +1,7 @@\n /*******************************************************************************\n \n   Intel 10 Gigabit PCI Express Linux driver\n-  Copyright(c) 1999 - 2014 Intel Corporation.\n+  Copyright(c) 1999 - 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@@ -810,7 +810,7 @@ s32 ixgbe_blink_led_stop_X540(struct ixgbe_hw *hw, u32 index)\n \n \treturn 0;\n }\n-static struct ixgbe_mac_operations mac_ops_X540 = {\n+static const struct ixgbe_mac_operations mac_ops_X540 = {\n \t.init_hw                = &ixgbe_init_hw_generic,\n \t.reset_hw               = &ixgbe_reset_hw_X540,\n \t.start_hw               = &ixgbe_start_hw_X540,\n@@ -863,7 +863,7 @@ static struct ixgbe_mac_operations mac_ops_X540 = {\n \t.disable_rx\t\t= &ixgbe_disable_rx_generic,\n };\n \n-static struct ixgbe_eeprom_operations eeprom_ops_X540 = {\n+static const struct ixgbe_eeprom_operations eeprom_ops_X540 = {\n \t.init_params            = &ixgbe_init_eeprom_params_X540,\n \t.read                   = &ixgbe_read_eerd_X540,\n \t.read_buffer\t\t= &ixgbe_read_eerd_buffer_X540,\n@@ -874,7 +874,7 @@ static struct ixgbe_eeprom_operations eeprom_ops_X540 = {\n \t.update_checksum        = &ixgbe_update_eeprom_checksum_X540,\n };\n \n-static struct ixgbe_phy_operations phy_ops_X540 = {\n+static const struct ixgbe_phy_operations phy_ops_X540 = {\n \t.identify               = &ixgbe_identify_phy_generic,\n \t.identify_sfp           = &ixgbe_identify_sfp_module_generic,\n \t.init\t\t\t= NULL,\n@@ -897,7 +897,7 @@ static const u32 ixgbe_mvals_X540[IXGBE_MVALS_IDX_LIMIT] = {\n \tIXGBE_MVALS_INIT(X540)\n };\n \n-struct ixgbe_info ixgbe_X540_info = {\n+const struct ixgbe_info ixgbe_X540_info = {\n \t.mac                    = ixgbe_mac_X540,\n \t.get_invariants         = &ixgbe_get_invariants_X540,\n \t.mac_ops                = &mac_ops_X540,\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\nindex 87aca3f7c3de..eae344fcfe7a 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\n@@ -1,7 +1,7 @@\n /*******************************************************************************\n  *\n  *  Intel 10 Gigabit PCI Express Linux driver\n- *  Copyright(c) 1999 - 2015 Intel Corporation.\n+ *  Copyright(c) 1999 - 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@@ -2342,7 +2342,7 @@ static void ixgbe_release_swfw_sync_X550em(struct ixgbe_hw *hw, u32 mask)\n \t.enable_rx\t\t\t= &ixgbe_enable_rx_generic, \\\n \t.disable_rx\t\t\t= &ixgbe_disable_rx_x550, \\\n \n-static struct ixgbe_mac_operations mac_ops_X550 = {\n+static const struct ixgbe_mac_operations mac_ops_X550 = {\n \tX550_COMMON_MAC\n \t.reset_hw\t\t= &ixgbe_reset_hw_X540,\n \t.get_media_type\t\t= &ixgbe_get_media_type_X540,\n@@ -2356,7 +2356,7 @@ static struct ixgbe_mac_operations mac_ops_X550 = {\n \t.release_swfw_sync\t= &ixgbe_release_swfw_sync_X540,\n };\n \n-static struct ixgbe_mac_operations mac_ops_X550EM_x = {\n+static const struct ixgbe_mac_operations mac_ops_X550EM_x = {\n \tX550_COMMON_MAC\n \t.reset_hw\t\t= &ixgbe_reset_hw_X550em,\n \t.get_media_type\t\t= &ixgbe_get_media_type_X550em,\n@@ -2379,12 +2379,12 @@ static struct ixgbe_mac_operations mac_ops_X550EM_x = {\n \t.update_checksum\t= &ixgbe_update_eeprom_checksum_X550, \\\n \t.calc_checksum\t\t= &ixgbe_calc_eeprom_checksum_X550, \\\n \n-static struct ixgbe_eeprom_operations eeprom_ops_X550 = {\n+static const struct ixgbe_eeprom_operations eeprom_ops_X550 = {\n \tX550_COMMON_EEP\n \t.init_params\t\t= &ixgbe_init_eeprom_params_X550,\n };\n \n-static struct ixgbe_eeprom_operations eeprom_ops_X550EM_x = {\n+static const struct ixgbe_eeprom_operations eeprom_ops_X550EM_x = {\n \tX550_COMMON_EEP\n \t.init_params\t\t= &ixgbe_init_eeprom_params_X540,\n };\n@@ -2405,13 +2405,13 @@ static struct ixgbe_eeprom_operations eeprom_ops_X550EM_x = {\n \t.check_overtemp\t\t= &ixgbe_tn_check_overtemp, \\\n \t.get_firmware_version\t= &ixgbe_get_phy_firmware_version_generic,\n \n-static struct ixgbe_phy_operations phy_ops_X550 = {\n+static const struct ixgbe_phy_operations phy_ops_X550 = {\n \tX550_COMMON_PHY\n \t.init\t\t\t= NULL,\n \t.identify\t\t= &ixgbe_identify_phy_generic,\n };\n \n-static struct ixgbe_phy_operations phy_ops_X550EM_x = {\n+static const struct ixgbe_phy_operations phy_ops_X550EM_x = {\n \tX550_COMMON_PHY\n \t.init\t\t\t= &ixgbe_init_phy_ops_X550em,\n \t.identify\t\t= &ixgbe_identify_phy_x550em,\n@@ -2430,7 +2430,7 @@ static const u32 ixgbe_mvals_X550EM_x[IXGBE_MVALS_IDX_LIMIT] = {\n \tIXGBE_MVALS_INIT(X550EM_x)\n };\n \n-struct ixgbe_info ixgbe_X550_info = {\n+const struct ixgbe_info ixgbe_X550_info = {\n \t.mac\t\t\t= ixgbe_mac_X550,\n \t.get_invariants\t\t= &ixgbe_get_invariants_X540,\n \t.mac_ops\t\t= &mac_ops_X550,\n@@ -2440,7 +2440,7 @@ struct ixgbe_info ixgbe_X550_info = {\n \t.mvals\t\t\t= ixgbe_mvals_X550,\n };\n \n-struct ixgbe_info ixgbe_X550EM_x_info = {\n+const struct ixgbe_info ixgbe_X550EM_x_info = {\n \t.mac\t\t\t= ixgbe_mac_X550EM_x,\n \t.get_invariants\t\t= &ixgbe_get_invariants_X550_x,\n \t.mac_ops\t\t= &mac_ops_X550EM_x,\n",
    "prefixes": []
}