Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp2654956rwo; Sun, 23 Jul 2023 21:40:23 -0700 (PDT) X-Google-Smtp-Source: APBJJlHFSLg+5k0PPaW6Ti2i6ymF47ho90yf5vjPfQmhvNhUD2P1wntzTVVXQZbg+C2N/QU41F0V X-Received: by 2002:a17:906:9bdd:b0:99b:4e75:52bb with SMTP id de29-20020a1709069bdd00b0099b4e7552bbmr8935158ejc.69.1690173623696; Sun, 23 Jul 2023 21:40:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690173623; cv=none; d=google.com; s=arc-20160816; b=ceN4FYK+s+jcR4s8dmP2mk+BnOplr6Gx5FHeCBrOHC5di0DnzTdr3dhk9ltNfiYc76 rToytNF4EUu1q2Dwhr5S1HwAVbAvC20sqLMPk5aADFzZpL3XYk/kKvIxneyeImigZs2C Dl1D7+lxUamjiQL4wWJSGv7enIBQHgBpcOXyX4O6HO4Pc/NDEyvLT6WdyJtdD7kRO3a+ Os23nuBIw1WXjgRjk4W+LR/WnrSh5x1QWDFsjbmZtb+J0HATTPXG4GWE+yLtxPW4VDZh Y9bXIkgW1sE9DDHoTZgThb2l0t86jJcOlpVbQhgLzsyZg9OesxQ9M4C6UbLCEUznyjKa 394w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:user-agent :references:in-reply-to:subject:cc:to:from:date:mime-version :dkim-signature; bh=+9uC/4QddpDN2puHv6RNZWor/ZbGB8+K3gsNB+vpagA=; fh=7mrb+jEz4ldW4HYDrM78dc1rA6GIHF/xkKOCEiigzvE=; b=PlJrZvN/W11A+q72e45n6Fg/i2sZjrEBtNzY4tGCWkyEUhN20Ggn/tx8SmWXAkFUVk iKGgrFYpAo8nRwkDInXbSZrXJgtvIR+SdT+QnumbVh03YSnjNW8n8CaxWA4I4JRxhR8e wnph6t4S2PFC9QBScrKjNbiZwaBBri3oszE6ooJoVhCrBOMDxxpabhGo/yx1Vr39kxsc ZlQxhz4SJtLlHgaCVnukK8cp7q+ynHQTgsZflW5ZvCxWtWXHWV4tAr+ZRnECFPQJFOyV bhi8Dla1APSdmMQtVN2gEwO/cYuj30DAULZSKQVI3wdoHx7vXVgp8a3VzNul2nEpGwWm WMeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@208.org header.s=dkim header.b=m+Xbz7a7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f2-20020a170906494200b009952c411261si5724734ejt.192.2023.07.23.21.39.59; Sun, 23 Jul 2023 21:40:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@208.org header.s=dkim header.b=m+Xbz7a7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229552AbjGXDpF (ORCPT + 99 others); Sun, 23 Jul 2023 23:45:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbjGXDpC (ORCPT ); Sun, 23 Jul 2023 23:45:02 -0400 Received: from mail.208.org (unknown [183.242.55.162]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5AC1D7 for ; Sun, 23 Jul 2023 20:45:00 -0700 (PDT) Received: from mail.208.org (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTP id 4R8Qyx2B1ZzBRDrF for ; Mon, 24 Jul 2023 11:44:57 +0800 (CST) Authentication-Results: mail.208.org (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=208.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=208.org; h= content-transfer-encoding:content-type:message-id:user-agent :references:in-reply-to:subject:to:from:date:mime-version; s= dkim; t=1690170297; x=1692762298; bh=oL5acEfGsFlngl49HUHQFfFGsTM P1vCTZkBz9qSCsgY=; b=m+Xbz7a7XQTLcRbDOpqCkZbCy8jFeiQkoqm5PLPfV26 xhUJLAdsKt1to4pr7oKYKeuROeIPaTif3w6lblH08p5Jb/UQ1F7I9Z1d/8dtrRB/ ve8SWE06hjuuAH8banfCOHIfiDsOicbgsQl0xqYNrdw0IYPbRXgMG7g4vjVdfsLE +MZ+xV8Pj0VM6EVsS7d49gV79yZbsj5sgpKSUHwQM/F2LSbN+foSARRM/xDQJRJw wLVcvMCY46HY5AoUCshbb+gfdP9p5RcxTsDHKOeN6p/q/wGW8b0yP+8NLIRP01Qi QP10L4/8sAL7s+qQJ8L/MYRYJ9jmRcBz2Vespy/Abzw== X-Virus-Scanned: amavisd-new at mail.208.org Received: from mail.208.org ([127.0.0.1]) by mail.208.org (mail.208.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id usRRAD0boamw for ; Mon, 24 Jul 2023 11:44:57 +0800 (CST) Received: from localhost (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTPSA id 4R8Qyx0JfLzBJTF7; Mon, 24 Jul 2023 11:44:57 +0800 (CST) MIME-Version: 1.0 Date: Mon, 24 Jul 2023 11:44:56 +0800 From: sunran001@208suo.com To: alexander.deucher@amd.com Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/radeon: Move assignment outside if condition In-Reply-To: <20230724034415.8257-1-xujianghui@cdjrlc.com> References: <20230724034415.8257-1-xujianghui@cdjrlc.com> User-Agent: Roundcube Webmail Message-ID: <304e90636af5cb6843ae603cd973680f@208suo.com> X-Sender: sunran001@208suo.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RDNS_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes the following checkpatch errors: ERROR: do not use assignment in if condition Signed-off-by: Ran Sun --- 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; }