Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3946602ybl; Mon, 9 Dec 2019 02:51:53 -0800 (PST) X-Google-Smtp-Source: APXvYqwxNTWlENPu5ucxT7L0kF/GBtKr5/nDp21iFAs60lOKksBLN726Wf2CJQBVNinc35hdCawz X-Received: by 2002:a9d:32e:: with SMTP id 43mr10733287otv.301.1575888713019; Mon, 09 Dec 2019 02:51:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575888713; cv=none; d=google.com; s=arc-20160816; b=A30QdrNdpEqJjmaBMXLbmPUrPYdCSguqL7Vog+p7YXCsYBFP11rHz1btLAKArt7kbI cV3IUb9fAGjQywQ2cRlhDPyTt4x73PS9laONfrSJTsVUbo1xeee33r/lLBQG+8TIKRoy Xx1sSr38dAr1r7HDBzZg0rYp0npOiOlpo6GhYtz52oxx7EAJEsfPefHVnAjo1y+mhByC 7ZeIlGavJ3Cxpeq+1BRkJ/myQoocXo0wopCW7f72j35H+NrZExx2sNZ0jeGKE4fflUwZ fG5kvs1mpRWUfBVnWpQw9wBVw+LAyhiw0sNsrrRDZHpNgZ0OGgdpA1CM4fofQS5F1Dn5 anpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type :content-transfer-encoding:mime-version:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=XF8b5+RnbnhvUODeVp5HfzGOMbNt2Uj0dVL4oFNxQD8=; b=0/BJBX9dL6sYfJ8xE3oM4/4CdB2gHvg84S4MP0F96K/KCKtC19Z3H5ePQEXkUnmjkh nXzLoTyPdApKgOP5Y0UT5FZXDGjRNBA2kCtuVSSvZiW5JVMIgVXEuQBgQImSHa05ZwUS NGvSkfAzFPbYSJPD7/Pdl7B6z0GWXc6dJbODtsxCgEoelR8MwLECYBcSFQmXyh2y8cHT kxXvesoPHpbzx0qvQKf0gxQ55zz0toxx4oeblHljQ8K5L7738ZpeAHw1UkFdigcIgDnu 5zNYpGkdlVQqn4MVfC5OWhRfNy58yhJQhsap2ZkDbNpcLHDzJU8pxctZhtT/B0O8gYgo Wasg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=BWuHDXSk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p22si10522480ota.43.2019.12.09.02.51.41; Mon, 09 Dec 2019 02:51:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=BWuHDXSk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727494AbfLIKuj (ORCPT + 99 others); Mon, 9 Dec 2019 05:50:39 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:46102 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727326AbfLIKug (ORCPT ); Mon, 9 Dec 2019 05:50:36 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20191209105034euoutp029a02b5b3fe118985c0dfa349b1d2801b~erl0Q0BGC3039030390euoutp02_ for ; Mon, 9 Dec 2019 10:50:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20191209105034euoutp029a02b5b3fe118985c0dfa349b1d2801b~erl0Q0BGC3039030390euoutp02_ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1575888634; bh=XF8b5+RnbnhvUODeVp5HfzGOMbNt2Uj0dVL4oFNxQD8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BWuHDXSkim8+164MbWhbz+opMZdTxOfFu62PmTn06xVW3RQ9Km//65hFf9Co1Navd dpvJWW2E0LfBD/pMTChFTmyTpzfm6OJBaYEoHpgRs/uuuWNp9I4tMbfHdNnXhSaBpg Usx5qE4Ic6fd3gOibvLho/KDC1WHv/SvI8PcSdTQ= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20191209105034eucas1p182d3b8056147576e49af062c3919dc42~erlz9utCS1563615636eucas1p1G; Mon, 9 Dec 2019 10:50:34 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 74.2E.60679.9F62EED5; Mon, 9 Dec 2019 10:50:34 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20191209105033eucas1p21ee8064e1d6917b403c06ee59a97421d~erlzZV7pJ1406714067eucas1p2_; Mon, 9 Dec 2019 10:50:33 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20191209105033eusmtrp1b10bcfaaad3446502feccb2d4131fc53~erlzYiNOv2135321353eusmtrp1f; Mon, 9 Dec 2019 10:50:33 +0000 (GMT) X-AuditID: cbfec7f4-0cbff7000001ed07-53-5dee26f9056f Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 62.D6.08375.9F62EED5; Mon, 9 Dec 2019 10:50:33 +0000 (GMT) Received: from AMDC3555.digital.local (unknown [106.120.51.67]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20191209105032eusmtip1b54a778cfa047ee0e5a7c514ea187ef6~erlyoGs7e3003930039eusmtip1i; Mon, 9 Dec 2019 10:50:32 +0000 (GMT) From: =?UTF-8?q?Artur=20=C5=9Awigo=C5=84?= To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org Cc: =?UTF-8?q?Artur=20=C5=9Awigo=C5=84?= , cw00.choi@samsung.com, myungjoo.ham@samsung.com, kyungmin.park@samsung.com, kgene@kernel.org, krzk@kernel.org, b.zolnierkie@samsung.com, m.szyprowski@samsung.com, inki.dae@samsung.com, sw0312.kim@samsung.com, k.konieczny@samsung.com, leonard.crestez@nxp.com Subject: [PATCH v3 3/4] devfreq: exynos-bus: Change goto-based logic to if-else logic Date: Mon, 9 Dec 2019 11:49:01 +0100 Message-Id: <20191209104902.11904-4-a.swigon@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191209104902.11904-1-a.swigon@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA02SfUhTURjGO7u7291odp2Wr1pWCwXFND+om0kkFIwoqb8KwWrpTSWntutH VpAaikqZKaWuUqupQ8mPZX6SqalDxebMtLIxSSW/ZU2INCq3a+V/zznv8/zO+8AhMHEP7kRE xcTTihhZtIQn5Db0/Hi7d8VtMXRfSQBlLE5HVF1hDU6NLn/FqTxjLpcq/VaIU3cn5jBKp6vl UwNp83xKbTDhlGZiBKfetTziUeY7XYgq1LVxqOddBj41lqrmUYX5M7wjpFRTmcWTvlDdlNYt NnGkOfWVSGrWuJzCQ4SB4XR0VCKt8D58QRg5MHsjbkZwdXq1gZOCjPxsJCCA9AdDzSCWjYSE mFQjaMg1rx+WEbSXjeIWl5g0Ixgu8clGhDXR/TmW9VQgyJyv5/4LLGXMWbE8Mgjy7o/zLQN7 Mh2BXvfRisXIPg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WwhoJq5C1ezQNQLSpyc+YQFZAyz gLrE+nlCIGFmoNbmrbOZJzAKzkJSNQuhahaSqgWMzKsYRVJLi3PTc4sN9YoTc4tL89L1kvNz NzEC43LbsZ+bdzBe2hh8iFGAg1GJh7fC5m2sEGtiWXFl7iFGCQ5mJRHeJRNfxQrxpiRWVqUW 5ccXleakFh9iNAX6bCKzlGhyPjBl5JXEG5oamltYGpobmxubWSiJ83YIHIwREkhPLEnNTk0t SC2C6WPi4JRqYBQ+XHVDQtbJ1/GQRlGntNbH7/X7pH/Uh2qun3XtonACm0v9kZRZhU4Hp5ZU cTmKqVVnfzA7wfylwJddsGja26fl1Qm7N0pdub3NajNbNFPBLUH5I/oFk+WWy+od8NjHLzJf ZaLS7H2l+strVNdzBC5W/ZE15WS3zjqdfYfDVKqiDtqcvdaoosRSnJFoqMVcVJwIAExjXRTh AgAA X-CMS-MailID: 20191209105033eucas1p21ee8064e1d6917b403c06ee59a97421d X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20191209105033eucas1p21ee8064e1d6917b403c06ee59a97421d X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20191209105033eucas1p21ee8064e1d6917b403c06ee59a97421d References: <20191209104902.11904-1-a.swigon@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch improves code readability by changing the following construct: > if (cond) > goto passive; > foo(); > goto out; > passive: > bar(); > out: into this: > if (cond) > bar(); > else > foo(); Signed-off-by: Artur Świgoń --- drivers/devfreq/exynos-bus.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c index 19d9f9f8ced2..0b557df63666 100644 --- a/drivers/devfreq/exynos-bus.c +++ b/drivers/devfreq/exynos-bus.c @@ -427,19 +427,13 @@ static int exynos_bus_probe(struct platform_device *pdev) goto err_reg; if (passive) - goto passive; + ret = exynos_bus_profile_init_passive(bus, profile); + else + ret = exynos_bus_profile_init(bus, profile); - ret = exynos_bus_profile_init(bus, profile); if (ret < 0) goto err; - goto out; -passive: - ret = exynos_bus_profile_init_passive(bus, profile); - if (ret < 0) - goto err; - -out: max_state = bus->devfreq->profile->max_state; min_freq = (bus->devfreq->profile->freq_table[0] / 1000); max_freq = (bus->devfreq->profile->freq_table[max_state - 1] / 1000); -- 2.17.1