From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: "Minjie Du" <duminjie@vivo.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Daniel Lezcano" <daniel.lezcano@linaro.org>,
"Amit Kucheria" <amitk@kernel.org>,
"Zhang Rui" <rui.zhang@intel.com>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"Nícolas F. R. A. Prado" <nfraprado@collabora.com>,
"Alexandre Mergnat" <amergnat@baylibre.com>,
"Chen-Yu Tsai" <wenst@chromium.org>,
"Balsam CHIHI" <bchihi@baylibre.com>,
"open list:THERMAL" <linux-pm@vger.kernel.org>,
"open list" <linux-kernel@vger.kernel.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-arm-kernel@lists.infradead.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@lists.infradead.org>
Cc: opensource.kernel@vivo.com
Subject: Re: [PATCH v1] thermal/drivers/mediatek/lvts_thermal: remove extra error check in lvts_debugfs_init()
Date: Thu, 21 Sep 2023 09:59:56 +0200 [thread overview]
Message-ID: <83993f62-76d7-78ec-4711-b65e95e3aed9@collabora.com> (raw)
In-Reply-To: <20230921075518.3016-1-duminjie@vivo.com>
Il 21/09/23 09:55, Minjie Du ha scritto:
> As per the comment above debugfs_create_dir(), it is not expected to
> return an error, so an extra error check is not needed.
> Drop the return check of debugfs_create_dir() in
> lvts_debugfs_init()
>
> Signed-off-by: Minjie Du <duminjie@vivo.com>
> ---
> drivers/thermal/mediatek/lvts_thermal.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
> index effd9b00a424..171ce25fddf5 100644
> --- a/drivers/thermal/mediatek/lvts_thermal.c
> +++ b/drivers/thermal/mediatek/lvts_thermal.c
> @@ -213,8 +213,6 @@ static int lvts_debugfs_init(struct device *dev, struct lvts_domain *lvts_td)
>
> sprintf(name, "controller%d", i);
> dentry = debugfs_create_dir(name, lvts_td->dom_dentry);
> - if (!dentry)
> - continue;
>
This is fine as it is: the `continue` is here in order to avoid allocating regset
if the debugfs dir couldn't be created.
NACK.
Regards,
Angelo
> regset = devm_kzalloc(dev, sizeof(*regset), GFP_KERNEL);
> if (!regset)
prev parent reply other threads:[~2023-09-21 18:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-21 7:55 Minjie Du
2023-09-21 7:59 ` AngeloGioacchino Del Regno [this message]
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=83993f62-76d7-78ec-4711-b65e95e3aed9@collabora.com \
--to=angelogioacchino.delregno@collabora.com \
--cc=amergnat@baylibre.com \
--cc=amitk@kernel.org \
--cc=bchihi@baylibre.com \
--cc=daniel.lezcano@linaro.org \
--cc=duminjie@vivo.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=nfraprado@collabora.com \
--cc=opensource.kernel@vivo.com \
--cc=p.zabel@pengutronix.de \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
--cc=wenst@chromium.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®