]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4: make the array states static const, makes object smaller
authorColin Ian King <colin.king@canonical.com>
Sun, 1 Aug 2021 15:37:42 +0000 (16:37 +0100)
committerJakub Kicinski <kuba@kernel.org>
Mon, 2 Aug 2021 22:02:13 +0000 (15:02 -0700)
commita084d31e9c98a9ddd3dca8193902693349d38d80
treea6a59394a75a49c665e21ca9859080b06c1e2697
parentf4bc097a28213d274a664d3b93b0b3dd6c8a159d
net/mlx4: make the array states static const, makes object smaller

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

Before:
   text   data   bss    dec    hex filename
  21309   8304   192  29805   746d drivers/net/ethernet/mellanox/mlx4/qp.o

After:
   text   data   bss    dec    hex filename
  21166   8368   192  29726   741e drivers/net/ethernet/mellanox/mlx4/qp.o

(gcc version 10.2.0)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://lore.kernel.org/r/20210801153742.147304-1-colin.king@canonical.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx4/qp.c