qlcnic: constify qlcnic_dcb_ops structures
authorJulia Lawall <julia.lawall@lip6.fr>
Sun, 27 Dec 2015 21:01:29 +0000 (22:01 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Dec 2015 05:44:52 +0000 (00:44 -0500)
The qlcnic_dcb_ops structures are never modified, so declare them as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h

index a72bcddf160ac2eb65f03438615d29aaa40e434e..4b76c69fe86d2aaa8609456277b767f1993bffe4 100644 (file)
@@ -167,7 +167,7 @@ struct qlcnic_dcb_cfg {
        u32 version;
 };
 
-static struct qlcnic_dcb_ops qlcnic_83xx_dcb_ops = {
+static const struct qlcnic_dcb_ops qlcnic_83xx_dcb_ops = {
        .init_dcbnl_ops         = __qlcnic_init_dcbnl_ops,
        .free                   = __qlcnic_dcb_free,
        .attach                 = __qlcnic_dcb_attach,
@@ -180,7 +180,7 @@ static struct qlcnic_dcb_ops qlcnic_83xx_dcb_ops = {
        .aen_handler            = qlcnic_83xx_dcb_aen_handler,
 };
 
-static struct qlcnic_dcb_ops qlcnic_82xx_dcb_ops = {
+static const struct qlcnic_dcb_ops qlcnic_82xx_dcb_ops = {
        .init_dcbnl_ops         = __qlcnic_init_dcbnl_ops,
        .free                   = __qlcnic_dcb_free,
        .attach                 = __qlcnic_dcb_attach,
index 3cf4a10fbe1e07fd011729401247e19daacecb24..9777e571352534e8060d2f023b5a8135e5aae2b9 100644 (file)
@@ -37,7 +37,7 @@ struct qlcnic_dcb {
        struct qlcnic_adapter           *adapter;
        struct delayed_work             aen_work;
        struct workqueue_struct         *wq;
-       struct qlcnic_dcb_ops           *ops;
+       const struct qlcnic_dcb_ops     *ops;
        struct qlcnic_dcb_cfg           *cfg;
        unsigned long                   state;
 };