From: Clay King <[email protected]>

Fix compiler warnings by consistently use the same signedness for
a given value

Reviewed-by: Joshua Aberback <[email protected]>
Signed-off-by: Clay King <[email protected]>
Signed-off-by: Chuanyu Tseng <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c         | 4 ++--
 drivers/gpu/drm/amd/display/dc/core/dc.c                 | 9 +++------
 drivers/gpu/drm/amd/display/dc/core/dc_link_exports.c    | 4 ++--
 drivers/gpu/drm/amd/display/dc/dc.h                      | 2 +-
 drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c            | 3 +--
 drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c    | 2 +-
 .../gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c    | 2 +-
 drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c  | 2 +-
 drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c  | 2 +-
 drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c  | 2 +-
 drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c  | 4 ++--
 .../gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c    | 2 +-
 drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c  | 4 ++--
 13 files changed, 19 insertions(+), 23 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c 
b/drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c
index d2e2e8f29967..f1a639328ab0 100644
--- a/drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c
+++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c
@@ -97,7 +97,7 @@ void clk_mgr_exit_optimized_pwr_state(const struct dc *dc, 
struct clk_mgr *clk_m
 {
        struct dc_link *edp_links[MAX_NUM_EDP];
        struct dc_link *edp_link = NULL;
-       int edp_num;
+       unsigned int edp_num;
        unsigned int panel_inst;
 
        dc_get_edp_links(dc, edp_links, &edp_num);
@@ -123,7 +123,7 @@ void clk_mgr_optimize_pwr_state(const struct dc *dc, struct 
clk_mgr *clk_mgr)
 {
        struct dc_link *edp_links[MAX_NUM_EDP];
        struct dc_link *edp_link = NULL;
-       int edp_num;
+       unsigned int edp_num;
        unsigned int panel_inst;
 
        dc_get_edp_links(dc, edp_links, &edp_num);
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c 
b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 5d27666bbc7f..6ff1377c4dc5 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -1563,8 +1563,7 @@ static void detect_edp_presence(struct dc *dc)
        struct dc_link *edp_links[MAX_NUM_EDP];
        struct dc_link *edp_link = NULL;
        enum dc_connection_type type;
-       int i;
-       int edp_num;
+       unsigned int i, edp_num;
 
        dc_get_edp_links(dc, edp_links, &edp_num);
        if (!edp_num)
@@ -6264,8 +6263,7 @@ void dc_disable_accelerated_mode(struct dc *dc)
  */
 void dc_notify_vsync_int_state(struct dc *dc, struct dc_stream_state *stream, 
bool enable)
 {
-       int i;
-       int edp_num;
+       unsigned int i, edp_num;
        struct pipe_ctx *pipe = NULL;
        struct dc_link *link = stream->sink->link;
        struct dc_link *edp_links[MAX_NUM_EDP];
@@ -6319,8 +6317,7 @@ bool dc_abm_save_restore(
                struct dc_stream_state *stream,
                struct abm_save_restore *pData)
 {
-       int i;
-       int edp_num;
+       unsigned int i, edp_num;
        struct pipe_ctx *pipe = NULL;
        struct dc_link *link = stream->sink->link;
        struct dc_link *edp_links[MAX_NUM_EDP];
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_exports.c 
b/drivers/gpu/drm/amd/display/dc/core/dc_link_exports.c
index 7bb4504889be..f4e99ca7918f 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_exports.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_exports.c
@@ -46,7 +46,7 @@ struct dc_link *dc_get_link_at_index(struct dc *dc, uint32_t 
link_index)
 
 void dc_get_edp_links(const struct dc *dc,
                struct dc_link **edp_links,
-               int *edp_num)
+               unsigned int *edp_num)
 {
        int i;
 
@@ -68,7 +68,7 @@ bool dc_get_edp_link_panel_inst(const struct dc *dc,
                unsigned int *inst_out)
 {
        struct dc_link *edp_links[MAX_NUM_EDP];
-       int edp_num, i;
+       unsigned int edp_num, i;
 
        *inst_out = 0;
        if (link->connector_signal != SIGNAL_TYPE_EDP)
diff --git a/drivers/gpu/drm/amd/display/dc/dc.h 
b/drivers/gpu/drm/amd/display/dc/dc.h
index 41b5dedb6eff..48b523fabbbe 100644
--- a/drivers/gpu/drm/amd/display/dc/dc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc.h
@@ -2062,7 +2062,7 @@ bool dc_get_edp_link_panel_inst(const struct dc *dc,
 /* Return an array of link pointers to edp links. */
 void dc_get_edp_links(const struct dc *dc,
                struct dc_link **edp_links,
-               int *edp_num);
+               unsigned int *edp_num);
 
 void dc_set_edp_power(const struct dc *dc, struct dc_link *edp_link,
                                 bool powerOn);
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c 
b/drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c
index 3b9011ef9b68..2764125d63b3 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c
@@ -41,8 +41,7 @@ static unsigned int abm_feature_support(struct abm *abm, 
unsigned int panel_inst
 {
        struct dc_context *dc = abm->ctx;
        struct dc_link *edp_links[MAX_NUM_EDP];
-       int i;
-       int edp_num;
+       unsigned int i, edp_num;
        unsigned int ret = ABM_FEATURE_NO_SUPPORT;
 
        dc_get_edp_links(dc->dc, edp_links, &edp_num);
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c 
b/drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c
index d0ffa99f1fe0..52673e2f504c 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c
@@ -82,7 +82,7 @@ bool dmub_hw_lock_mgr_does_link_require_lock(const struct dc 
*dc, const struct d
 
        if (link->psr_settings.psr_version == DC_PSR_VERSION_1) {
                struct dc_link *edp_links[MAX_NUM_EDP];
-               int edp_num;
+               unsigned int edp_num;
 
                dc_get_edp_links(dc, edp_links, &edp_num);
                if (edp_num == 1)
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c 
b/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
index e4bd6089026b..8f56f164d567 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
@@ -1986,7 +1986,7 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct 
dc_state *context)
        struct pipe_ctx *pipe_ctx = NULL;
        struct dce_hwseq *hws = dc->hwseq;
        int edp_with_sink_num;
-       int edp_num;
+       unsigned int edp_num;
        int edp_stream_num;
        int i;
        bool can_apply_edp_fast_boot = false;
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c 
b/drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
index ffeec61824f5..29673a7b92ec 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
@@ -1904,7 +1904,7 @@ void dcn10_power_down_on_boot(struct dc *dc)
 {
        struct dc_link *edp_links[MAX_NUM_EDP];
        struct dc_link *edp_link = NULL;
-       int edp_num;
+       unsigned int edp_num;
        int i = 0;
 
        dc_get_edp_links(dc, edp_links, &edp_num);
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c 
b/drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
index d04cfd403b7e..34d4519b3a17 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
@@ -645,7 +645,7 @@ void dcn30_init_hw(struct dc *dc)
        struct dc_bios *dcb = dc->ctx->dc_bios;
        struct resource_pool *res_pool = dc->res_pool;
        int i;
-       int edp_num;
+       unsigned int edp_num;
        uint32_t backlight = MAX_BACKLIGHT_LEVEL;
        uint32_t user_level = MAX_BACKLIGHT_LEVEL;
 
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c 
b/drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
index e5d93dd348dd..ef08c98b11e9 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
@@ -793,7 +793,7 @@ void dcn32_init_hw(struct dc *dc)
        struct dc_bios *dcb = dc->ctx->dc_bios;
        struct resource_pool *res_pool = dc->res_pool;
        int i;
-       int edp_num;
+       unsigned int edp_num;
        uint32_t backlight = MAX_BACKLIGHT_LEVEL;
        uint32_t user_level = MAX_BACKLIGHT_LEVEL;
 
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c 
b/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
index b5f60f59382e..7c25911089b8 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
@@ -520,7 +520,7 @@ void dcn35_power_down_on_boot(struct dc *dc)
 {
        struct dc_link *edp_links[MAX_NUM_EDP];
        struct dc_link *edp_link = NULL;
-       int edp_num;
+       unsigned int edp_num;
        int i = 0;
 
        dc_get_edp_links(dc, edp_links, &edp_num);
@@ -921,7 +921,7 @@ void dcn35_calc_blocks_to_gate(struct dc *dc, struct 
dc_state *context,
        bool hpo_frl_stream_enc_acquired = false;
        bool hpo_dp_stream_enc_acquired = false;
        int i = 0, j = 0;
-       int edp_num = 0;
+       unsigned int edp_num = 0;
        struct dc_link *edp_links[MAX_NUM_EDP] = { NULL };
 
        memset(update_state, 0, sizeof(struct pg_block_update));
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c 
b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
index ca611b3c22d3..56d4c350d8c9 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
@@ -140,7 +140,7 @@ void dcn401_init_hw(struct dc *dc)
        struct dc_bios *dcb = dc->ctx->dc_bios;
        struct resource_pool *res_pool = dc->res_pool;
        int i;
-       int edp_num;
+       unsigned int edp_num;
        uint32_t backlight = MAX_BACKLIGHT_LEVEL;
        uint32_t user_level = MAX_BACKLIGHT_LEVEL;
        int current_dchub_ref_freq = 0;
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c 
b/drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c
index 7f9c121c00e6..ba1813eb3c6c 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c
@@ -66,7 +66,7 @@ void dcn42_init_hw(struct dc *dc)
        struct dc_bios *dcb = dc->ctx->dc_bios;
        struct resource_pool *res_pool = dc->res_pool;
        int i;
-       int edp_num;
+       unsigned int edp_num;
        uint32_t backlight = MAX_BACKLIGHT_LEVEL;
        uint32_t user_level = MAX_BACKLIGHT_LEVEL;
        bool dchub_ref_freq_changed;
@@ -1063,7 +1063,7 @@ void dcn42_power_down_on_boot(struct dc *dc)
 {
        struct dc_link *edp_links[MAX_NUM_EDP];
        struct dc_link *edp_link = NULL;
-       int edp_num;
+       unsigned int edp_num;
        int i = 0;
 
        dc_get_edp_links(dc, edp_links, &edp_num);
-- 
2.43.0

Reply via email to