vxge: make function table const

All tables of function pointers should be const.
The pre-existing code has lots of needless indirection...

Inspired by similar change in PAX.
Compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
此提交包含在:
stephen hemminger
2011-09-16 11:10:01 +00:00
提交者 David S. Miller
父節點 d91d25d537
當前提交 956a206620
共有 4 個檔案被更改,包括 20 行新增17 行删除

查看文件

@@ -740,7 +740,7 @@ struct __vxge_hw_device {
struct vxge_hw_device_config config;
enum vxge_hw_device_link_state link_state;
struct vxge_hw_uld_cbs uld_callbacks;
const struct vxge_hw_uld_cbs *uld_callbacks;
u32 host_type;
u32 func_id;
@@ -840,7 +840,7 @@ struct vxge_hw_device_hw_info {
struct vxge_hw_device_attr {
void __iomem *bar0;
struct pci_dev *pdev;
struct vxge_hw_uld_cbs uld_callbacks;
const struct vxge_hw_uld_cbs *uld_callbacks;
};
#define VXGE_HW_DEVICE_LINK_STATE_SET(hldev, ls) (hldev->link_state = ls)