From: Krzysztof Kozlowski <krzk@kernel.org>
To: Yu-Chun Lin <eleanor.lin@realtek.com>
Cc: mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de,
cylee12@realtek.com, jyanchou@realtek.com,
devicetree@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org, james.tai@realtek.com,
cy.huang@realtek.com, stanley_chang@realtek.com
Subject: Re: [PATCH 2/9] clk: realtek: Add basic reset support
Date: Tue, 30 Dec 2025 13:20:06 +0100 [thread overview]
Message-ID: <20251230-impetuous-quizzical-locust-daffda@quoll> (raw)
In-Reply-To: <20251229075313.27254-3-eleanor.lin@realtek.com>
On Mon, Dec 29, 2025 at 03:53:06PM +0800, Yu-Chun Lin wrote:
> +
> +int rtk_reset_controller_add(struct device *dev,
> + struct rtk_reset_initdata *initdata)
> +{
> + struct rtk_reset_data *data;
> +
> + data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
> +
What sort of coding style do you use? There is absolutely never a blank
line between kzalloc and the if().
> + if (!data)
> + return -ENOMEM;
> +
> + data->dev = dev;
> + data->num_banks = initdata->num_banks;
> + data->banks = initdata->banks;
> + data->regmap = initdata->regmap;
> + data->rcdev.owner = THIS_MODULE;
THIS_MODULE? so which module is exactly the owner - clk-rtk.ko or actual
driver?
This feels buggy, but I did not check your Makefile.
> + data->rcdev.ops = &rtk_reset_ops;
> + data->rcdev.dev = dev;
> + data->rcdev.of_node = dev->of_node;
> + data->rcdev.nr_resets = initdata->num_banks * 0x100;
> + data->rcdev.of_xlate = rtk_of_reset_xlate;
> + data->rcdev.of_reset_n_cells = 1;
> +
> + return devm_reset_controller_register(dev, &data->rcdev);
> +}
> +EXPORT_SYMBOL_GPL(rtk_reset_controller_add);
> +
> diff --git a/drivers/clk/realtek/reset.h b/drivers/clk/realtek/reset.h
> new file mode 100644
> index 000000000000..cd446b098429
> --- /dev/null
> +++ b/drivers/clk/realtek/reset.h
> @@ -0,0 +1,36 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +/*
> + * Copyright (C) 2019 Realtek Semiconductor Corporation
Ah, so that's why you sent probe() from ~10 years ago...
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-12-30 12:20 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-29 7:53 [PATCH 0/9] clk: realtek: Add RTD1625 Clock Support Yu-Chun Lin
2025-12-29 7:53 ` [PATCH 1/9] dt-bindings: clock: Add Realtek RTD1625 Clock & Reset Controller Yu-Chun Lin
2025-12-30 12:11 ` Krzysztof Kozlowski
2026-01-02 5:46 ` Yu-Chun Lin [林祐君]
2025-12-29 7:53 ` [PATCH 2/9] clk: realtek: Add basic reset support Yu-Chun Lin
2025-12-30 12:20 ` Krzysztof Kozlowski [this message]
2026-01-02 5:56 ` Yu-Chun Lin [林祐君]
2025-12-29 7:53 ` [PATCH 3/9] clk: realtek: Introduce a common probe() Yu-Chun Lin
2025-12-30 12:17 ` Krzysztof Kozlowski
2025-12-30 18:03 ` kernel test robot
2025-12-30 18:14 ` kernel test robot
2025-12-29 7:53 ` [PATCH 4/9] clk: realtek: Add support for phase locked loops (PLLs) Yu-Chun Lin
2025-12-30 20:18 ` kernel test robot
2025-12-29 7:53 ` [PATCH 5/9] clk: realtek: Add support for gate clock Yu-Chun Lin
2025-12-29 7:53 ` [PATCH 6/9] clk: realtek: Add support for mux clock Yu-Chun Lin
2026-01-05 12:04 ` Dan Carpenter
2025-12-29 7:53 ` [PATCH 7/9] clk: realtek: Add support for MMC-tuned PLL clocks Yu-Chun Lin
2025-12-29 7:53 ` [PATCH 8/9] clk: realtek: Add RTD1625-CRT clock controller driver Yu-Chun Lin
2025-12-30 12:15 ` Krzysztof Kozlowski
2025-12-29 7:53 ` [PATCH 9/9] clk: realtek: Add RTD1625-ISO " Yu-Chun Lin
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=20251230-impetuous-quizzical-locust-daffda@quoll \
--to=krzk@kernel.org \
--cc=conor+dt@kernel.org \
--cc=cy.huang@realtek.com \
--cc=cylee12@realtek.com \
--cc=devicetree@vger.kernel.org \
--cc=eleanor.lin@realtek.com \
--cc=james.tai@realtek.com \
--cc=jyanchou@realtek.com \
--cc=krzk+dt@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=stanley_chang@realtek.com \
/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