Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10917803ybi; Thu, 25 Jul 2019 07:04:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqxXUWazFwLeMFSxQkLv5rR5o/DvPcavLU22j9tOD1aGFccbSZw3/AINee5tmfjT6xeR7mMg X-Received: by 2002:a17:90a:1785:: with SMTP id q5mr92273822pja.106.1564063453439; Thu, 25 Jul 2019 07:04:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564063453; cv=none; d=google.com; s=arc-20160816; b=BPgcQojc7qiv1XBb0OLVk8DaJz2LDskFr3R5MBr6BHxDqfhS6VMvYJGxh7E0SVkIO+ J8qBoRj01RVrZxkNOTEUC0DJyfBhfJhZ6yHl26Iy3Gzg3V1CixYq+/4pL9M0R4ymlrMb uPaq0CYhCuWC78BsRchiRHJ21sCdvW0kulWb1XOmSmqNsMCOS9BzdQQ7ZQIW4d6TT9uu tQqMDZqtf0gYgKYwpZEo+0TfBFjzc1s3m2tpHXWypD5jmKw8tGwIZpOvem6wAqlqf83b F58e27+YreD7QS8FUYIoYNI5chXVZKjGNEh2LcqgWFzirlRHcWSHEz4g5AyoH+WitT6C 4Egg== 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:cc:to:subject :message-id:date:from:reply-to:in-reply-to:references:mime-version :dkim-signature; bh=xM6KrE+i6GTD27vbYKn5cqDmPVp4Sc2Sjq00mSvmh2U=; b=ku5j+VVmnSAs3990RZdyyTKEwI8wYWbjwzGqSneWiLQOve/iKbj3MdDSJky7ooLfCi CpR3+1Z31CBc3q6G9wSnhCe9CRv2oBzxYcFMjIuMauY2Z7UeWLqChGZFLBha+OIkamOZ 0WziGdo1tuFIbtH2ofSt83EjKRZBFrYByCKRlpHpSaECzSpcn3hAiaBehprsFdvliQTk QpxfEyzrTwbMxj+pbuwK6Ymf7m34pWU4HarhERDqc8eJUbDr+4hl7M26micYEgyrlgeh 8t4WJs84suSXvZewgqo2+ePCcuVEDNqGQJhmcWeVeWpcujGxvSmjDTj6hiAErSxlb/EK 5TKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XXpK0Ruy; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si16818854pli.12.2019.07.25.07.03.58; Thu, 25 Jul 2019 07:04:13 -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=@gmail.com header.s=20161025 header.b=XXpK0Ruy; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389628AbfGYM52 (ORCPT + 99 others); Thu, 25 Jul 2019 08:57:28 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:37839 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387901AbfGYM52 (ORCPT ); Thu, 25 Jul 2019 08:57:28 -0400 Received: by mail-lf1-f66.google.com with SMTP id c9so34421524lfh.4; Thu, 25 Jul 2019 05:57:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=xM6KrE+i6GTD27vbYKn5cqDmPVp4Sc2Sjq00mSvmh2U=; b=XXpK0Ruyln89lB3FtPJQlFIHzkNrM+OFf+i4hux201WJ2ZQ8HIQVoKrEtlgpvzYKl8 oMsc2mWrk11bd2G5oHFfJO1z+s0WY7Dl0onn1RinPh3VwNrcKIGFzJOq9Qe6lhWUu3O7 Q//XStbzPtGgslB+AyFj7C9tNlGfnBI+gRo9FIMgyx0jEwMeLn2x4F8wKA6r5N3IX9ub wCJNweqMuL6PuOwrtsjlvREok7Xhb1Sh6VxWtKC+zMYOCm8oUvl5uU6BQ/NfWo+uDRP7 UjdD/7nLSbX5rRAp8Cy+mf/717jZ4SR7ewR9CiHXWoYJNISCHqvUACA5Bth2MyT6Bu1t 9G8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=xM6KrE+i6GTD27vbYKn5cqDmPVp4Sc2Sjq00mSvmh2U=; b=XxTcQPNy++k2IO6C3G3CX+gEGk1N8U/xxazqUq49qorA+iMWQc5rKPiPK1cgESQ+ZM kLQFVtwyP68qwJ/f/DEjqUzaPooFc7nVD78L+JqfYCQEK+Kqqdv0moF/vSxU8K5Uy4Kn HxHxA1NFrjDUGMnl+XGYR25bHRyOcOIfwmCoNVVmXpqZiW9HN5XADNiVkvy+/ZZ8WVSZ 4PiM97tJnHNt4EI4p9P+Gk5/MMXAjrSYLJFIcrxTe7Y3vx+IY/TD/cJK1QL4z/HjKKNt fTokDp41UpypVFLKWKAbkFDUPLbKibODRdcVgSycfIPVQEFK7INH3kn+bUKFV+CHJtGq RvTw== X-Gm-Message-State: APjAAAX+x8tKlm9QyLFv4pNS9rVbz0UXpF+LdJYvp0oMwREua9lRS9mH H+fPMirdox3+JTC1lAT5jwj+gDBLJqwde/YCsmo= X-Received: by 2002:ac2:42ca:: with SMTP id n10mr23728905lfl.121.1564059445077; Thu, 25 Jul 2019 05:57:25 -0700 (PDT) MIME-Version: 1.0 References: <20190723122016.30279-1-a.swigon@partner.samsung.com> <20190723122016.30279-4-a.swigon@partner.samsung.com> In-Reply-To: <20190723122016.30279-4-a.swigon@partner.samsung.com> Reply-To: cwchoi00@gmail.com From: Chanwoo Choi Date: Thu, 25 Jul 2019 21:56:48 +0900 Message-ID: Subject: Re: [RFC PATCH 03/11] devfreq: exynos-bus: Change goto-based logic to if-else logic To: =?UTF-8?B?QXJ0dXIgxZp3aWdvxYQ=?= Cc: devicetree , linux-arm-kernel , linux-samsung-soc , linux-kernel , Linux PM list , dri-devel , Krzysztof Kozlowski , Chanwoo Choi , MyungJoo Ham , inki.dae@samsung.com, Seung-Woo Kim , georgi.djakov@linaro.org, Marek Szyprowski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2019=EB=85=84 7=EC=9B=94 24=EC=9D=BC (=EC=88=98) =EC=98=A4=EC=A0=84 8:08, A= rtur =C5=9Awigo=C5=84 =EB=8B=98=EC=9D=B4 =EC= =9E=91=EC=84=B1: > > 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 =C5=9Awigo=C5=84 > --- > 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 =3D of_parse_phandle(dev->of_node, "devfreq", 0); > if (node) { > of_node_put(node); > - goto passive; > + ret =3D exynos_bus_profile_init_passive(bus, profile); > + if (ret < 0) > + goto err; > } else { > ret =3D exynos_bus_parent_parse_of(np, bus); > + if (ret < 0) > + goto err; > + > + ret =3D exynos_bus_profile_init(bus, profile); > + if (ret < 0) > + goto err; > } > > - if (ret < 0) > - goto err; > - > - ret =3D exynos_bus_profile_init(bus, profile); > - if (ret < 0) > - goto err; > - > - goto out; > -passive: > - ret =3D exynos_bus_profile_init_passive(bus, profile); > - if (ret < 0) > - goto err; > - > -out: > max_state =3D bus->devfreq->profile->max_state; > min_freq =3D (bus->devfreq->profile->freq_table[0] / 1000); > max_freq =3D (bus->devfreq->profile->freq_table[max_state - 1] / = 1000); > -- > 2.17.1 > It seems more simple than before. Instead, please merge patch1/2/3 to one patch. and drop the patch4. --=20 Best Regards, Chanwoo Choi