Message ID | 20240818-amdgpu-drm_edid-v1-3-aea66c1f7cf4@weissschuh.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/amd: Switch over to struct drm_edid | expand |
On Sun, 18 Aug 2024, Thomas Weißschuh <linux@weissschuh.net> wrote: > drm_edid_is_valid() does not modify its argument, so mark it as const. That's not true. BR, Jani. > > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> > --- > drivers/gpu/drm/drm_edid.c | 2 +- > include/drm/drm_edid.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c > index f68a41eeb1fa..69fb11741abd 100644 > --- a/drivers/gpu/drm/drm_edid.c > +++ b/drivers/gpu/drm/drm_edid.c > @@ -2034,7 +2034,7 @@ EXPORT_SYMBOL(drm_edid_block_valid); > * > * Return: True if the EDID data is valid, false otherwise. > */ > -bool drm_edid_is_valid(struct edid *edid) > +bool drm_edid_is_valid(const struct edid *edid) > { > int i; > > diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h > index 6bdfa254a1c1..a5b377c4a342 100644 > --- a/include/drm/drm_edid.h > +++ b/include/drm/drm_edid.h > @@ -442,7 +442,7 @@ int drm_add_modes_noedid(struct drm_connector *connector, > int drm_edid_header_is_valid(const void *edid); > bool drm_edid_block_valid(u8 *raw_edid, int block, bool print_bad_edid, > bool *edid_corrupt); > -bool drm_edid_is_valid(struct edid *edid); > +bool drm_edid_is_valid(const struct edid *edid); > void drm_edid_get_monitor_name(const struct edid *edid, char *name, > int buflen); > struct drm_display_mode *drm_mode_find_dmt(struct drm_device *dev,
On 2024-08-19 11:21:21+0000, Jani Nikula wrote: > On Sun, 18 Aug 2024, Thomas Weißschuh <linux@weissschuh.net> wrote: > > drm_edid_is_valid() does not modify its argument, so mark it as const. > > That's not true. Indeed, thanks for noticing. It turns out this patch is not necessary anyways and I dropped it for the next revision. Thomas
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index f68a41eeb1fa..69fb11741abd 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -2034,7 +2034,7 @@ EXPORT_SYMBOL(drm_edid_block_valid); * * Return: True if the EDID data is valid, false otherwise. */ -bool drm_edid_is_valid(struct edid *edid) +bool drm_edid_is_valid(const struct edid *edid) { int i; diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h index 6bdfa254a1c1..a5b377c4a342 100644 --- a/include/drm/drm_edid.h +++ b/include/drm/drm_edid.h @@ -442,7 +442,7 @@ int drm_add_modes_noedid(struct drm_connector *connector, int drm_edid_header_is_valid(const void *edid); bool drm_edid_block_valid(u8 *raw_edid, int block, bool print_bad_edid, bool *edid_corrupt); -bool drm_edid_is_valid(struct edid *edid); +bool drm_edid_is_valid(const struct edid *edid); void drm_edid_get_monitor_name(const struct edid *edid, char *name, int buflen); struct drm_display_mode *drm_mode_find_dmt(struct drm_device *dev,
drm_edid_is_valid() does not modify its argument, so mark it as const. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> --- drivers/gpu/drm/drm_edid.c | 2 +- include/drm/drm_edid.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)