drm/vc4: Constify private state accessors

None of those helpers modify the pointed data, let's make them const.
Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: NMaxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220328124304.2309418-4-maxime@cerno.tech
上级 97a1f01b
...@@ -32,7 +32,8 @@ struct vc4_ctm_state { ...@@ -32,7 +32,8 @@ struct vc4_ctm_state {
int fifo; int fifo;
}; };
static struct vc4_ctm_state *to_vc4_ctm_state(struct drm_private_state *priv) static struct vc4_ctm_state *
to_vc4_ctm_state(const struct drm_private_state *priv)
{ {
return container_of(priv, struct vc4_ctm_state, base); return container_of(priv, struct vc4_ctm_state, base);
} }
...@@ -49,7 +50,7 @@ struct vc4_hvs_state { ...@@ -49,7 +50,7 @@ struct vc4_hvs_state {
}; };
static struct vc4_hvs_state * static struct vc4_hvs_state *
to_vc4_hvs_state(struct drm_private_state *priv) to_vc4_hvs_state(const struct drm_private_state *priv)
{ {
return container_of(priv, struct vc4_hvs_state, base); return container_of(priv, struct vc4_hvs_state, base);
} }
...@@ -61,7 +62,7 @@ struct vc4_load_tracker_state { ...@@ -61,7 +62,7 @@ struct vc4_load_tracker_state {
}; };
static struct vc4_load_tracker_state * static struct vc4_load_tracker_state *
to_vc4_load_tracker_state(struct drm_private_state *priv) to_vc4_load_tracker_state(const struct drm_private_state *priv)
{ {
return container_of(priv, struct vc4_load_tracker_state, base); return container_of(priv, struct vc4_load_tracker_state, base);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册