Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+14 -16
+14 -16
drivers/net/wan/z85230.c
··· 483 483 write_zsctrl(chan, RES_H_IUS); 484 484 } 485 485 486 - struct z8530_irqhandler z8530_sync = 487 - { 488 - z8530_rx, 489 - z8530_tx, 490 - z8530_status 486 + struct z8530_irqhandler z8530_sync = { 487 + .rx = z8530_rx, 488 + .tx = z8530_tx, 489 + .status = z8530_status, 491 490 }; 492 491 493 492 EXPORT_SYMBOL(z8530_sync); ··· 604 605 } 605 606 606 607 static struct z8530_irqhandler z8530_dma_sync = { 607 - z8530_dma_rx, 608 - z8530_dma_tx, 609 - z8530_dma_status 608 + .rx = z8530_dma_rx, 609 + .tx = z8530_dma_tx, 610 + .status = z8530_dma_status, 610 611 }; 611 612 612 613 static struct z8530_irqhandler z8530_txdma_sync = { 613 - z8530_rx, 614 - z8530_dma_tx, 615 - z8530_dma_status 614 + .rx = z8530_rx, 615 + .tx = z8530_dma_tx, 616 + .status = z8530_dma_status, 616 617 }; 617 618 618 619 /** ··· 677 678 write_zsctrl(chan, RES_H_IUS); 678 679 } 679 680 680 - struct z8530_irqhandler z8530_nop= 681 - { 682 - z8530_rx_clear, 683 - z8530_tx_clear, 684 - z8530_status_clear 681 + struct z8530_irqhandler z8530_nop = { 682 + .rx = z8530_rx_clear, 683 + .tx = z8530_tx_clear, 684 + .status = z8530_status_clear, 685 685 }; 686 686 687 687