]> git.baikalelectronics.ru Git - kernel.git/commit
media: imx-jpeg: Constify static struct mxc_jpeg_fmt
authorRikard Falkeborn <rikard.falkeborn@gmail.com>
Fri, 11 Jun 2021 23:42:01 +0000 (01:42 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 17 Jun 2021 08:24:09 +0000 (10:24 +0200)
commit71bc90ae0f5d2998eed62178b7cad7588f06af06
treec41d6314a01924030077da695e37821443e4a576
parent28a766f4cc425361cb8190e08c5b0d40b3996646
media: imx-jpeg: Constify static struct mxc_jpeg_fmt

It is only read-from, so make it const. In order to be able to do this,
constify all places where mxc_jpeg_fmt is used, in function arguments,
return values and pointers. On top of that, make the name a pointer to
const char.

On aarch64, this shrinks object code size with 550 bytes with gcc 11.1.0,
and almost 2kB with clang 12.0.0.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/imx-jpeg/mxc-jpeg.c
drivers/media/platform/imx-jpeg/mxc-jpeg.h