Message ID | 20240104211028.1129606-1-jani.nikula@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [RESEND] drm/edid: prefer forward declarations over includes in drm_edid.h | expand |
Am 04.01.24 um 22:10 schrieb Jani Nikula: > There's no need to include either linux/hdmi.h or drm/drm_mode.h. They > can be removed by using forward declarations. > > While at it, group the forward declarations together, and remove the > unnecessary ones. > > Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> > --- > include/drm/drm_edid.h | 12 +++++------- > 1 file changed, 5 insertions(+), 7 deletions(-) > > diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h > index 54cc6f04a708..86c1812a8034 100644 > --- a/include/drm/drm_edid.h > +++ b/include/drm/drm_edid.h > @@ -24,11 +24,14 @@ > #define __DRM_EDID_H__ > > #include <linux/types.h> > -#include <linux/hdmi.h> > -#include <drm/drm_mode.h> > > +enum hdmi_quantization_range; > +struct drm_connector; > struct drm_device; > +struct drm_display_mode; > struct drm_edid; > +struct hdmi_avi_infoframe; > +struct hdmi_vendor_infoframe; > struct i2c_adapter; > > #define EDID_LENGTH 128 > @@ -319,11 +322,6 @@ struct cea_sad { > u8 byte2; /* meaning depends on format */ > }; > > -struct drm_encoder; > -struct drm_connector; > -struct drm_connector_state; > -struct drm_display_mode; > - > int drm_edid_to_sad(const struct edid *edid, struct cea_sad **sads); > int drm_edid_to_speaker_allocation(const struct edid *edid, u8 **sadb); > int drm_av_sync_delay(struct drm_connector *connector,
On Fri, 05 Jan 2024, Thomas Zimmermann <tzimmermann@suse.de> wrote: > Am 04.01.24 um 22:10 schrieb Jani Nikula: >> There's no need to include either linux/hdmi.h or drm/drm_mode.h. They >> can be removed by using forward declarations. >> >> While at it, group the forward declarations together, and remove the >> unnecessary ones. >> >> Signed-off-by: Jani Nikula <jani.nikula@intel.com> > > Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Thanks, pushed to drm-misc-next. BR, Jani.
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h index 54cc6f04a708..86c1812a8034 100644 --- a/include/drm/drm_edid.h +++ b/include/drm/drm_edid.h @@ -24,11 +24,14 @@ #define __DRM_EDID_H__ #include <linux/types.h> -#include <linux/hdmi.h> -#include <drm/drm_mode.h> +enum hdmi_quantization_range; +struct drm_connector; struct drm_device; +struct drm_display_mode; struct drm_edid; +struct hdmi_avi_infoframe; +struct hdmi_vendor_infoframe; struct i2c_adapter; #define EDID_LENGTH 128 @@ -319,11 +322,6 @@ struct cea_sad { u8 byte2; /* meaning depends on format */ }; -struct drm_encoder; -struct drm_connector; -struct drm_connector_state; -struct drm_display_mode; - int drm_edid_to_sad(const struct edid *edid, struct cea_sad **sads); int drm_edid_to_speaker_allocation(const struct edid *edid, u8 **sadb); int drm_av_sync_delay(struct drm_connector *connector,
There's no need to include either linux/hdmi.h or drm/drm_mode.h. They can be removed by using forward declarations. While at it, group the forward declarations together, and remove the unnecessary ones. Signed-off-by: Jani Nikula <jani.nikula@intel.com> --- include/drm/drm_edid.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)