Commit 4c0eee50 authored by Colin Ian King's avatar Colin Ian King Committed by Vinod Koul

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: default avatarColin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210915112038.12407-1-colin.king@canonical.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 9bf9e0b4
...@@ -574,7 +574,7 @@ static void rz_dmac_issue_pending(struct dma_chan *chan) ...@@ -574,7 +574,7 @@ static void rz_dmac_issue_pending(struct dma_chan *chan)
static u8 rz_dmac_ds_to_val_mapping(enum dma_slave_buswidth ds) static u8 rz_dmac_ds_to_val_mapping(enum dma_slave_buswidth ds)
{ {
u8 i; u8 i;
const enum dma_slave_buswidth ds_lut[] = { static const enum dma_slave_buswidth ds_lut[] = {
DMA_SLAVE_BUSWIDTH_1_BYTE, DMA_SLAVE_BUSWIDTH_1_BYTE,
DMA_SLAVE_BUSWIDTH_2_BYTES, DMA_SLAVE_BUSWIDTH_2_BYTES,
DMA_SLAVE_BUSWIDTH_4_BYTES, DMA_SLAVE_BUSWIDTH_4_BYTES,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment