From: Krzysztof Kozlowski <krzk@kernel.org>
To: Jinjie Ruan <ruanjinjie@huawei.com>,
nm@ti.com, ssantosh@kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, jic23@kernel.org
Subject: Re: [PATCH -next v2 4/4] soc: ti: knav_qmss_queue: Simplify with dev_err_probe()
Date: Sat, 31 Aug 2024 13:06:54 +0200 [thread overview]
Message-ID: <fe412e20-68fc-4112-8ac7-ce011393156f@kernel.org> (raw)
In-Reply-To: <20240830063228.3519385-5-ruanjinjie@huawei.com>
On 30/08/2024 08:32, Jinjie Ruan wrote:
> Use the dev_err_probe() helper to simplify error handling
> during probe.
>
> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
> ---
> v2:
> - Split into 2 patches.
> - Rebased the newest next.
> - Update the commit message.
> ---
> drivers/soc/ti/knav_qmss_queue.c | 33 +++++++++++---------------------
> 1 file changed, 11 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c
> index 02983f8ba1b6..d583a86028af 100644
> --- a/drivers/soc/ti/knav_qmss_queue.c
> +++ b/drivers/soc/ti/knav_qmss_queue.c
> @@ -1091,10 +1091,8 @@ static int knav_queue_setup_regions(struct knav_device *kdev,
>
> for_each_child_of_node_scoped(regions, child) {
> region = devm_kzalloc(dev, sizeof(*region), GFP_KERNEL);
> - if (!region) {
> - dev_err(dev, "out of memory allocating region\n");
> - return -ENOMEM;
> - }
> + if (!region)
> + return dev_err_probe(dev, -ENOMEM, "out of memory allocating region\n");
This as well does not make any sense. Please read carefully coding style
and then use coccinelle on all your contributions.
You send useless changes without understanding how this works. The tools
would help you, but it seems you do not want to use them.
Best regards,
Krzysztof
prev parent reply other threads:[~2024-08-31 11:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-30 6:32 [PATCH -next v2 0/4] soc: ti: Simplify with scoped for each OF child loop and dev_err_probe() Jinjie Ruan
2024-08-30 6:32 ` [PATCH -next v2 1/4] soc: ti: knav_dma: Simplify with scoped for each OF child loop Jinjie Ruan
2024-08-30 6:32 ` [PATCH -next v2 2/4] soc: ti: knav_dma: Use dev_err_probe() to simplfy code Jinjie Ruan
2024-08-30 10:31 ` Nishanth Menon
2024-08-30 10:36 ` Krzysztof Kozlowski
2024-08-30 10:42 ` Krzysztof Kozlowski
2024-08-31 1:59 ` Jinjie Ruan
2024-08-31 5:21 ` Krzysztof Kozlowski
2024-08-31 6:27 ` Jinjie Ruan
2024-08-31 18:53 ` Andrew Lunn
2024-09-03 13:40 ` Uwe Kleine-König
2024-08-30 6:32 ` [PATCH -next v2 3/4] soc: ti: knav_qmss_queue: Simplify with scoped for each OF child loop Jinjie Ruan
2024-08-30 6:32 ` [PATCH -next v2 4/4] soc: ti: knav_qmss_queue: Simplify with dev_err_probe() Jinjie Ruan
2024-08-30 10:38 ` Nishanth Menon
2024-08-31 11:06 ` Krzysztof Kozlowski [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=fe412e20-68fc-4112-8ac7-ce011393156f@kernel.org \
--to=krzk@kernel.org \
--cc=jic23@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nm@ti.com \
--cc=ruanjinjie@huawei.com \
--cc=ssantosh@kernel.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;
as well as URLs for NNTP newsgroup(s).