From patchwork Tue Feb 26 19:36:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 10831451 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 655461390 for ; Wed, 27 Feb 2019 08:57:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 520D92B002 for ; Wed, 27 Feb 2019 08:57:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 467542C162; Wed, 27 Feb 2019 08:57:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E39772B002 for ; Wed, 27 Feb 2019 08:57:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8945E6E0A4; Wed, 27 Feb 2019 08:56:54 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1ECCF6E01C for ; Tue, 26 Feb 2019 19:36:30 +0000 (UTC) Received: by mail-pf1-x442.google.com with SMTP id u9so6731007pfn.1 for ; Tue, 26 Feb 2019 11:36:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zo1rOGgP1tAuDyRwTfd/XEth0y5njkvD5lYeSdDXZAc=; b=CYjY+tmjtLgwIBFNmkjedq1UgB5a1mLwAQBiV12nd1DhLR9XlYYhuvv2Xc4NoWFvG+ XusBPmu/4mTQpRZ0nBuGHvA+W4MH2JVb/vkVa85yw32x0mXEzLJ3DdB0yEiV/1h2LDQq +4SVnviqWq8K5Ek0QXigSnEy6nx608BelEMpOhKrAUYJEjMym6lKUlx+s1OiGJkgqzrv 58Ql8NsOofCqD7JcgFLScFgpHwQ/1ElA9RzucOxwqxUyVRD24Mj6lWkKZr7bGLBSEiJD jXmfIk/itx9mLp2RuvqOeXOrBf4HbhKAVmwaLucDxCmicYHcrnQdYtYZijy+jD/ykk8d sgzA== X-Gm-Message-State: AHQUAua99XF5lhk2Ol24ALVoxDHFRfEWVuS8/U+EqND9pgkOhNl9RbUP cN8367r32q/gvWK7hpqCGQYP0j8GC9U= X-Google-Smtp-Source: AHgI3IYgfhBMhvIRNXR3hr3JMt3zWE7NydpqBa/LlgW/jZEPxDBlX56DtUTPTEdJQJoBTzEmef3kjQ== X-Received: by 2002:a63:455f:: with SMTP id u31mr17194203pgk.241.1551209789266; Tue, 26 Feb 2019 11:36:29 -0800 (PST) Received: from squirtle.lan (c-24-22-235-96.hsd1.wa.comcast.net. [24.22.235.96]) by smtp.gmail.com with ESMTPSA id l79sm28951220pfb.102.2019.02.26.11.36.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Feb 2019 11:36:28 -0800 (PST) From: Andrey Smirnov To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/9] drm/bridge: tc358767: Simplify tc_stream_clock_calc() Date: Tue, 26 Feb 2019 11:36:02 -0800 Message-Id: <20190226193609.9862-3-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190226193609.9862-1-andrew.smirnov@gmail.com> References: <20190226193609.9862-1-andrew.smirnov@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 27 Feb 2019 08:56:29 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zo1rOGgP1tAuDyRwTfd/XEth0y5njkvD5lYeSdDXZAc=; b=Wa8DVPoMfPYg1dc+cJWAkL3aOSAlBxfag0TNEmf7VqJBb7f/zd51WuGFKK7L4IbG0s iMZAnjWoeyPd1ElYSctYbTEFzTaWrgnHYVB8Le4hD57BxqCAh3sLN24kBw8ZcMkTCC2h bF2hcQsr6nASsAumgG/DU+bYhNZOsRRZV2yf2mE6svuqLArobsfDL8NMaLDSDyBze7jD OxUtO02DoDVF4hSmu2QwNetAzsYGFISJmfLH58NS4Cqtuw3+ItQJZkp3aFicgYgpDhrv sWUzOwlRCKgmdVMJ9Mbv6yQGytaUdARlF9RKOOaNAZy4rqtoASe7CJA7I+YdbypEMf2n ItKA== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrey Smirnov , linux-kernel@vger.kernel.org, Laurent Pinchart , Chris Healy Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Drop the use of tc_write() as well as "magicly" used "ret" and "err:" and replace it with a simple call to regmap_write(). No functional change intended. Signed-off-by: Andrey Smirnov Cc: Archit Taneja Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Chris Healy Cc: Lucas Stach Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org --- drivers/gpu/drm/bridge/tc358767.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index b0f8264a1285..86ebd49194b7 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -504,7 +504,6 @@ static int tc_pxl_pll_dis(struct tc_data *tc) static int tc_stream_clock_calc(struct tc_data *tc) { - int ret; /* * If the Stream clock and Link Symbol clock are * asynchronous with each other, the value of M changes over @@ -520,11 +519,7 @@ static int tc_stream_clock_calc(struct tc_data *tc) * M/N = f_STRMCLK / f_LSCLK * */ - tc_write(DP0_VIDMNGEN1, 32768); - - return 0; -err: - return ret; + return regmap_write(tc->regmap, DP0_VIDMNGEN1, 32768); } static int tc_aux_link_setup(struct tc_data *tc)