Skip to content

Commit aa7b3df

Browse files
arndbjlahtine-intel
authored andcommitted
drm/i915: avoid unused scale_user_to_hw() warning
After the function is no longer marked 'inline', there is now a new warning pointing out that the only caller is inside of an #ifdef: drivers/gpu/drm/i915/display/intel_panel.c:493:12: warning: 'scale_user_to_hw' defined but not used [-Wunused-function] 493 | static u32 scale_user_to_hw(struct intel_connector *connector, | ^~~~~~~~~~~~~~~~ Move the function itself into that #ifdef as well. Fixes: 81b55ef ("drm/i915: drop a bunch of superfluous inlines") Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 794bdcf) Signed-off-by: Joonas Lahtinen <[email protected]>
1 parent 3a36aa2 commit aa7b3df

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

drivers/gpu/drm/i915/display/intel_panel.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -489,16 +489,6 @@ static u32 scale(u32 source_val,
489489
return target_val;
490490
}
491491

492-
/* Scale user_level in range [0..user_max] to [hw_min..hw_max]. */
493-
static u32 scale_user_to_hw(struct intel_connector *connector,
494-
u32 user_level, u32 user_max)
495-
{
496-
struct intel_panel *panel = &connector->panel;
497-
498-
return scale(user_level, 0, user_max,
499-
panel->backlight.min, panel->backlight.max);
500-
}
501-
502492
/* Scale user_level in range [0..user_max] to [0..hw_max], clamping the result
503493
* to [hw_min..hw_max]. */
504494
static u32 clamp_user_to_hw(struct intel_connector *connector,
@@ -1255,6 +1245,16 @@ static u32 intel_panel_get_backlight(struct intel_connector *connector)
12551245
return val;
12561246
}
12571247

1248+
/* Scale user_level in range [0..user_max] to [hw_min..hw_max]. */
1249+
static u32 scale_user_to_hw(struct intel_connector *connector,
1250+
u32 user_level, u32 user_max)
1251+
{
1252+
struct intel_panel *panel = &connector->panel;
1253+
1254+
return scale(user_level, 0, user_max,
1255+
panel->backlight.min, panel->backlight.max);
1256+
}
1257+
12581258
/* set backlight brightness to level in range [0..max], scaling wrt hw min */
12591259
static void intel_panel_set_backlight(const struct drm_connector_state *conn_state,
12601260
u32 user_level, u32 user_max)

0 commit comments

Comments
 (0)