Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp242934ybj; Thu, 19 Sep 2019 13:42:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqydn3YhueV3T2NrW0dO0ukEGESNflu+AKA6QbvsvOWwvtaHVITEybfCYOhWCbwL4mge90ut X-Received: by 2002:a17:907:40bc:: with SMTP id nu20mr15998957ejb.309.1568925750923; Thu, 19 Sep 2019 13:42:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568925750; cv=none; d=google.com; s=arc-20160816; b=hdfNYMaiDleRknpxGmcvKrrhi1AP2osrj7HRDegMmYOCRapUqKi6zK8bqQhyzzCo9d YeLhMXZONXgaYBYog8etkB/JRteQ1qH3ByQc0xE+EPwkosWYGvPW5VOPfoD1ljhR4je/ 01GTgl4ebH+blTfLt4Az4q09JAefYnB+6w6iSpzaVSZcWUTnYq0XfLCIhl/CiXxEFJZR uq9YWZjpbTOblYezbBzD/b/RPq/YwDEx9IUPXrWq6BtuHmTNpCJFO5H1XmwkxA+OOdw/ aEQ9wgKd3HvOZmkIcPPsuLZt3KmyoiArOGbklmawhZc+Z279pfLDy5AFeCsXYbl79MAQ Rymw== 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=9vBjzZ8WEuvpoJoW1P0oRATI3VJ/Xiwt0zbgAf9dLLs=; b=lkg9CeXQGWHqyV0MsdC72sPSimHLJlM5JwFyWxujxD+uv8WoFmuhm3zyBa41pTtE0J M9Fv1tK/OhzSEpCivqC98W0JlW7d1f3eeQO8Mv3AC6ekGRHhWRwDyRmxDt94DKUv01st E/zIqHt8s6A9xE1Ci89y+a2r++lN+2vLwUQfdnEUu6BZBNYKZO571zaYpOwA16s83530 x7PgHCTUoFqGqga3cao375Cd+9/GxtuwwIT4N8Phq00IVOK3wZT4Q3qHseA0Z25IRbao O4vg70DuAWEkaRL86lh+1u6cYn+CsMkjZlBMYyeYVkGx+Bc7Ax9vakQoZLRnhf+N9hfp J5tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=otKnG8UD; 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 p13si6174822edi.410.2019.09.19.13.42.07; Thu, 19 Sep 2019 13:42:30 -0700 (PDT) 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=otKnG8UD; 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 S2390557AbfISOXa (ORCPT + 99 others); Thu, 19 Sep 2019 10:23:30 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:53427 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390462AbfISOX0 (ORCPT ); Thu, 19 Sep 2019 10:23:26 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190919142325euoutp02c3b0921b8280d6a09f58466f440451fd~F3PiT04pX1641716417euoutp02U for ; Thu, 19 Sep 2019 14:23:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190919142325euoutp02c3b0921b8280d6a09f58466f440451fd~F3PiT04pX1641716417euoutp02U DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1568903005; bh=9vBjzZ8WEuvpoJoW1P0oRATI3VJ/Xiwt0zbgAf9dLLs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=otKnG8UDxVe3aVHAwOIivSEkiKqULW6U8Tsh8VzfzDcuu9j5ZR5EqwubCZ0SOz0mF deGwxb0BMfEe14kPkAYgI9UK4uAeQWYH+TSoSF1J9zKKy4xAu0j992L7W4K5KWyxX+ 4Q0wyoE7/ELJfjja2IXbPVWASXg+BJiPpyVPovjs= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190919142324eucas1p2c6dcf28205c412e8ae407490ef04a781~F3Phm-q8v2469924699eucas1p2I; Thu, 19 Sep 2019 14:23:24 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 9E.59.04374.C5F838D5; Thu, 19 Sep 2019 15:23:24 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20190919142323eucas1p2fc73a765389432f880fa28945fd28975~F3Pgz1CDa3081730817eucas1p2n; Thu, 19 Sep 2019 14:23:23 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20190919142323eusmtrp20894d9aa07c91aa87c9b5ad91c68b53b~F3Pglrtp-3074530745eusmtrp2c; Thu, 19 Sep 2019 14:23:23 +0000 (GMT) X-AuditID: cbfec7f5-92d689c000001116-f9-5d838f5c29a2 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id DF.0F.04166.B5F838D5; Thu, 19 Sep 2019 15:23:23 +0100 (BST) Received: from AMDC3555.digital.local (unknown [106.120.51.67]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190919142322eusmtip13d904712bb324cac14c4bb82ec7db1dc~F3PfwIqp63226332263eusmtip1A; Thu, 19 Sep 2019 14:23:22 +0000 (GMT) From: =?UTF-8?q?Artur=20=C5=9Awigo=C5=84?= To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: =?UTF-8?q?Artur=20=C5=9Awigo=C5=84?= , cw00.choi@samsung.com, myungjoo.ham@samsung.com, inki.dae@samsung.com, sw0312.kim@samsung.com, georgi.djakov@linaro.org, leonard.crestez@nxp.com, m.szyprowski@samsung.com, b.zolnierkie@samsung.com, krzk@kernel.org Subject: [RFC PATCH v2 03/11] devfreq: exynos-bus: Change goto-based logic to if-else logic Date: Thu, 19 Sep 2019 16:22:28 +0200 Message-Id: <20190919142236.4071-4-a.swigon@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190919142236.4071-1-a.swigon@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA02SWUwTURSGvZ3OdGgsGQqEAxKXRh5Ewd1clBiJmkzkxcSEB7WRKiOgbOmw iIaILC6oqKCBFhAkFRBEsSyBimxWNpHaICgBhARU1AhRqEZDQMoU5e079/z/OedPLk3Ih0g3 OjQimlNHqMIUlFRc0/rb5HX0RrJyU1OKM25prZbg4bupCD/Jfkzit9OfSJxv7CbxG8skhbOe 6SmcMXxTjE2mCgkuGfpOYv1oH4l7DLkUnrpuRDjb1CDC5cYhCR64UELh7MzP1B4HVl96hWIH ++opdvhqm4it1J1nn0zUitjmiXoRm15Vitgp/cqD9GGpbxAXFhrLqTfuDpSGdGrLJFFF0jON pm6UiLLoNGRHA7MNxscqqTQkpeVMCYKp1lkkFNMIbnXVkEIxhSD/dz9atMxYLDZLMYJL1wqp f5bRvFSxVUUxfp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YrMIqEpMWXUGLM4rYCHRdG8DM8QKeYnVGw6A2ZwClhJf9s0HqxcC qpn7GGIbr4CgxMmZT4DiHEAL1CXWzxMCCTMDtTZvnc08gVFwFpKqWQhVs5BULWBkXsUoklpa nJueW2yoV5yYW1yal66XnJ+7iREYxduO/dy8g/HSxuBDjAIcjEo8vArlzbFCrIllxZW5hxgl OJiVRHjnmDbFCvGmJFZWpRblxxeV5qQWH2I0BXptIrOUaHI+MMHklcQbmhqaW1gamhubG5tZ KInzdggcjBESSE8sSc1OTS1ILYLpY+LglGpg1LssfnWhUoz5Q8sc08aHz4Q7ZYvNjl2VOXis 18VmearqjTVZ7UVhNVvVXprd7AtvcqrozdljVfVX7kvXWvPOU/Hvt32XL/OXE3E3+LwpIlzA frmTq4iGviavT7Fesv/GhUGuPywNJnYImvFVFR+/4LLq/udJ6/TX7vy/mHFmQuJrJtX5R9mV WIozEg21mIuKEwEVJ1JQ+AIAAA== X-CMS-MailID: 20190919142323eucas1p2fc73a765389432f880fa28945fd28975 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190919142323eucas1p2fc73a765389432f880fa28945fd28975 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190919142323eucas1p2fc73a765389432f880fa28945fd28975 References: <20190919142236.4071-1-a.swigon@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Artur Świgoń 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 f85bed241631..60ad4319fd80 100644 --- a/drivers/devfreq/exynos-bus.c +++ b/drivers/devfreq/exynos-bus.c @@ -420,19 +420,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