Patchwork [06/48] drm: omapdrm: dss: Make dss_dump_clocks() function static

login
register
mail settings
Submitter Laurent Pinchart
Date Oct. 13, 2017, 2:59 p.m.
Message ID <20171013145944.26557-7-laurent.pinchart@ideasonboard.com>
Download mbox | patch
Permalink /patch/10004969/
State New
Headers show

Comments

Laurent Pinchart - Oct. 13, 2017, 2:59 p.m.
The function isn't used outside of its compilation unit, make it static.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/gpu/drm/omapdrm/dss/dss.c | 4 +++-
 drivers/gpu/drm/omapdrm/dss/dss.h | 1 -
 2 files changed, 3 insertions(+), 2 deletions(-)
Sebastian Reichel - Oct. 14, 2017, 12:24 p.m.
Hi,

On Fri, Oct 13, 2017 at 05:59:02PM +0300, Laurent Pinchart wrote:
> The function isn't used outside of its compilation unit, make it static.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

-- Sebastian

> ---
>  drivers/gpu/drm/omapdrm/dss/dss.c | 4 +++-
>  drivers/gpu/drm/omapdrm/dss/dss.h | 1 -
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c b/drivers/gpu/drm/omapdrm/dss/dss.c
> index 6ce26a4b93b3..0d447eddf4d6 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dss.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dss.c
> @@ -368,7 +368,8 @@ const char *dss_get_clk_source_name(enum dss_clk_source clk_src)
>  	return dss_generic_clk_source_names[clk_src];
>  }
>  
> -void dss_dump_clocks(struct seq_file *s)
> +#if defined(CONFIG_OMAP2_DSS_DEBUGFS)
> +static void dss_dump_clocks(struct seq_file *s)
>  {
>  	const char *fclk_name;
>  	unsigned long fclk_rate;
> @@ -387,6 +388,7 @@ void dss_dump_clocks(struct seq_file *s)
>  
>  	dss_runtime_put();
>  }
> +#endif
>  
>  static void dss_dump_regs(struct seq_file *s)
>  {
> diff --git a/drivers/gpu/drm/omapdrm/dss/dss.h b/drivers/gpu/drm/omapdrm/dss/dss.h
> index ed465572491e..0d7f2b08b7ff 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dss.h
> +++ b/drivers/gpu/drm/omapdrm/dss/dss.h
> @@ -277,7 +277,6 @@ int dss_dpi_select_source(int port, enum omap_channel channel);
>  void dss_select_hdmi_venc_clk_source(enum dss_hdmi_venc_clk_source_select);
>  enum dss_hdmi_venc_clk_source_select dss_get_hdmi_venc_clk_source(void);
>  const char *dss_get_clk_source_name(enum dss_clk_source clk_src);
> -void dss_dump_clocks(struct seq_file *s);
>  
>  /* DSS VIDEO PLL */
>  struct dss_pll *dss_video_pll_init(struct platform_device *pdev, int id,
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

Patch

diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c b/drivers/gpu/drm/omapdrm/dss/dss.c
index 6ce26a4b93b3..0d447eddf4d6 100644
--- a/drivers/gpu/drm/omapdrm/dss/dss.c
+++ b/drivers/gpu/drm/omapdrm/dss/dss.c
@@ -368,7 +368,8 @@  const char *dss_get_clk_source_name(enum dss_clk_source clk_src)
 	return dss_generic_clk_source_names[clk_src];
 }
 
-void dss_dump_clocks(struct seq_file *s)
+#if defined(CONFIG_OMAP2_DSS_DEBUGFS)
+static void dss_dump_clocks(struct seq_file *s)
 {
 	const char *fclk_name;
 	unsigned long fclk_rate;
@@ -387,6 +388,7 @@  void dss_dump_clocks(struct seq_file *s)
 
 	dss_runtime_put();
 }
+#endif
 
 static void dss_dump_regs(struct seq_file *s)
 {
diff --git a/drivers/gpu/drm/omapdrm/dss/dss.h b/drivers/gpu/drm/omapdrm/dss/dss.h
index ed465572491e..0d7f2b08b7ff 100644
--- a/drivers/gpu/drm/omapdrm/dss/dss.h
+++ b/drivers/gpu/drm/omapdrm/dss/dss.h
@@ -277,7 +277,6 @@  int dss_dpi_select_source(int port, enum omap_channel channel);
 void dss_select_hdmi_venc_clk_source(enum dss_hdmi_venc_clk_source_select);
 enum dss_hdmi_venc_clk_source_select dss_get_hdmi_venc_clk_source(void);
 const char *dss_get_clk_source_name(enum dss_clk_source clk_src);
-void dss_dump_clocks(struct seq_file *s);
 
 /* DSS VIDEO PLL */
 struct dss_pll *dss_video_pll_init(struct platform_device *pdev, int id,