Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3946735ybl; Mon, 9 Dec 2019 02:52:02 -0800 (PST) X-Google-Smtp-Source: APXvYqzt71ZL7Iiu/7lMGzzmkamGBAx9Vcn2iQxgp4rZpS/BFRuigDBW/AVNCun2aou1qU3KKWNx X-Received: by 2002:a05:6808:258:: with SMTP id m24mr22044980oie.101.1575888722240; Mon, 09 Dec 2019 02:52:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575888722; cv=none; d=google.com; s=arc-20160816; b=vfXmzBkcGQxSFXO9fp8/NvebZnwBuE8pfHDQJycFg23h3VugXxOG0snOPxtzoZ8ZgZ 7nBZERL1uuqpyh8CbMMBEYHfl1qHRmffJV+ag45cgA4olL3tpyViX6pZ76ZXi2Mogzcq /r9SAOFiv7gk3b7FiTYQcsN41f4o7LGyeiTJNRMLAjstD3A3XKwA+oNOVIiBfW0aRPF+ 8vBWiQDAyi38z4iszCLo2RIB2DjBj1J2GOOufjMmwgNR7q+bPlJTlfRcIjwhPlZk3Vbf rNE5dVAQD6zuOFhUdSOZcLt1BkB0Becstv9WWvulqdAKclmkCo5Ee6kXG1wMI5EIfz0i 4mVw== 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:message-id:date:subject:cc :to:from:dkim-signature:dkim-filter; bh=tu/3vAqg2eZBipuQKDMS6XZM950MbyTsGIPOEwI9Cxc=; b=tEmC164Eup7doHHHC5AiCO980cP8/U4uNCHiVTuX6IByzlhnf1GS2dJuNGaKH/WCC1 AlLOnrum3ywV7FcqzOi71RGQ7LwFvW5YjeIuxzbg3mEXa8OSYSFnpfaVFyu+Nfx63AjW +wxWvC3aJnGUs5kqeYmTFVpOTwTufsF/C3sJNtjFIr36WnZF416pIsOx41CN2ZNEUS6Q kQQl21m2sQUGopSCsC5o2xUxfEd88apYEvDwGpRoBjtkadh5d9jEVsN4HUA99586bAho 49i2sSPWDakrYpP2avzSTlzY1QOLz84TKS4TOUOhRlO2jEHeZcKqVkGnIsQzl1UgVMqr IAwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=WsXwm7n9; 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 j7si11557560otn.22.2019.12.09.02.51.49; Mon, 09 Dec 2019 02:52:02 -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=WsXwm7n9; 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 S1727572AbfLIKuv (ORCPT + 99 others); Mon, 9 Dec 2019 05:50:51 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:52478 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727347AbfLIKue (ORCPT ); Mon, 9 Dec 2019 05:50:34 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20191209105031euoutp01ab6e99cbed89ff780effea7838dc9ec2~erlxsSo5m3272832728euoutp01c for ; Mon, 9 Dec 2019 10:50:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20191209105031euoutp01ab6e99cbed89ff780effea7838dc9ec2~erlxsSo5m3272832728euoutp01c DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1575888631; bh=tu/3vAqg2eZBipuQKDMS6XZM950MbyTsGIPOEwI9Cxc=; h=From:To:Cc:Subject:Date:References:From; b=WsXwm7n9TRXZfiiPfqvIqBLdcvV4E+LkkamsKUL15QNtL1ABO1zpXukwd46n8ZQ71 CqxZu0sLRBKnAPn2ys58BN6H4tPOz0J64Gi/bGeOI/jPMy0W5/BPUid13+8mi+1DhE N1bqjEMSOw7lkOlWWblxIrfqCRwWodcxtExHKuoE= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20191209105031eucas1p27d021a0c350d9539165b612d26c6bce6~erlxazhQi1399213992eucas1p2J; Mon, 9 Dec 2019 10:50:31 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id A2.46.61286.7F62EED5; Mon, 9 Dec 2019 10:50:31 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20191209105030eucas1p11e28297118da5a1d9f3a8c955584a4bf~erlxDvwK00759507595eucas1p15; Mon, 9 Dec 2019 10:50:30 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20191209105030eusmtrp1a61aad405c47222845290cfa811b9435~erlxC9M7D2125621256eusmtrp1P; Mon, 9 Dec 2019 10:50:30 +0000 (GMT) X-AuditID: cbfec7f2-f0bff7000001ef66-2a-5dee26f7d5a7 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 4C.C7.07950.6F62EED5; Mon, 9 Dec 2019 10:50:30 +0000 (GMT) Received: from AMDC3555.digital.local (unknown [106.120.51.67]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20191209105030eusmtip19583cc7dad07d17a1c8d1aa87ffc5a04~erlwRNiPp2957929579eusmtip1l; Mon, 9 Dec 2019 10:50:30 +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 0/4] devfreq: Clean up exynos-bus driver Date: Mon, 9 Dec 2019 11:48:58 +0100 Message-Id: <20191209104902.11904-1-a.swigon@samsung.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA01Sa0hTYRj229nZjqvJ5xR8UbOYZBdIk4q+SCK70H4G3dZl1cyDSU5lp+kM ymVpJt5aRLYiKi2XXVzLRAeZLm2p2VDJslgK2sVb5VTsXm7HLv+e73mf53kvfAwle0wHM4nJ B1ltsjpJLpIIqx99cS6ajPigWvykHpOei9mI3CmppMnz8Xc0MfYUC8kldwlNivqGKOJ0WsSk LWtYTMyuUZpY+7po0mm7ICJjBY2IlDjrBORWo0tMXh01i0jJ6QHRaqywVpwUKe6WZSrufKgR KAqrKpBizBq2kd4hiYlnkxLTWG3Uqr2S/S9HZ6UOztB3WX4gA3L75iGGAbwUPg8G5yFfRobN CPrGSR6STOFxBN2vDRT/GEPgGO4Ue1Qew/t6B80XyhG420rFfy32ZzdFHpUIx4LxTK+3EIiz EbQ7u71ZFG4RwPucLNqjCsArweQ2CT1YiOfCyKtJr1uKV0B9dhXi+82GG5Z6iuf9oflcv1dP TfHH7p33hgJ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s+xCjAwajE w6tg9TZWiDWxrLgy9xCjBAezkgjvkomvYoV4UxIrq1KL8uOLSnNSiw8xmgK9MJFZSjQ5H5gG 8kriDU0NzS0sDc2NzY3NLJTEeTsEDsYICaQnlqRmp6YWpBbB9DFxcEo1MGoufVIe1Mc44+/s xwq6U2P5efQ/r/r9Pur8kTJdHqmOjJJ9cRaP1n39xfzS4UXEczcXvt0394syLO5K76o9x7n/ zHlnXdnPicb+fYn32yQs1HN4Tz0zUng/U0RKdrqA1/eEryuq6vM2+u9I0RNPYDv/Y0p18nXF rTMWGutF67CW/3soGhhvrMRSnJFoqMVcVJwIAFyRxV7LAgAA X-CMS-MailID: 20191209105030eucas1p11e28297118da5a1d9f3a8c955584a4bf X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20191209105030eucas1p11e28297118da5a1d9f3a8c955584a4bf X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20191209105030eucas1p11e28297118da5a1d9f3a8c955584a4bf References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following patchset incorporates the first four patches from a bigger RFC[1]. The purpose of these patches is to improve readability of the code, with the main focus on the exynos_bus_probe() function. The original exynos_bus_probe() function has 13 local variables, over 140 lines of code, and multiple goto statements. Patches 01 and 02 from this series extract two mutually exclusive code paths into separate functions, exynos_bus_profile_init[_passive](). Furthermore, patch 03 reduces the number of goto statements by introducing an if-else construct. The last patch adds other minor improvements, including cleaning up header includes, variables, and return paths. This also applies to functions introduced by patches 01 & 02 -- to avoid moving and changing code in the same patch. --- Changes since RFCv2[1] (patches 01..04): * Rebase on next-20191209. * Drop some unnecessary changes, cf. [2]. --- Artur Świgoń Samsung R&D Institute Poland Samsung Electronics --- References: [1] https://patchwork.kernel.org/cover/11152595/ [2] https://patchwork.kernel.org/patch/11152637/ Artur Świgoń (4): devfreq: exynos-bus: Extract exynos_bus_profile_init() devfreq: exynos-bus: Extract exynos_bus_profile_init_passive() devfreq: exynos-bus: Change goto-based logic to if-else logic devfreq: exynos-bus: Clean up code drivers/devfreq/exynos-bus.c | 156 +++++++++++++++++++---------------- 1 file changed, 84 insertions(+), 72 deletions(-) -- 2.17.1