From 1b2816124ec3dbd53b81725d39292f45d41d895b Mon Sep 17 00:00:00 2001 From: Ville Syrjälä Date: Sun, 8 Dec 2019 18:57:00 +0200 Subject: tools/intel_panel_fitter: Fix abs(unsigned) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ../tools/intel_panel_fitter.c: In function ‘change_screen_size’: ../tools/intel_panel_fitter.c:183:10: warning: taking the absolute value of unsigned type ‘uint32_t’ {aka ‘unsigned int’} has no effect [-Wabsolute-value] 183 | pos_x = abs((info.tot_width - dst_width)) / 2; | ^~~ ../tools/intel_panel_fitter.c:184:10: warning: taking the absolute value of unsigned type ‘uint32_t’ {aka ‘unsigned int’} has no effect [-Wabsolute-value] 184 | pos_y = abs((info.tot_height - dst_height)) / 2; | ^~~ Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson --- tools/intel_panel_fitter.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tools') diff --git a/tools/intel_panel_fitter.c b/tools/intel_panel_fitter.c index 64078705..c6ee2101 100644 --- a/tools/intel_panel_fitter.c +++ b/tools/intel_panel_fitter.c @@ -72,12 +72,12 @@ struct pipe_info { bool enabled; bool pf_enabled; uint32_t interlace_mode; - uint32_t tot_width; /* htotal */ - uint32_t tot_height; /* vtotal */ - uint32_t src_width; /* pipesrc.x */ - uint32_t src_height; /* pipesrc.y */ - uint32_t dst_width; /* pf_win_sz.x */ - uint32_t dst_height; /* pf_win_sz.y */ + int tot_width; /* htotal */ + int tot_height; /* vtotal */ + int src_width; /* pipesrc.x */ + int src_height; /* pipesrc.y */ + int dst_width; /* pf_win_sz.x */ + int dst_height; /* pf_win_sz.y */ }; static void read_pipe_info(int intel_pipe, struct pipe_info *info) @@ -155,7 +155,7 @@ static void dump_info(void) static int change_screen_size(int intel_pipe, int x, int y) { struct pipe_info info; - uint32_t dst_width, dst_height, pos_x, pos_y; + int dst_width, dst_height, pos_x, pos_y; uint32_t ctrl1_val; uint32_t win_pos_val; uint32_t win_sz_val; -- cgit v1.2.3