can: isotp: padlen(): make const array static, makes object smaller
authorColin Ian King <colin.king@canonical.com>
Tue, 20 Oct 2020 15:42:03 +0000 (16:42 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 3 Nov 2020 21:30:32 +0000 (22:30 +0100)
commitc3ddac4b0c9a280d4d5b670b4d39c50fee88579e
treed17f48e6e795546bd5dc7fc489a27d1fafe820c9
parent78656ea235191c8cf8475f8335860ca4192243a4
can: isotp: padlen(): make const array static, makes object smaller

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

Before:
   text    data     bss     dec     hex filename
  26531    1943      64   28538    6f7a net/can/isotp.o

After:
   text    data     bss     dec     hex filename
  25509    2039      64   27612    6bdc net/can/isotp.o

(gcc version 10.2.0)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20201020154203.54711-1-colin.king@canonical.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
net/can/isotp.c