]> git.itanic.dy.fi Git - linux-stable/commitdiff
net: fman: Specify type of mac_dev for exception_cb
authorSean Anderson <sean.anderson@seco.com>
Fri, 2 Sep 2022 21:57:30 +0000 (17:57 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Sep 2022 13:27:39 +0000 (14:27 +0100)
Instead of using a void pointer for mac_dev, specify its type
explicitly.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Acked-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fman/fman_dtsec.c
drivers/net/ethernet/freescale/fman/fman_mac.h
drivers/net/ethernet/freescale/fman/fman_memac.c
drivers/net/ethernet/freescale/fman/fman_tgec.c
drivers/net/ethernet/freescale/fman/mac.c

index 09ad1117005aa0f1364f10fb8e7c3417016714a1..7acd5742403447b2adba123444ab8898c9718db5 100644 (file)
@@ -301,7 +301,7 @@ struct fman_mac {
        /* Ethernet physical interface */
        phy_interface_t phy_if;
        u16 max_speed;
-       void *dev_id; /* device cookie used by the exception cbs */
+       struct mac_device *dev_id; /* device cookie used by the exception cbs */
        fman_mac_exception_cb *exception_cb;
        fman_mac_exception_cb *event_cb;
        /* Number of individual addresses in registers for this station */
index 730aae7fed132a731772e8cf6a1aa62796f69378..65887a3160d7fc90f130b80c61b9f75b27e76462 100644 (file)
@@ -41,6 +41,7 @@
 #include <linux/if_ether.h>
 
 struct fman_mac;
+struct mac_device;
 
 /* Ethernet Address */
 typedef u8 enet_addr_t[ETH_ALEN];
@@ -158,8 +159,8 @@ struct eth_hash_entry {
        struct list_head node;
 };
 
-typedef void (fman_mac_exception_cb)(void *dev_id,
-                                   enum fman_mac_exceptions exceptions);
+typedef void (fman_mac_exception_cb)(struct mac_device *dev_id,
+                                    enum fman_mac_exceptions exceptions);
 
 /* FMan MAC config input */
 struct fman_mac_params {
index af2e67a250de31dbb2640f179fab35e4f82b2099..0e0d9415b93eebc7c748ea69a453136aad05c5ae 100644 (file)
@@ -311,7 +311,7 @@ struct fman_mac {
        /* Ethernet physical interface */
        phy_interface_t phy_if;
        u16 max_speed;
-       void *dev_id; /* device cookie used by the exception cbs */
+       struct mac_device *dev_id; /* device cookie used by the exception cbs */
        fman_mac_exception_cb *exception_cb;
        fman_mac_exception_cb *event_cb;
        /* Pointer to driver's global address hash table  */
index 2642a4c2729239527542a14652c77d0d69d75548..0a66ae58c026ae8dfc852e35d64351132c29c69c 100644 (file)
@@ -180,7 +180,7 @@ struct fman_mac {
        /* MAC address of device; */
        u64 addr;
        u16 max_speed;
-       void *dev_id; /* device cookie used by the exception cbs */
+       struct mac_device *dev_id; /* device cookie used by the exception cbs */
        fman_mac_exception_cb *exception_cb;
        fman_mac_exception_cb *event_cb;
        /* pointer to driver's global address hash table  */
@@ -728,7 +728,8 @@ static int tgec_free(struct fman_mac *tgec)
        return 0;
 }
 
-static struct fman_mac *tgec_config(struct mac_device *mac_dev, struct fman_mac_params *params)
+static struct fman_mac *tgec_config(struct mac_device *mac_dev,
+                                   struct fman_mac_params *params)
 {
        struct fman_mac *tgec;
        struct tgec_cfg *cfg;
index 0f9e3e9e60c6a2338bb84dd4fdf2d940e0d6ac1b..66a3742a862b535074c2feacb7bc2a2eca672e76 100644 (file)
@@ -41,10 +41,9 @@ struct mac_address {
        struct list_head list;
 };
 
-static void mac_exception(void *handle, enum fman_mac_exceptions ex)
+static void mac_exception(struct mac_device *mac_dev,
+                         enum fman_mac_exceptions ex)
 {
-       struct mac_device *mac_dev = handle;
-
        if (ex == FM_MAC_EX_10G_RX_FIFO_OVFL) {
                /* don't flag RX FIFO after the first */
                mac_dev->set_exception(mac_dev->fman_mac,