From: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> To: Eizan Miyamoto <eizan@google.com> Cc: linux-kernel@vger.kernel.org, wenst@chromium.org, houlong.wei@mediatek.com, yong.wu@mediatek.com, enric.balletbo@collabora.com, devicetree@vger.kernel.org, chunkuang.hu@kernel.org, Andrew-CT Chen <andrew-ct.chen@mediatek.com>, Matthias Brugger <matthias.bgg@gmail.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Minghsiu Tsai <minghsiu.tsai@mediatek.com>, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH v6 1/9] mtk-mdp: propagate errors from clock_on Date: Mon, 9 Aug 2021 09:42:56 +0200 [thread overview] Message-ID: <171db357-0d8a-6676-32dd-7c506708375c@collabora.com> (raw) In-Reply-To: <CAOak1e_xw84Q+ikAn7TEqie00Sbv4Qpaax==jZ5MJVfPP1pf0Q@mail.gmail.com> Hi, On 09.08.21 05:23, Eizan Miyamoto wrote: > Hi Dafna, thank you very much for spending time to review the patch, > your time spent is very much appreciated. > > On Thu, Aug 5, 2021 at 4:06 PM Dafna Hirschfeld > <dafna.hirschfeld@collabora.com> wrote: >>> +err_clk_prepare_enable: >>> + for (--i; i >= 0; i--) { >>> + if (IS_ERR(comp->clk[i])) >>> + continue; >>> + clk_disable_unprepare(comp->clk[i]); >>> } >>> + >>> + return status; >> >> There is an API function clk_bulk_prepare_enable to prepare and enable an array of clks >> so you can just use it. > > As per Enric's suggestion earlier in this email thread, are you OK > with me making this change in a follow-up patch, particularly since > the logic as it is was preserved from previous functionality? sure, I just give suggestions. A follow-up patch would be nice. > >>> -static void mtk_mdp_clock_on(struct mtk_mdp_dev *mdp) >>> +static int mtk_mdp_clock_on(struct mtk_mdp_dev *mdp) >>> { >>> - struct device *dev = &mdp->pdev->dev; >>> struct mtk_mdp_comp *comp_node; >>> + int status; >>> + struct device *dev = &mdp->pdev->dev; >>> + int err; >>> >>> - list_for_each_entry(comp_node, &mdp->comp_list, node) >>> - mtk_mdp_comp_clock_on(dev, comp_node); >>> + list_for_each_entry(comp_node, &mdp->comp_list, node) { >>> + err = mtk_mdp_comp_clock_on(dev, comp_node); >>> + if (err) { >>> + status = err; >> >> You can get rid of the new var 'status' and just return ret in case of error > > This seems like a nit (please let me know if you disagree), and it's > also cleaned up in a follow-on patch in the series ("don't > pm_run_time_get/put for master comp in clock_on"). Is making the > change you are suggesting here something that should require uploading > a new series version? Hi, no, I am fine with it. No need for new version. Thanks, Dafna > > Eizan >
next prev parent reply other threads:[~2021-08-09 7:43 UTC|newest] Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-02 12:12 [PATCH v6 0/9] Refactor MTK MDP driver into core/components Eizan Miyamoto 2021-08-02 12:12 ` [PATCH v6 1/9] mtk-mdp: propagate errors from clock_on Eizan Miyamoto 2021-08-03 10:26 ` Enric Balletbo Serra 2021-08-05 6:06 ` Dafna Hirschfeld 2021-08-09 3:23 ` Eizan Miyamoto 2021-08-09 7:42 ` Dafna Hirschfeld [this message] 2021-08-16 0:46 ` houlong wei 2021-08-02 12:12 ` [PATCH v6 2/9] mtk-mdp: add driver to probe mdp components Eizan Miyamoto 2021-08-03 10:26 ` Enric Balletbo Serra 2021-08-05 6:40 ` Dafna Hirschfeld 2021-08-09 3:23 ` Eizan Miyamoto 2021-08-09 7:53 ` Dafna Hirschfeld 2021-08-11 11:15 ` Eizan Miyamoto 2021-08-16 1:05 ` houlong wei 2021-08-02 12:12 ` [PATCH v6 3/9] mtk-mdp: use pm_runtime in MDP component driver Eizan Miyamoto 2021-08-03 10:26 ` Enric Balletbo Serra 2021-08-16 1:07 ` houlong wei 2021-08-02 12:12 ` [PATCH v6 4/9] media: mtk-mdp: don't pm_run_time_get/put for master comp in clock_on Eizan Miyamoto 2021-08-03 10:27 ` Enric Balletbo Serra 2021-08-16 1:10 ` houlong wei 2021-08-02 12:12 ` [PATCH v6 5/9] mtk-mdp: make mdp driver to be loadable by platform_device_register*() Eizan Miyamoto 2021-08-03 10:27 ` Enric Balletbo Serra 2021-08-16 1:15 ` houlong wei 2021-08-16 3:37 ` houlong wei 2021-08-02 12:12 ` [PATCH v6 6/9] soc: mediatek: mmsys: instantiate mdp virtual device from mmsys Eizan Miyamoto 2021-08-03 10:27 ` Enric Balletbo Serra 2021-08-16 1:18 ` houlong wei 2021-08-02 12:12 ` [PATCH v6 7/9] media: mtk-mdp: use mdp-rdma0 alias to point to MDP master Eizan Miyamoto 2021-08-03 10:27 ` Enric Balletbo Serra 2021-08-03 11:46 ` Eizan Miyamoto 2021-08-16 3:00 ` houlong wei 2021-08-16 4:52 ` houlong wei 2021-08-18 7:50 ` Eizan Miyamoto 2021-08-18 15:42 ` houlong wei 2021-08-18 7:43 ` Eizan Miyamoto 2021-08-18 15:34 ` houlong wei 2021-08-02 12:12 ` [PATCH v6 8/9] dts: mtk-mdp: remove mediatek,vpu property from primary MDP device Eizan Miyamoto 2021-08-03 10:27 ` Enric Balletbo Serra 2021-08-02 12:12 ` [PATCH v6 9/9] dt-bindings: mediatek: remove vpu requirement from mtk-mdp Eizan Miyamoto 2021-08-03 10:27 ` Enric Balletbo Serra 2021-08-06 21:47 ` Rob Herring 2021-08-03 10:29 ` [PATCH v6 0/9] Refactor MTK MDP driver into core/components Enric Balletbo Serra
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=171db357-0d8a-6676-32dd-7c506708375c@collabora.com \ --to=dafna.hirschfeld@collabora.com \ --cc=andrew-ct.chen@mediatek.com \ --cc=chunkuang.hu@kernel.org \ --cc=devicetree@vger.kernel.org \ --cc=eizan@google.com \ --cc=enric.balletbo@collabora.com \ --cc=houlong.wei@mediatek.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-media@vger.kernel.org \ --cc=linux-mediatek@lists.infradead.org \ --cc=matthias.bgg@gmail.com \ --cc=mchehab@kernel.org \ --cc=minghsiu.tsai@mediatek.com \ --cc=wenst@chromium.org \ --cc=yong.wu@mediatek.com \ --subject='Re: [PATCH v6 1/9] mtk-mdp: propagate errors from clock_on' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).