Skip to content

Commit 3598f5d

Browse files
committed
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 <[email protected]> Signed-off-by: Kees Cook <[email protected]> Acked-by: David S. Miller <[email protected]>
1 parent e758aba commit 3598f5d

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

drivers/net/wan/z85230.c

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -483,11 +483,10 @@ static void z8530_status(struct z8530_channel *chan)
483483
write_zsctrl(chan, RES_H_IUS);
484484
}
485485

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,
491490
};
492491

493492
EXPORT_SYMBOL(z8530_sync);
@@ -605,15 +604,15 @@ static void z8530_dma_status(struct z8530_channel *chan)
605604
}
606605

607606
static struct z8530_irqhandler z8530_dma_sync = {
608-
z8530_dma_rx,
609-
z8530_dma_tx,
610-
z8530_dma_status
607+
.rx = z8530_dma_rx,
608+
.tx = z8530_dma_tx,
609+
.status = z8530_dma_status,
611610
};
612611

613612
static struct z8530_irqhandler z8530_txdma_sync = {
614-
z8530_rx,
615-
z8530_dma_tx,
616-
z8530_dma_status
613+
.rx = z8530_rx,
614+
.tx = z8530_dma_tx,
615+
.status = z8530_dma_status,
617616
};
618617

619618
/**
@@ -678,11 +677,10 @@ static void z8530_status_clear(struct z8530_channel *chan)
678677
write_zsctrl(chan, RES_H_IUS);
679678
}
680679

681-
struct z8530_irqhandler z8530_nop=
682-
{
683-
z8530_rx_clear,
684-
z8530_tx_clear,
685-
z8530_status_clear
680+
struct z8530_irqhandler z8530_nop = {
681+
.rx = z8530_rx_clear,
682+
.tx = z8530_tx_clear,
683+
.status = z8530_status_clear,
686684
};
687685

688686

0 commit comments

Comments
 (0)