Skip to content

Commit c50b741

Browse files
tititiou36daeinki
authored andcommitted
drm/exynos: Constify struct exynos_drm_ipp_funcs
'struct exynos_drm_ipp_funcs' are not modified in these drivers. Constifying this structure moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig, as an example: Before: ====== text data bss dec hex filename 20446 1746 16 22208 56c0 drivers/gpu/drm/exynos/exynos_drm_fimc.o After: ===== text data bss dec hex filename 20446 1714 16 22176 56a0 drivers/gpu/drm/exynos/exynos_drm_fimc.o Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Inki Dae <[email protected]>
1 parent fce4a2a commit c50b741

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

drivers/gpu/drm/exynos/exynos_drm_fimc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1125,7 +1125,7 @@ static void fimc_abort(struct exynos_drm_ipp *ipp,
11251125
}
11261126
}
11271127

1128-
static struct exynos_drm_ipp_funcs ipp_funcs = {
1128+
static const struct exynos_drm_ipp_funcs ipp_funcs = {
11291129
.commit = fimc_commit,
11301130
.abort = fimc_abort,
11311131
};

drivers/gpu/drm/exynos/exynos_drm_gsc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,7 @@ static void gsc_abort(struct exynos_drm_ipp *ipp,
11621162
}
11631163
}
11641164

1165-
static struct exynos_drm_ipp_funcs ipp_funcs = {
1165+
static const struct exynos_drm_ipp_funcs ipp_funcs = {
11661166
.commit = gsc_commit,
11671167
.abort = gsc_abort,
11681168
};

drivers/gpu/drm/exynos/exynos_drm_scaler.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ static int scaler_commit(struct exynos_drm_ipp *ipp,
403403
return 0;
404404
}
405405

406-
static struct exynos_drm_ipp_funcs ipp_funcs = {
406+
static const struct exynos_drm_ipp_funcs ipp_funcs = {
407407
.commit = scaler_commit,
408408
};
409409

0 commit comments

Comments
 (0)