]> git.baikalelectronics.ru Git - kernel.git/commitdiff
s390/qeth: constify the disciplines
authorJulian Wiedmann <jwi@linux.ibm.com>
Thu, 1 Oct 2020 17:11:33 +0000 (19:11 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Oct 2020 23:22:49 +0000 (16:22 -0700)
The discipline struct is a fixed group of function pointers.
So declare the L2 and L3 disciplines as constant.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core.h
drivers/s390/net/qeth_l2_main.c
drivers/s390/net/qeth_l3_main.c

index 707a1634f6215a51bbe3adcf3feea7781b9b68f8..e5f47a823a111f0faf888ef606ff47af1f97ff66 100644 (file)
@@ -858,7 +858,7 @@ struct qeth_card {
        struct qeth_qdio_info qdio;
        int read_or_write_problem;
        struct qeth_osn_info osn_info;
-       struct qeth_discipline *discipline;
+       const struct qeth_discipline *discipline;
        atomic_t force_alloc_skb;
        struct service_level qeth_service_level;
        struct qdio_ssqd_desc ssqd;
@@ -1051,8 +1051,8 @@ static inline int qeth_send_simple_setassparms_v6(struct qeth_card *card,
 
 int qeth_get_priority_queue(struct qeth_card *card, struct sk_buff *skb);
 
-extern struct qeth_discipline qeth_l2_discipline;
-extern struct qeth_discipline qeth_l3_discipline;
+extern const struct qeth_discipline qeth_l2_discipline;
+extern const struct qeth_discipline qeth_l3_discipline;
 extern const struct ethtool_ops qeth_ethtool_ops;
 extern const struct ethtool_ops qeth_osn_ethtool_ops;
 extern const struct attribute_group *qeth_generic_attr_groups[];
index c0ceeddd1549751ce38eaaa03a89bea8c6a06848..2e9d3fea60e647a79045f470cf8ed69235aa9ab4 100644 (file)
@@ -2340,7 +2340,7 @@ static int qeth_l2_control_event(struct qeth_card *card,
        }
 }
 
-struct qeth_discipline qeth_l2_discipline = {
+const struct qeth_discipline qeth_l2_discipline = {
        .devtype = &qeth_l2_devtype,
        .setup = qeth_l2_probe_device,
        .remove = qeth_l2_remove_device,
index 803ccbcf3511bac2194632b917347f251b7fbd6e..4db7ded88fc8ee723992683244aa910a0e6992f7 100644 (file)
@@ -2073,7 +2073,7 @@ static int qeth_l3_control_event(struct qeth_card *card,
        return 1;
 }
 
-struct qeth_discipline qeth_l3_discipline = {
+const struct qeth_discipline qeth_l3_discipline = {
        .devtype = &qeth_l3_devtype,
        .setup = qeth_l3_probe_device,
        .remove = qeth_l3_remove_device,