diff mbox

[1/2] drm: remove useless parameters from drm_pick_cmdline_mode function

Message ID 1483721084-20278-2-git-send-email-vincent.abriou@st.com (mailing list archive)
State New, archived
Headers show

Commit Message

Vincent Abriou Jan. 6, 2017, 4:44 p.m. UTC
drm_pick_cmdline_mode width and height parameters are useless.
Just remove them.

Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
---
 drivers/gpu/drm/drm_fb_helper.c    | 7 +++----
 drivers/gpu/drm/i915/intel_fbdev.c | 2 +-
 include/drm/drm_fb_helper.h        | 3 +--
 3 files changed, 5 insertions(+), 7 deletions(-)

Comments

Daniel Vetter Jan. 9, 2017, 10:24 a.m. UTC | #1
On Fri, Jan 06, 2017 at 05:44:43PM +0100, Vincent Abriou wrote:
> drm_pick_cmdline_mode width and height parameters are useless.
> Just remove them.
> 
> Cc: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Signed-off-by: Vincent Abriou <vincent.abriou@st.com>

Applied, thanks a lot. I'll wait for someone else to review patch 2 before
merging it.
-Daniel
> ---
>  drivers/gpu/drm/drm_fb_helper.c    | 7 +++----
>  drivers/gpu/drm/i915/intel_fbdev.c | 2 +-
>  include/drm/drm_fb_helper.h        | 3 +--
>  3 files changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index e934b54..77d9ac6 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -1748,8 +1748,7 @@ static bool drm_has_cmdline_mode(struct drm_fb_helper_connector *fb_connector)
>  	return fb_connector->connector->cmdline_mode.specified;
>  }
>  
> -struct drm_display_mode *drm_pick_cmdline_mode(struct drm_fb_helper_connector *fb_helper_conn,
> -						      int width, int height)
> +struct drm_display_mode *drm_pick_cmdline_mode(struct drm_fb_helper_connector *fb_helper_conn)
>  {
>  	struct drm_cmdline_mode *cmdline_mode;
>  	struct drm_display_mode *mode;
> @@ -1867,7 +1866,7 @@ static bool drm_target_cloned(struct drm_fb_helper *fb_helper,
>  		if (!enabled[i])
>  			continue;
>  		fb_helper_conn = fb_helper->connector_info[i];
> -		modes[i] = drm_pick_cmdline_mode(fb_helper_conn, width, height);
> +		modes[i] = drm_pick_cmdline_mode(fb_helper_conn);
>  		if (!modes[i]) {
>  			can_clone = false;
>  			break;
> @@ -1989,7 +1988,7 @@ static bool drm_target_preferred(struct drm_fb_helper *fb_helper,
>  			      fb_helper_conn->connector->base.id);
>  
>  		/* got for command line mode first */
> -		modes[i] = drm_pick_cmdline_mode(fb_helper_conn, width, height);
> +		modes[i] = drm_pick_cmdline_mode(fb_helper_conn);
>  		if (!modes[i]) {
>  			DRM_DEBUG_KMS("looking for preferred mode on connector %d %d\n",
>  				      fb_helper_conn->connector->base.id, fb_helper_conn->connector->tile_group ? fb_helper_conn->connector->tile_group->id : 0);
> diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
> index beb0898..4b302f8 100644
> --- a/drivers/gpu/drm/i915/intel_fbdev.c
> +++ b/drivers/gpu/drm/i915/intel_fbdev.c
> @@ -447,7 +447,7 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
>  			      connector->name);
>  
>  		/* go for command line mode first */
> -		modes[i] = drm_pick_cmdline_mode(fb_conn, width, height);
> +		modes[i] = drm_pick_cmdline_mode(fb_conn);
>  
>  		/* try for preferred next */
>  		if (!modes[i]) {
> diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
> index 975deed..48e09e8 100644
> --- a/include/drm/drm_fb_helper.h
> +++ b/include/drm/drm_fb_helper.h
> @@ -295,8 +295,7 @@ struct drm_display_mode *
>  drm_has_preferred_mode(struct drm_fb_helper_connector *fb_connector,
>  			int width, int height);
>  struct drm_display_mode *
> -drm_pick_cmdline_mode(struct drm_fb_helper_connector *fb_helper_conn,
> -		      int width, int height);
> +drm_pick_cmdline_mode(struct drm_fb_helper_connector *fb_helper_conn);
>  
>  int drm_fb_helper_add_one_connector(struct drm_fb_helper *fb_helper, struct drm_connector *connector);
>  int drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper,
> -- 
> 2.7.4
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index e934b54..77d9ac6 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -1748,8 +1748,7 @@  static bool drm_has_cmdline_mode(struct drm_fb_helper_connector *fb_connector)
 	return fb_connector->connector->cmdline_mode.specified;
 }
 
-struct drm_display_mode *drm_pick_cmdline_mode(struct drm_fb_helper_connector *fb_helper_conn,
-						      int width, int height)
+struct drm_display_mode *drm_pick_cmdline_mode(struct drm_fb_helper_connector *fb_helper_conn)
 {
 	struct drm_cmdline_mode *cmdline_mode;
 	struct drm_display_mode *mode;
@@ -1867,7 +1866,7 @@  static bool drm_target_cloned(struct drm_fb_helper *fb_helper,
 		if (!enabled[i])
 			continue;
 		fb_helper_conn = fb_helper->connector_info[i];
-		modes[i] = drm_pick_cmdline_mode(fb_helper_conn, width, height);
+		modes[i] = drm_pick_cmdline_mode(fb_helper_conn);
 		if (!modes[i]) {
 			can_clone = false;
 			break;
@@ -1989,7 +1988,7 @@  static bool drm_target_preferred(struct drm_fb_helper *fb_helper,
 			      fb_helper_conn->connector->base.id);
 
 		/* got for command line mode first */
-		modes[i] = drm_pick_cmdline_mode(fb_helper_conn, width, height);
+		modes[i] = drm_pick_cmdline_mode(fb_helper_conn);
 		if (!modes[i]) {
 			DRM_DEBUG_KMS("looking for preferred mode on connector %d %d\n",
 				      fb_helper_conn->connector->base.id, fb_helper_conn->connector->tile_group ? fb_helper_conn->connector->tile_group->id : 0);
diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
index beb0898..4b302f8 100644
--- a/drivers/gpu/drm/i915/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/intel_fbdev.c
@@ -447,7 +447,7 @@  static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
 			      connector->name);
 
 		/* go for command line mode first */
-		modes[i] = drm_pick_cmdline_mode(fb_conn, width, height);
+		modes[i] = drm_pick_cmdline_mode(fb_conn);
 
 		/* try for preferred next */
 		if (!modes[i]) {
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index 975deed..48e09e8 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -295,8 +295,7 @@  struct drm_display_mode *
 drm_has_preferred_mode(struct drm_fb_helper_connector *fb_connector,
 			int width, int height);
 struct drm_display_mode *
-drm_pick_cmdline_mode(struct drm_fb_helper_connector *fb_helper_conn,
-		      int width, int height);
+drm_pick_cmdline_mode(struct drm_fb_helper_connector *fb_helper_conn);
 
 int drm_fb_helper_add_one_connector(struct drm_fb_helper *fb_helper, struct drm_connector *connector);
 int drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper,