From 9cf29399f615fc13732f3c8ba3f5ff47e2ca256d Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 29 Sep 2017 13:15:58 +1000 Subject: [PATCH] amdgpu/dc: make opp construct void. This doesn't return anything except true. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/dc/dce/dce_opp.c | 4 +--- drivers/gpu/drm/amd/display/dc/dce/dce_opp.h | 2 +- .../gpu/drm/amd/display/dc/dce100/dce100_resource.c | 10 +++------- .../gpu/drm/amd/display/dc/dce110/dce110_resource.c | 10 +++------- .../gpu/drm/amd/display/dc/dce112/dce112_resource.c | 10 +++------- .../gpu/drm/amd/display/dc/dce120/dce120_resource.c | 10 +++------- drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | 10 +++------- 7 files changed, 17 insertions(+), 39 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_opp.c b/drivers/gpu/drm/amd/display/dc/dce/dce_opp.c index c0736aeabd85..3931412ab6d3 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_opp.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_opp.c @@ -540,7 +540,7 @@ static const struct opp_funcs funcs = { .opp_program_bit_depth_reduction = dce110_opp_program_bit_depth_reduction }; -bool dce110_opp_construct(struct dce110_opp *opp110, +void dce110_opp_construct(struct dce110_opp *opp110, struct dc_context *ctx, uint32_t inst, const struct dce_opp_registers *regs, @@ -556,8 +556,6 @@ bool dce110_opp_construct(struct dce110_opp *opp110, opp110->regs = regs; opp110->opp_shift = opp_shift; opp110->opp_mask = opp_mask; - - return true; } void dce110_opp_destroy(struct output_pixel_processor **opp) diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_opp.h b/drivers/gpu/drm/amd/display/dc/dce/dce_opp.h index 0874c22b8b02..2ab0147cbd9d 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_opp.h +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_opp.h @@ -272,7 +272,7 @@ struct dce110_opp { const struct dce_opp_mask *opp_mask; }; -bool dce110_opp_construct(struct dce110_opp *opp110, +void dce110_opp_construct(struct dce110_opp *opp110, struct dc_context *ctx, uint32_t inst, const struct dce_opp_registers *regs, diff --git a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c index 0084645837ec..729d82eb6500 100644 --- a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c @@ -547,13 +547,9 @@ struct output_pixel_processor *dce100_opp_create( if (!opp) return NULL; - if (dce110_opp_construct(opp, - ctx, inst, &opp_regs[inst], &opp_shift, &opp_mask)) - return &opp->base; - - BREAK_TO_DEBUGGER(); - kfree(opp); - return NULL; + dce110_opp_construct(opp, + ctx, inst, &opp_regs[inst], &opp_shift, &opp_mask); + return &opp->base; } struct clock_source *dce100_clock_source_create( diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c index 2c24f2b882fe..8e3f365177b8 100644 --- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c @@ -586,13 +586,9 @@ static struct output_pixel_processor *dce110_opp_create( if (!opp) return NULL; - if (dce110_opp_construct(opp, - ctx, inst, &opp_regs[inst], &opp_shift, &opp_mask)) - return &opp->base; - - BREAK_TO_DEBUGGER(); - kfree(opp); - return NULL; + dce110_opp_construct(opp, + ctx, inst, &opp_regs[inst], &opp_shift, &opp_mask); + return &opp->base; } struct clock_source *dce110_clock_source_create( diff --git a/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c b/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c index 7aac8fdb3030..3cb18cecb800 100644 --- a/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c @@ -586,13 +586,9 @@ struct output_pixel_processor *dce112_opp_create( if (!opp) return NULL; - if (dce110_opp_construct(opp, - ctx, inst, &opp_regs[inst], &opp_shift, &opp_mask)) - return &opp->base; - - BREAK_TO_DEBUGGER(); - kfree(opp); - return NULL; + dce110_opp_construct(opp, + ctx, inst, &opp_regs[inst], &opp_shift, &opp_mask); + return &opp->base; } struct clock_source *dce112_clock_source_create( diff --git a/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c b/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c index 7de99c454f4b..ea234376c0e2 100644 --- a/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c @@ -356,13 +356,9 @@ struct output_pixel_processor *dce120_opp_create( if (!opp) return NULL; - if (dce110_opp_construct(opp, - ctx, inst, &opp_regs[inst], &opp_shift, &opp_mask)) - return &opp->base; - - BREAK_TO_DEBUGGER(); - kfree(opp); - return NULL; + dce110_opp_construct(opp, + ctx, inst, &opp_regs[inst], &opp_shift, &opp_mask); + return &opp->base; } static const struct bios_registers bios_regs = { diff --git a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c index 3603ae93cd72..71f265b6b670 100644 --- a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c @@ -422,13 +422,9 @@ static struct output_pixel_processor *dce80_opp_create( if (!opp) return NULL; - if (dce110_opp_construct(opp, - ctx, inst, &opp_regs[inst], &opp_shift, &opp_mask)) - return &opp->base; - - BREAK_TO_DEBUGGER(); - kfree(opp); - return NULL; + dce110_opp_construct(opp, + ctx, inst, &opp_regs[inst], &opp_shift, &opp_mask); + return &opp->base; } static struct stream_encoder *dce80_stream_encoder_create( -- 2.30.2