dm clone: make array 'descs' static
authorColin Ian King <colin.king@canonical.com>
Wed, 15 Sep 2021 11:14:40 +0000 (12:14 +0100)
committerMike Snitzer <snitzer@redhat.com>
Tue, 12 Oct 2021 17:54:10 +0000 (13:54 -0400)
commitec132ef2d1d94d43d9dce1400521526bbed89a8b
treed6d2027ac62772f83c8f1c1e8dda36841e8ea8c6
parent2c0468e054c0adb660ac055fc396622ec7235df9
dm clone: make array 'descs' static

Don't populate the read-only array descs on the stack but instead it
static and add extra const. Also makes the object code smaller by 66
bytes:

Before:
   text    data     bss     dec     hex filename
  42382   11140     512   54034    d312 ./drivers/md/dm-clone-target.o

After:
   text    data     bss     dec     hex filename
  42220   11236     512   53968    d2d0 ./drivers/md/dm-clone-target.o

(gcc version 11.2.0)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-clone-target.c