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)
commit7ec1c4a57c428a2114b81059e8683f8cf348920f
treec41d6314a01924030077da695e37821443e4a576
parent682e69d7a262d8959f8b8cc1a8ed68bc6ec4be61
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