Skip to content

Commit 4c0eee5

Browse files
Colin Ian Kingvinodkoul
authored andcommitted
dmaengine: sh: make array ds_lut static
Don't populate the read-only array ds_lut on the stack but instead it static. Also makes the object code smaller by 163 bytes: Before: text data bss dec hex filename 23508 4796 0 28304 6e90 ./drivers/dma/sh/rz-dmac.o After: text data bss dec hex filename 23281 4860 0 28141 6ded ./drivers/dma/sh/rz-dmac.o (gcc version 11.2.0) Signed-off-by: Colin Ian King <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 9bf9e0b commit 4c0eee5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/dma/sh/rz-dmac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ static void rz_dmac_issue_pending(struct dma_chan *chan)
574574
static u8 rz_dmac_ds_to_val_mapping(enum dma_slave_buswidth ds)
575575
{
576576
u8 i;
577-
const enum dma_slave_buswidth ds_lut[] = {
577+
static const enum dma_slave_buswidth ds_lut[] = {
578578
DMA_SLAVE_BUSWIDTH_1_BYTE,
579579
DMA_SLAVE_BUSWIDTH_2_BYTES,
580580
DMA_SLAVE_BUSWIDTH_4_BYTES,

0 commit comments

Comments
 (0)