]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: et131x: Use variable names instead of types in sizeof
authorMark Einon <mark.einon@gmail.com>
Sun, 14 Sep 2014 15:59:08 +0000 (16:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Sep 2014 23:05:20 +0000 (16:05 -0700)
A few calls to sizeof() in et131x.c give the type as a parameter
- use the equivalent variable name instead.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/et131x/et131x.c

index 3f402476f4c23526a9062ac3355ae3f7337308ed..69f414033ba29c100514f771b7ca2ce6a1a4e516 100644 (file)
@@ -2017,10 +2017,10 @@ static int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter)
        struct fbr_lookup *fbr;
 
        /* Alloc memory for the lookup table */
-       rx_ring->fbr[0] = kmalloc(sizeof(struct fbr_lookup), GFP_KERNEL);
+       rx_ring->fbr[0] = kmalloc(sizeof(*fbr), GFP_KERNEL);
        if (rx_ring->fbr[0] == NULL)
                return -ENOMEM;
-       rx_ring->fbr[1] = kmalloc(sizeof(struct fbr_lookup), GFP_KERNEL);
+       rx_ring->fbr[1] = kmalloc(sizeof(*fbr), GFP_KERNEL);
        if (rx_ring->fbr[1] == NULL)
                return -ENOMEM;
 
@@ -2254,7 +2254,7 @@ static int et131x_init_recv(struct et131x_adapter *adapter)
 
        /* Setup each RFD */
        for (rfdct = 0; rfdct < rx_ring->num_rfd; rfdct++) {
-               rfd = kzalloc(sizeof(struct rfd), GFP_ATOMIC | GFP_DMA);
+               rfd = kzalloc(sizeof(*rfd), GFP_ATOMIC | GFP_DMA);
                if (!rfd)
                        return -ENOMEM;