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

dmaengine: iop-adma: make array 'handler' static const, makes object smaller

Don't populate the array 'handler' on the stack but instead make it
static const. Makes the object code smaller by 80 bytes.

Before:
   text	   data	    bss	    dec	    hex	filename
  38225	   9084	     64	  47373	   b90d	drivers/dma/iop-adma.o

After:
   text	   data	    bss	    dec	    hex	filename
  38081	   9148	     64	  47293	   b8bd	drivers/dma/iop-adma.o

(gcc version 9.2.1, amd64)
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20190905163726.19690-1-colin.king@canonical.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent f27c2273
...@@ -1359,9 +1359,11 @@ static int iop_adma_probe(struct platform_device *pdev) ...@@ -1359,9 +1359,11 @@ static int iop_adma_probe(struct platform_device *pdev)
iop_adma_device_clear_err_status(iop_chan); iop_adma_device_clear_err_status(iop_chan);
for (i = 0; i < 3; i++) { for (i = 0; i < 3; i++) {
irq_handler_t handler[] = { iop_adma_eot_handler, static const irq_handler_t handler[] = {
iop_adma_eot_handler,
iop_adma_eoc_handler, iop_adma_eoc_handler,
iop_adma_err_handler }; iop_adma_err_handler
};
int irq = platform_get_irq(pdev, i); int irq = platform_get_irq(pdev, i);
if (irq < 0) { if (irq < 0) {
ret = -ENXIO; ret = -ENXIO;
......
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