diff options
author | Kees Cook <keescook@chromium.org> | 2017-07-30 21:15:45 -0400 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2017-08-01 20:04:38 -0400 |
commit | 3598f5d0872ff574c5b6704024f12ca4a3056860 (patch) | |
tree | 630cfd4c7f971c5fbf5f841ef29d7bccc8cf0ee6 | |
parent | e758aba1ea02851e071a1b583cee37e5cfd77f77 (diff) |
drivers/net/wan/z85230.c: Use designated initializers
In preparation for the randstruct gcc plugin performing randomization of
structures that are entirely function pointers, use designated initializers
so the compiler doesn't get angry.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/wan/z85230.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/drivers/net/wan/z85230.c b/drivers/net/wan/z85230.c index 2f0bd6955f33..deea41e96f01 100644 --- a/drivers/net/wan/z85230.c +++ b/drivers/net/wan/z85230.c | |||
@@ -483,11 +483,10 @@ static void z8530_status(struct z8530_channel *chan) | |||
483 | write_zsctrl(chan, RES_H_IUS); | 483 | write_zsctrl(chan, RES_H_IUS); |
484 | } | 484 | } |
485 | 485 | ||
486 | struct z8530_irqhandler z8530_sync = | 486 | struct z8530_irqhandler z8530_sync = { |
487 | { | 487 | .rx = z8530_rx, |
488 | z8530_rx, | 488 | .tx = z8530_tx, |
489 | z8530_tx, | 489 | .status = z8530_status, |
490 | z8530_status | ||
491 | }; | 490 | }; |
492 | 491 | ||
493 | EXPORT_SYMBOL(z8530_sync); | 492 | EXPORT_SYMBOL(z8530_sync); |
@@ -605,15 +604,15 @@ static void z8530_dma_status(struct z8530_channel *chan) | |||
605 | } | 604 | } |
606 | 605 | ||
607 | static struct z8530_irqhandler z8530_dma_sync = { | 606 | static struct z8530_irqhandler z8530_dma_sync = { |
608 | z8530_dma_rx, | 607 | .rx = z8530_dma_rx, |
609 | z8530_dma_tx, | 608 | .tx = z8530_dma_tx, |
610 | z8530_dma_status | 609 | .status = z8530_dma_status, |
611 | }; | 610 | }; |
612 | 611 | ||
613 | static struct z8530_irqhandler z8530_txdma_sync = { | 612 | static struct z8530_irqhandler z8530_txdma_sync = { |
614 | z8530_rx, | 613 | .rx = z8530_rx, |
615 | z8530_dma_tx, | 614 | .tx = z8530_dma_tx, |
616 | z8530_dma_status | 615 | .status = z8530_dma_status, |
617 | }; | 616 | }; |
618 | 617 | ||
619 | /** | 618 | /** |
@@ -678,11 +677,10 @@ static void z8530_status_clear(struct z8530_channel *chan) | |||
678 | write_zsctrl(chan, RES_H_IUS); | 677 | write_zsctrl(chan, RES_H_IUS); |
679 | } | 678 | } |
680 | 679 | ||
681 | struct z8530_irqhandler z8530_nop= | 680 | struct z8530_irqhandler z8530_nop = { |
682 | { | 681 | .rx = z8530_rx_clear, |
683 | z8530_rx_clear, | 682 | .tx = z8530_tx_clear, |
684 | z8530_tx_clear, | 683 | .status = z8530_status_clear, |
685 | z8530_status_clear | ||
686 | }; | 684 | }; |
687 | 685 | ||
688 | 686 | ||