amdgpu/dc: make dce transform constructor void
authorDave Airlie <airlied@redhat.com>
Fri, 29 Sep 2017 03:15:59 +0000 (13:15 +1000)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 29 Sep 2017 17:01:49 +0000 (13:01 -0400)
This never returns anything but true.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce/dce_transform.c
drivers/gpu/drm/amd/display/dc/dce/dce_transform.h
drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c
drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c

index a8f60d7531bef7220d1d9be221921386e31e4ed8..c40d2e9e5f7c4bd6a4b6d20a0e78494cece27d74 100644 (file)
@@ -1437,7 +1437,7 @@ static const struct transform_funcs dce_transform_funcs = {
 /* Constructor, Destructor               */
 /*****************************************/
 
-bool dce_transform_construct(
+void dce_transform_construct(
        struct dce_transform *xfm_dce,
        struct dc_context *ctx,
        uint32_t inst,
@@ -1462,6 +1462,4 @@ bool dce_transform_construct(
 
        xfm_dce->lb_bits_per_entry = LB_BITS_PER_ENTRY;
        xfm_dce->lb_memory_size = LB_TOTAL_NUMBER_OF_ENTRIES; /*0x6B0*/
-
-       return true;
 }
index 805bb9c4e18880c7b7c2389f39d11a3fa21770ce..e1f1e5129f8644987f186c99e627819b8ec88a1b 100644 (file)
@@ -481,7 +481,7 @@ struct dce_transform {
        bool prescaler_on;
 };
 
-bool dce_transform_construct(struct dce_transform *xfm_dce,
+void dce_transform_construct(struct dce_transform *xfm_dce,
        struct dc_context *ctx,
        uint32_t inst,
        const struct dce_transform_registers *regs,
index 729d82eb65008c8af883f668fa58b55886067a7f..1caf2983dda5c82774787cfef2448ee6f93c9c4b 100644 (file)
@@ -486,14 +486,9 @@ static struct transform *dce100_transform_create(
        if (!transform)
                return NULL;
 
-       if (dce_transform_construct(transform, ctx, inst,
-                       &xfm_regs[inst], &xfm_shift, &xfm_mask)) {
-               return &transform->base;
-       }
-
-       BREAK_TO_DEBUGGER();
-       kfree(transform);
-       return NULL;
+       dce_transform_construct(transform, ctx, inst,
+                               &xfm_regs[inst], &xfm_shift, &xfm_mask);
+       return &transform->base;
 }
 
 static struct input_pixel_processor *dce100_ipp_create(
index 8e3f365177b82ba37b92d5a39cdd577cc1dfe745..45c5facf79b1a16d1cb41e31dcb9c7a429451b4d 100644 (file)
@@ -526,13 +526,9 @@ static struct transform *dce110_transform_create(
        if (!transform)
                return NULL;
 
-       if (dce_transform_construct(transform, ctx, inst,
-                       &xfm_regs[inst], &xfm_shift, &xfm_mask))
-               return &transform->base;
-
-       BREAK_TO_DEBUGGER();
-       kfree(transform);
-       return NULL;
+       dce_transform_construct(transform, ctx, inst,
+                               &xfm_regs[inst], &xfm_shift, &xfm_mask);
+       return &transform->base;
 }
 
 static struct input_pixel_processor *dce110_ipp_create(
index 3cb18cecb8005410ab03842cc97e9c94fe0e7d39..251e4a29d56ff89ec6f5fb5bd1f1784d0ec96245 100644 (file)
@@ -521,15 +521,10 @@ static struct transform *dce112_transform_create(
        if (!transform)
                return NULL;
 
-       if (dce_transform_construct(transform, ctx, inst,
-                       &xfm_regs[inst], &xfm_shift, &xfm_mask)) {
-               transform->lb_memory_size = 0x1404; /*5124*/
-               return &transform->base;
-       }
-
-       BREAK_TO_DEBUGGER();
-       kfree(transform);
-       return NULL;
+       dce_transform_construct(transform, ctx, inst,
+                               &xfm_regs[inst], &xfm_shift, &xfm_mask);
+       transform->lb_memory_size = 0x1404; /*5124*/
+       return &transform->base;
 }
 
 static const struct encoder_feature_support link_enc_feature = {
index ea234376c0e2322827b997bcd766db483a1daef8..13d75df713960c25a2ee5289643fdc7bc4bac391 100644 (file)
@@ -662,15 +662,10 @@ static struct transform *dce120_transform_create(
        if (!transform)
                return NULL;
 
-       if (dce_transform_construct(transform, ctx, inst,
-                       &xfm_regs[inst], &xfm_shift, &xfm_mask)) {
-               transform->lb_memory_size = 0x1404; /*5124*/
-               return &transform->base;
-       }
-
-       BREAK_TO_DEBUGGER();
-       kfree(transform);
-       return NULL;
+       dce_transform_construct(transform, ctx, inst,
+                               &xfm_regs[inst], &xfm_shift, &xfm_mask);
+       transform->lb_memory_size = 0x1404; /*5124*/
+       return &transform->base;
 }
 
 static void dce120_destroy_resource_pool(struct resource_pool **pool)
index 71f265b6b6705cbe5f16be2c2f6e00771f45aa1c..db8afb6491cd28ac9fcbc55a3b328c86349b0bcb 100644 (file)
@@ -535,15 +535,10 @@ static struct transform *dce80_transform_create(
        if (!transform)
                return NULL;
 
-       if (dce_transform_construct(transform, ctx, inst,
-                       &xfm_regs[inst], &xfm_shift, &xfm_mask)) {
-               transform->prescaler_on = false;
-               return &transform->base;
-       }
-
-       BREAK_TO_DEBUGGER();
-       kfree(transform);
-       return NULL;
+       dce_transform_construct(transform, ctx, inst,
+                               &xfm_regs[inst], &xfm_shift, &xfm_mask);
+       transform->prescaler_on = false;
+       return &transform->base;
 }
 
 static const struct encoder_feature_support link_enc_feature = {