Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp2550992ybh; Mon, 5 Aug 2019 02:57:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqyjn879qC8dv6ATyS6iLuxZAzeSv3/cdOhoAAderxhFHMxhLmMqIZPqafXIvlkzJivrnKgx X-Received: by 2002:a17:90a:3ae8:: with SMTP id b95mr16920125pjc.68.1564999042122; Mon, 05 Aug 2019 02:57:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564999042; cv=none; d=google.com; s=arc-20160816; b=qf3RSmOS8ocNV/f9uxZp+QQSAFSXAnyqN4EE2PLw/G4kHOTESMMFz28dma5CLcSmRv KRxEkq4D42womhexmjusC0i/JvLlwnwfNyP/9KrxViQNDoJeEUgbjWufXQBcHxMU0QN8 akj8El3XujyBeSoky1JqqToRw/iyHoS87YD1UwzA5M0y+nxDhOv/Xmw2UI03IYt0YQ7E LIg+4pyHb1J87p+TG4anFzn0xVxlqXfhmqi3dTAmJI3f/QQRQWjUxmKnYyCYhCJgaNrm jx4GfW6onYxz1RBLaaKRj0jpKagwQ7sx9R5+D/VM18r/cFcO7wKSVsw//wOP6hZLY/WS Jwsg== 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:in-reply-to:references:mime-version :dkim-signature; bh=Wrcc8/s669Qv/ko2DMLUxTve65myAHNFRJkNdDmhmSQ=; b=LA0peRAqeY85aVuCS9Ot6m8YpFNvGKwxQzb5+zB9B2pmUcvEMCCLU+53heayW7F1Ye 1EKQxOGMNrglej2RJg9pwsT23Ipb8FFx3QhNB9dQTE4qCSDKCr6K/fKX5OiWjDx3N4SR X6tzx51r3vA6ze8dGpZmiToJenTf/OImxxVpKg7VImkOiZG3xI032KkDxI5pbt3kuWcJ KQ/3B2NA4nsqdrH5UxmjdJ8aRMy8P5jP0S9WKAQfedcoTk2TuYjCUigd5YP9jFtqmpdq tChaUNlj/E09IzmF0QA4efoEv9djrFp0glMPNoMtjQspwqSwHx4VgDWLWOIrLLUyJPUC 6BtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kCUfwhYA; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t189si46289394pgt.428.2019.08.05.02.57.06; Mon, 05 Aug 2019 02:57:22 -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=@kernel.org header.s=default header.b=kCUfwhYA; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728175AbfHEJ41 (ORCPT + 99 others); Mon, 5 Aug 2019 05:56:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:43686 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727158AbfHEJ40 (ORCPT ); Mon, 5 Aug 2019 05:56:26 -0400 Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5469C217D9; Mon, 5 Aug 2019 09:56:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564998985; bh=c/eJMd7h8iMY7g3oBcO09Ax6tNi/85j/LkvMdm+2LJ0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=kCUfwhYAxdatWJQsoVRP5kF25HVcRa1aMqKUgUJMss9brgbECYUQmepSWt2tGm/RQ umRuOgvoPUKkt+A7Papljrijh6QQVCW0gkYfOsbJ6bM3ez1Rp3W8VOVzCufeKWykP2 SI9yu/NkrsRLYzfI5dB6G+qzLhW/6hIfeGIf620k= Received: by mail-lj1-f171.google.com with SMTP id h10so7308819ljg.0; Mon, 05 Aug 2019 02:56:25 -0700 (PDT) X-Gm-Message-State: APjAAAXzFIpCWS5XBf77VnlywWzZUbrTNQNiwyN3HVuC4+prFDF7C8xX DaepV4NDFhOVqOD6QA0HpqV/hsw07nnrY/d3cd0= X-Received: by 2002:a2e:8155:: with SMTP id t21mr21170060ljg.80.1564998983563; Mon, 05 Aug 2019 02:56:23 -0700 (PDT) MIME-Version: 1.0 References: <20190723122016.30279-1-a.swigon@partner.samsung.com> <20190723122016.30279-2-a.swigon@partner.samsung.com> <20190724190741.GD14346@kozik-lap> In-Reply-To: From: Krzysztof Kozlowski Date: Mon, 5 Aug 2019 11:56:12 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 01/11] devfreq: exynos-bus: Extract exynos_bus_profile_init() To: =?UTF-8?B?QXJ0dXIgxZp3aWdvxYQ=?= Cc: 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, Chanwoo Choi , myungjoo.ham@samsung.com, Inki Dae , Seung Woo Kim , georgi.djakov@linaro.org, Marek Szyprowski , =?UTF-8?B?QmFydMWCb21pZWogxbtvxYJuaWVya2lld2ljeg==?= 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 On Wed, 31 Jul 2019 at 15:00, Artur =C5=9Awigo=C5=84 wrote: > > Hi, > > On Wed, 2019-07-24 at 21:07 +0200, Krzysztof Kozlowski wrote: > > On Tue, Jul 23, 2019 at 02:20:06PM +0200, Artur =C5=9Awigo=C5=84 wrote: > > > This patch adds a new static function, exynos_bus_profile_init(), ext= racted > > > from exynos_bus_probe(). > > > > > > Signed-off-by: Artur =C5=9Awigo=C5=84 > > > --- > > > drivers/devfreq/exynos-bus.c | 106 ++++++++++++++++++++-------------= -- > > > 1 file changed, 60 insertions(+), 46 deletions(-) > > > > > > diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bu= s.c > > > index d9f377912c10..d8f1efaf2d49 100644 > > > --- a/drivers/devfreq/exynos-bus.c > > > +++ b/drivers/devfreq/exynos-bus.c > > > @@ -372,12 +372,69 @@ static int exynos_bus_parse_of(struct device_no= de *np, > > > return ret; > > > } > > > > > > +static int exynos_bus_profile_init(struct exynos_bus *bus, > > > + struct devfreq_dev_profile *profile) > > > +{ > > > + struct device *dev =3D bus->dev; > > > + struct devfreq_simple_ondemand_data *ondemand_data; > > > + int ret; > > > + > > > + /* Initialize the struct profile and governor data for parent dev= ice */ > > > + profile->polling_ms =3D 50; > > > + profile->target =3D exynos_bus_target; > > > + profile->get_dev_status =3D exynos_bus_get_dev_status; > > > + profile->exit =3D exynos_bus_exit; > > > + > > > + ondemand_data =3D devm_kzalloc(dev, sizeof(*ondemand_data), GFP_K= ERNEL); > > > + if (!ondemand_data) { > > > + ret =3D -ENOMEM; > > > + goto err; > > > > Just return proper error code. Less lines, obvious code since you do no= t > > have any cleanup in error path. > > I was advised to avoid modifying code being moved (in one patch). I do ma= ke > changes in these places in patch 04/11, i.e. change the original label 'e= rr' to > 'out'. What's your opinion on making the proposed changes to patches 01 a= nd 02 > (s/goto err/return ret/) in patch 04 instead? Yes, you're right. I also prefer not to touch moved code. Best regards, Krzysztof