lkml.org 
[lkml]   [2023]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH] drm/radeon: Move assignment outside if condition
    Applied.  Thanks!

    On Sun, Jul 23, 2023 at 11:45 PM <sunran001@208suo.com> wrote:
    >
    > Fixes the following checkpatch errors:
    >
    > ERROR: do not use assignment in if condition
    >
    > Signed-off-by: Ran Sun <sunran001@208suo.com>
    > ---
    > drivers/gpu/drm/radeon/radeon_legacy_tv.c | 6 ++++--
    > 1 file changed, 4 insertions(+), 2 deletions(-)
    >
    > diff --git a/drivers/gpu/drm/radeon/radeon_legacy_tv.c
    > b/drivers/gpu/drm/radeon/radeon_legacy_tv.c
    > index 12e180b119ac..7883e9ec0bae 100644
    > --- a/drivers/gpu/drm/radeon/radeon_legacy_tv.c
    > +++ b/drivers/gpu/drm/radeon/radeon_legacy_tv.c
    > @@ -724,12 +724,14 @@ void radeon_legacy_tv_mode_set(struct drm_encoder
    > *encoder,
    > }
    >
    > for (i = 0; i < MAX_H_CODE_TIMING_LEN; i++) {
    > - if ((tv_dac->tv.h_code_timing[i] = hor_timing[i]) == 0)
    > + tv_dac->tv.h_code_timing[i] = hor_timing[i];
    > + if (tv_dac->tv.h_code_timing[i] == 0)
    > break;
    > }
    >
    > for (i = 0; i < MAX_V_CODE_TIMING_LEN; i++) {
    > - if ((tv_dac->tv.v_code_timing[i] = vert_timing[i]) == 0)
    > + tv_dac->tv.v_code_timing[i] = vert_timing[i];
    > + if (tv_dac->tv.v_code_timing[i] == 0)
    > break;
    > }

    \
     
     \ /
      Last update: 2023-07-24 23:44    [W:3.002 / U:0.116 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site