Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8826414ybi; Tue, 23 Jul 2019 16:08:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqx4TY438fBjhWrwl0Ux5TIPg8nJelbv4MuyrI5SEiUxuSNmC+dWccsrwS4tZMHpXph5yOQa X-Received: by 2002:a65:6081:: with SMTP id t1mr79520125pgu.9.1563923295209; Tue, 23 Jul 2019 16:08:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563923295; cv=none; d=google.com; s=arc-20160816; b=RRwKNXLA89RhJCqwAKVOhHPXbqyoIueqY0QES0uyqYIKw3EvwZ7qDAfqBt2J7+7qHw hCexkTj/th3lqhM37DfbIhuVQhtP2p7kbm8hOZSzNSQh1dH4pFW6NNsUHdI3p/JmGUBF FE9n+sKkjsLgatk9a8stmpV+9JrGJ6z5J+xKJFkL/sBSIhUTHjf99cigCBsj8yd2qeW6 jnf7eKiueVzOl5v2fSwkqXmq4+iH/WHmSLgcSHJ2UTSurMFONSVD6OgcYVe5ah+6IlFr FusNMVUKIQrQtiEsLLR9wvmNf99RbDucOrF2DIlRKI0Gm3zX4xOGD8AdP2J074x+XPzm 8SeQ== 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=acZs1C2PRXwgbejpkVZ0Vnfcq1LUt8CLhBHrsSuxE7M=; b=QOEUNQJJXLHK69oZx3smBIs+l+vI6YVm4wc9VJ/Q0KtFgQll/VVX7wh8ITgAwTWF+l HQoTUhVGC+QmHOPh6xVehGv5JPpa3NWK+SdPXAmSwLJ26EbJ5hY31qb9Ho7eMYm9h0hW UGwJYzSdMwxZegq1h59tRkY4Q/3pe3+7sQB6rGdVuD8+8d11PT08lxBcH1ZKsjEzoPnd f539xhPOipFNj9n/gXpQI8hiEWqS68gkr1Hvlhru9y5DRp3FQHpDppxQEKAzHH84hr5M LE7TkoeEdDyIwYIQ3toiAl4u5Sv0BoeXzp5Kgfn/B6EZCCxysWFOC7WFleubif/D1xbQ 2Yng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=bX7wFcfx; 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 f61si11720999plf.258.2019.07.23.16.07.59; Tue, 23 Jul 2019 16:08:15 -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=bX7wFcfx; 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 S2389826AbfGWMVL (ORCPT + 99 others); Tue, 23 Jul 2019 08:21:11 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:38689 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389704AbfGWMU1 (ORCPT ); Tue, 23 Jul 2019 08:20:27 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190723122025euoutp014b38e08f6185265bdeeeb136391681ee~0CJl9_5vo2875728757euoutp01U for ; Tue, 23 Jul 2019 12:20:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190723122025euoutp014b38e08f6185265bdeeeb136391681ee~0CJl9_5vo2875728757euoutp01U DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1563884425; bh=acZs1C2PRXwgbejpkVZ0Vnfcq1LUt8CLhBHrsSuxE7M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bX7wFcfx5NUSBYQhVLs/QbIJFXdyxKVOYVo4VWrMZmJtYiEGHc024I31M0hi56c9b scmOX1QseG5IPTlABKDVvx3WavUfZRYNACLiippBPKXDo/mVnYKCiVqbsMYbfcGCb5 Uu7LCBqDbSj45xVpQ2MS60KmrSXlIvJxA+a6E+b4= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190723122024eucas1p26984f8d4bb6c97f37d8fc6535c0a4820~0CJlDQ9ta1104811048eucas1p2X; Tue, 23 Jul 2019 12:20:24 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 51.5B.04298.88BF63D5; Tue, 23 Jul 2019 13:20:24 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190723122024eucas1p1ff060d072132bfbc8a8a1d10fa1f90f8~0CJkXbnIu0081400814eucas1p1U; Tue, 23 Jul 2019 12:20:24 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20190723122024eusmtrp18f9c48318e32cff566cc8092b45ff466~0CJkWtNwe2491824918eusmtrp1V; Tue, 23 Jul 2019 12:20:24 +0000 (GMT) X-AuditID: cbfec7f2-f2dff700000010ca-7a-5d36fb888d8f Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 19.41.04146.88BF63D5; Tue, 23 Jul 2019 13:20:24 +0100 (BST) Received: from AMDC3555.DIGITAL.local (unknown [106.120.51.67]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20190723122023eusmtip253ad15b0f5b4c58cad1e29511fa48b91~0CJjqaCxF1612616126eusmtip2J; Tue, 23 Jul 2019 12:20:23 +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: krzk@kernel.org, cw00.choi@samsung.com, myungjoo.ham@samsung.com, inki.dae@samsung.com, sw0312.kim@samsung.com, georgi.djakov@linaro.org, m.szyprowski@samsung.com Subject: [RFC PATCH 03/11] devfreq: exynos-bus: Change goto-based logic to if-else logic Date: Tue, 23 Jul 2019 14:20:08 +0200 Message-Id: <20190723122016.30279-4-a.swigon@partner.samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190723122016.30279-1-a.swigon@partner.samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA01Sa0hTYRj281x2Zi6P0/LFwmggqOCNTA9lF0Nh0h/7UeRMaulhijptx0tq kGXZNCsvkWY3kVCbeGleUNOotWZhOXRlkqmBhTdMzUuUWG0eLf89z/s8z/e8L3wUJjYSzlSs MplVKeXxEtIGbzH87PFUL/tH+rRNeDI6Q7OAeVxaTzAfFsYI5oG+h2DeLc6QTEmnlmSKRgpw xmhsEDDa0X6CMbXfJZn5a3rElBqfWjO1+iEBM3ihmmRKiyfIg3ZSrSaXlH7q7yClI1e7rKWN D89Ln3/rsJZeb9Ig6bzWJUwgswmMZuNjU1mV9/5TNjF1tWN40tyms+//dGJZqEKYh4QU0H4w XdUgyEM2lJiuRvCmaArxZAHByPIzjCfzCHpKpsj1yOyrFsKCxXQVArXW5V+ic+4RsggkHQr5 ha2ERXCk9QiKy2dwC8FojZn8aFl1OdAyGB6tWsU47Qqaga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08IJMwM1Nq8dTbzBEbBWUiqZiFUzUJStYCReRWjSGppcW56brGhXnFibnFpXrpe cn7uJkZgnG479nPzDsZLG4MPMQpwMCrx8G7YYxorxJpYVlyZe4hRgoNZSYQ3sMEsVog3JbGy KrUoP76oNCe1+BCjKdBrE5mlRJPzgSkkryTe0NTQ3MLS0NzY3NjMQkmct0PgYIyQQHpiSWp2 ampBahFMHxMHp1QD40J270zhP5F3Ih6rqEmlTFN+d1r/W96jebfNpZyPf/45l2neRx67t76H 2fIez09cE9IVFKHiPvHtC9MJJV9snt+Oy/TfwHaozmzy7C0bLybzf2Ao+fayZvGGORzamXkT r08K1XsZ93Vmw/vAeCs9rb7sjOvf7kyfJvl6U+Y2g1ua70Uuh76/FaLEUpyRaKjFXFScCACJ jdHh6QIAAA== X-CMS-MailID: 20190723122024eucas1p1ff060d072132bfbc8a8a1d10fa1f90f8 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190723122024eucas1p1ff060d072132bfbc8a8a1d10fa1f90f8 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190723122024eucas1p1ff060d072132bfbc8a8a1d10fa1f90f8 References: <20190723122016.30279-1-a.swigon@partner.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 | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c index cf6f6cbd0f55..4bb83b945bf7 100644 --- a/drivers/devfreq/exynos-bus.c +++ b/drivers/devfreq/exynos-bus.c @@ -505,25 +505,19 @@ static int exynos_bus_probe(struct platform_device *pdev) node = of_parse_phandle(dev->of_node, "devfreq", 0); if (node) { of_node_put(node); - goto passive; + ret = exynos_bus_profile_init_passive(bus, profile); + if (ret < 0) + goto err; } else { ret = exynos_bus_parent_parse_of(np, bus); + if (ret < 0) + goto err; + + ret = exynos_bus_profile_init(bus, profile); + if (ret < 0) + goto err; } - if (ret < 0) - goto err; - - 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