Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp33396pxv; Thu, 24 Jun 2021 02:04:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXsOYfV1dJav+3gNIxHTLEde2AL1nwJ4+X0YhvnRMATfVU+m6mx6thQqOIS3KeZGMIa3Ln X-Received: by 2002:a50:ef1a:: with SMTP id m26mr1548425eds.269.1624525461751; Thu, 24 Jun 2021 02:04:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624525461; cv=none; d=google.com; s=arc-20160816; b=qIStovNXoDpzy+9aqw+sxtxhN/NaPPMpdDBkLE2RXHjnEbnodGIL/wzRAIPhg7bFtP K8FbP9xfFC5/56hDvvsSBR3nY4i9uEAj/oznEt7GAHbUFdYSY89nA5wMTPRDcy1MRQtE 8Z4XGYqxdQH3ohw2zOIzs/mC6cBkCpq7nbltm3+8xOy0C2UqxoZLGj/RcO5k/nETBgVy GJj/j1aKqnHe0Tj90x4rsFrJYTTd6Jj8SvYtBwRq2ZNoPKxEhenPoRa0cs1iviOqJMKg HXqyh6B/JpxH90ArVN15uMBRE8WC81Q/Vjdx72tXXed1I9YlQLC7416tB2/OUM7TQpNS grcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7MntfLp0h3AX05CmX0r97mtP8u/LR8YSjNqtQddjEYY=; b=CmGboFXwdjKXpIQDnZ///IupCykkR0/Vx2/0zScR4350ISwiLn2Q/jXTrUjoE8REDW cSzCay04Aqsvf+k0xJWS4PUGa6nGxBgtjRHaNcMiP6q76S16g07T5L7dmCMdS8VxXpOa ttxhO9hm04MGabvhCDWbRSe4qAlbw4IwwAjUygn9Z9xylmQuAa3V8Aca0o63uDjtSrpx GEcVeRJMlY3VvL7pTYyu6wghqHw0kuC0fZ3ji7GsI1wJ/HloTcVnWi1Rv4+xjoRp2SxV fUsXtTDF+LfLwCtEq9v6YwIhh2lrhtKPeoD3W7Ytgdndb4jCE5bVG9c1oa1ZtnS04LAN rr0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UrQeqrnI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k24si2420444eds.32.2021.06.24.02.03.58; Thu, 24 Jun 2021 02:04:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UrQeqrnI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230393AbhFXJFN (ORCPT + 99 others); Thu, 24 Jun 2021 05:05:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:59710 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229956AbhFXJFM (ORCPT ); Thu, 24 Jun 2021 05:05:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 67B7E613BE; Thu, 24 Jun 2021 09:02:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624525373; bh=lEMGdk+QOQQbwsmw6YQ5VqGUddHqHIPANLPyfPqVKt0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UrQeqrnIpm5zF/hj66Yx3a/b5o9V3+aQU95w/W/vQ083llgYO4RVMgvSAoDffF/VB OcLlOwFzmEefRiSxsq51jjJsmbzEAPcpPqs0iWM+H2wl2JTo9f1ICuupfXDDoybeXb aaJmboshD5Om5wOEdG5lN9FIN03WUJIpRRoXaLMeh91KgJixoCMuaO/cCWCeEGQxOz frSnvfaNCg00HSL55TdkU2unBg2c+JnUSm+ZdQL9G6am34jdLkwwwczrzNSYbwyCFO uqCPBe+wgvame44iEEcvXB6GWVxcrUfQbkz8fn2saf0UfeSbEmcT1OB3ghnKMzZf2e E6UdGxS1+cPpg== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1lwLG6-003jrq-MI; Thu, 24 Jun 2021 11:02:50 +0200 From: Mauro Carvalho Chehab To: Greg Kroah-Hartman Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH RESEND v6 1/8] staging: phy-hi3670-usb3: do a some minor cleanups Date: Thu, 24 Jun 2021 11:01:05 +0200 Message-Id: <55db419e42fd3af72494acbe0ea0f0d1de8906ac.1624525118.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Mauro Carvalho Chehab Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Before moving this driver out of staging: 1. group some integers altogether; 2. Use: return some_function() instead of: ret = some_function(); return ret; This is just a cleanup. No functional changes. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/phy-hi3670-usb3.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/drivers/staging/hikey9xx/phy-hi3670-usb3.c b/drivers/staging/hikey9xx/phy-hi3670-usb3.c index e7e579ce0302..b9ffe08abaab 100644 --- a/drivers/staging/hikey9xx/phy-hi3670-usb3.c +++ b/drivers/staging/hikey9xx/phy-hi3670-usb3.c @@ -148,10 +148,8 @@ static int hi3670_phy_cr_clk(struct regmap *usb31misc) return ret; /* Clock down */ - ret = regmap_update_bits(usb31misc, USB_MISC_CFG54, - CFG54_USB31PHY_CR_CLK, 0); - - return ret; + return regmap_update_bits(usb31misc, USB_MISC_CFG54, + CFG54_USB31PHY_CR_CLK, 0); } static int hi3670_phy_cr_set_sel(struct regmap *usb31misc) @@ -215,17 +213,14 @@ static int hi3670_phy_cr_set_addr(struct regmap *usb31misc, u32 addr) return ret; reg = FIELD_PREP(CFG54_USB31PHY_CR_ADDR_MASK, addr); - ret = regmap_update_bits(usb31misc, USB_MISC_CFG54, - CFG54_USB31PHY_CR_ADDR_MASK, reg); - return ret; + return regmap_update_bits(usb31misc, USB_MISC_CFG54, + CFG54_USB31PHY_CR_ADDR_MASK, reg); } static int hi3670_phy_cr_read(struct regmap *usb31misc, u32 addr, u32 *val) { - int reg; - int i; - int ret; + int reg, i, ret; for (i = 0; i < 100; i++) { ret = hi3670_phy_cr_clk(usb31misc); @@ -286,9 +281,7 @@ static int hi3670_phy_cr_write(struct regmap *usb31misc, u32 addr, u32 val) if (ret) return ret; - ret = hi3670_phy_cr_wait_ack(usb31misc); - - return ret; + return hi3670_phy_cr_wait_ack(usb31misc); } static int hi3670_phy_set_params(struct hi3670_priv *priv) -- 2.31.1