Re: Re: [PATCH v3] i2c: ocores: use devm_ managed clks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----原始邮件-----
> 发件人: "Andrew Lunn" <andrew@xxxxxxx>
> 发送时间: 2023-04-25 19:57:26 (星期二)
> 收件人: "Wang Zhang" <silver_code@xxxxxxxxxxx>
> 抄送: "Peter Korsgaard" <peter@xxxxxxxxxxxxx>, hust-os-kernel-patches@xxxxxxxxxxxxxxxx, linux-i2c@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
> 主题: Re: [PATCH v3] i2c: ocores: use devm_ managed clks
> 
> On Sat, Apr 22, 2023 at 08:32:53PM +0800, Wang Zhang wrote:
> > If any wrong occurs in ocores_i2c_of_probe, the i2c->clk needs to be
> > released. But the function returns directly in line 701 without freeing
> > the clock. Even though we can fix it by freeing the clock manually if
> > platform_get_irq_optional fails, it may not be following the best practice.
> > The original code for this driver contains if (IS_ERR()) checks
> > throughout, explicitly allowing the driver to continue loading even if
> > devm_clk_get() fails.
> > 
> > While it is not entirely clear why the original author implemented this
> > behavior, there may have been certain circumstances or issues that were not
> > apparent to us. It's possible that they were trying to work around a bug by
> > employing an unconventional solution.Using `devm_clk_get_enabled()` rather
> > than devm_clk_get() can automatically track the usage of clocks and free
> > them when they are no longer needed or an error occurs.
> > 
> > fixing it by changing `ocores_i2c_of_probe` to use
> > `devm_clk_get_optional_enabled()` rather than `devm_clk_get()`, changing
> > `goto err_clk' to direct return and removing `err_clk`.
> > 
> > Signed-off-by: Wang Zhang <silver_code@xxxxxxxxxxx>
> 
> Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
> 
>     Andrew

Hi Andrew,
I'm checking in about my patch submission for i2c ocores that was
"review'ed" on 4/25, but its status has not been updated yet.
I would greatly appreciate it if you could provide me with an 
update on the status of my submission. Is there any additional 
information or documentation that I can provide to help expedite 
the process?

Thank you very much for your time and attention. I look forward 
to hearing from you soon.

Regards,
Wang Zhang




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux