Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5523231pxj; Wed, 23 Jun 2021 03:13:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnfSgrfuP6UnsbytDRFU1LPljOR4CbgvgjUZogH5eE/CnEv3ipyodkLmgG6eDw7oMwLYwY X-Received: by 2002:a05:6402:b6a:: with SMTP id cb10mr11238560edb.275.1624443180291; Wed, 23 Jun 2021 03:13:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624443180; cv=none; d=google.com; s=arc-20160816; b=xuPa4ilq1PxqiV3WtqLtD8ubsNGAzlO89LS9bzVpagJmftpXp2WgvNfeGTkNi05Y6j hQrNzunmp9F+1BcpxCGfvclRfpehZaXH5tVb+lJ4xbh6x+Zrs5oP0urq11ScCVwWpLnC CRzu2clL8t0LJgPLiEC9VFs+kGS9+924Ov2M/s/g6B23T6xohQI7YIt3dV8KwQAQ/mV2 Lb6a5EOVr/uOYDW+cagXKPDUhZmZWThCfAQh2PXpW37/S6vKliB6841Xedo1D16oTBGK 6rxzpMNDFcmY/PPOVFEpKuOCLIoVG6hvanRc61eDIq0SHmRdQYAUD5Kgsd+JL/SVvXb6 hAUA== 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=dZ31w04upzRkbl49WdgvD38tl1NzNPOKltoDcfdDNW/SO7eAw5WFgxvnz/+GitO26v IUl3wQN4hQMTXO2QvnRof7u0S2reoh16m6EzXjUsNhCydvdivKqHvemRd1mhpJzEOHtl Cz0YVbjJBuWg+YtyTegRtA+ht+4Xs8+MNeXPdXWOJ90de2S8Bu54FfPalqsWYDP8kGXg Fbqhxdq1w0NCXT4ocOIH5d+emQuAXJUdB1YI4voAA7DiKgDdxwfaW28IEeFmQF/vzt45 fvt1u0u0bT8TnsbHqkbBM5V8iyp1y6hwBeyp0u8oWn+Vxg3JF93ehobk0JoCw1X/fR+U SOKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Y04lejJq; 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 by16si8078180ejc.247.2021.06.23.03.12.37; Wed, 23 Jun 2021 03:13:00 -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=Y04lejJq; 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 S230384AbhFWKNy (ORCPT + 99 others); Wed, 23 Jun 2021 06:13:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:43068 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230152AbhFWKNu (ORCPT ); Wed, 23 Jun 2021 06:13:50 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 82A21611C9; Wed, 23 Jun 2021 10:11:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624443093; bh=lEMGdk+QOQQbwsmw6YQ5VqGUddHqHIPANLPyfPqVKt0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y04lejJqplVnm8xl33R+qVL59qxO/Im5Ny1FfusZA2XIdX0KN7qIFta4L7nsvFcWy 7gURBzVlWAphcq9em4pDEoOHOm9PGc8CtjYo5c5FXzc8GWTmrESk2XeYfdx9DpNQtF eud5yh6/yNI4Kj82YNcWR0+TsuLllA3qdwRL9bSMo53CINGka5q9KOYlX2BCTqU1NH N4vXjb/YUPw5OYVxGJNe+pAVGUxennG5kSrw7x1qxvhwuw9/Q9mS7e86J1BtVrYoON qkQbPPrk3Ke125FAEn2hibnuojcICNuyYw6k+Dg+Co0TYZRAHEt9FNBg19TpKQLN/C xig6Vx0g0Cr+w== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1lvzr1-002pFT-3T; Wed, 23 Jun 2021 12:11:31 +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 v6 1/8] staging: phy-hi3670-usb3: do a some minor cleanups Date: Wed, 23 Jun 2021 12:11:23 +0200 Message-Id: <55db419e42fd3af72494acbe0ea0f0d1de8906ac.1624442566.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