* [PATCH net-next v2] net: ipa: make use of dev_err_cast_probe()
@ 2024-08-29 3:07 Yuesong Li
2024-09-02 8:56 ` Simon Horman
2024-09-03 8:41 ` Paolo Abeni
0 siblings, 2 replies; 3+ messages in thread
From: Yuesong Li @ 2024-08-29 3:07 UTC (permalink / raw)
To: elder, davem, edumazet, kuba, pabeni, horms, lihongbo22
Cc: netdev, linux-kernel, opensource.kernel, Yuesong Li
Using dev_err_cast_probe() to simplify the code.
Signed-off-by: Yuesong Li <liyuesong@vivo.com>
Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
---
v2: https://lore.kernel.org/all/20240828160728.GR1368797@kernel.org/
- fix patch name
- drop the {} and fix the alignment
---
drivers/net/ipa/ipa_power.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ipa/ipa_power.c b/drivers/net/ipa/ipa_power.c
index 65fd14da0f86..3c239c3545e5 100644
--- a/drivers/net/ipa/ipa_power.c
+++ b/drivers/net/ipa/ipa_power.c
@@ -242,11 +242,9 @@ ipa_power_init(struct device *dev, const struct ipa_power_data *data)
int ret;
clk = clk_get(dev, "core");
- if (IS_ERR(clk)) {
- dev_err_probe(dev, PTR_ERR(clk), "error getting core clock\n");
-
- return ERR_CAST(clk);
- }
+ if (IS_ERR(clk))
+ return dev_err_cast_probe(dev, clk,
+ "error getting core clock\n");
ret = clk_set_rate(clk, data->core_clock_rate);
if (ret) {
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v2] net: ipa: make use of dev_err_cast_probe()
2024-08-29 3:07 [PATCH net-next v2] net: ipa: make use of dev_err_cast_probe() Yuesong Li
@ 2024-09-02 8:56 ` Simon Horman
2024-09-03 8:41 ` Paolo Abeni
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2024-09-02 8:56 UTC (permalink / raw)
To: Yuesong Li
Cc: elder, davem, edumazet, kuba, pabeni, lihongbo22, netdev,
linux-kernel, opensource.kernel
On Thu, Aug 29, 2024 at 11:07:39AM +0800, Yuesong Li wrote:
> Using dev_err_cast_probe() to simplify the code.
>
> Signed-off-by: Yuesong Li <liyuesong@vivo.com>
> Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
> ---
> v2: https://lore.kernel.org/all/20240828160728.GR1368797@kernel.org/
> - fix patch name
> - drop the {} and fix the alignment
Thanks for hte updates.
I note that this code is in a probe function,
so this patch is an appropriate use of dev_err_cast_probe() [1].
I also see that it addresses the feedback on code style from v1.
Reviewed-by: Simon Horman <horms@kernel.org>
[1] [PATCH] net: alacritech: Partially revert "net: alacritech: Switch to use dev_err_probe()"
https://lore.kernel.org/netdev/20240830170014.15389-1-krzysztof.kozlowski@linaro.org/
...
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v2] net: ipa: make use of dev_err_cast_probe()
2024-08-29 3:07 [PATCH net-next v2] net: ipa: make use of dev_err_cast_probe() Yuesong Li
2024-09-02 8:56 ` Simon Horman
@ 2024-09-03 8:41 ` Paolo Abeni
1 sibling, 0 replies; 3+ messages in thread
From: Paolo Abeni @ 2024-09-03 8:41 UTC (permalink / raw)
To: Yuesong Li, elder, davem, edumazet, kuba, horms, lihongbo22
Cc: netdev, linux-kernel, opensource.kernel
On 8/29/24 05:07, Yuesong Li wrote:
> Using dev_err_cast_probe() to simplify the code.
>
> Signed-off-by: Yuesong Li <liyuesong@vivo.com>
> Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
> ---
> v2: https://lore.kernel.org/all/20240828160728.GR1368797@kernel.org/
> - fix patch name
> - drop the {} and fix the alignment
Meanwhile Hongbo Li's version of this patch was applied by Jakub, this
is not needed anymore.
Paolo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-09-03 8:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-29 3:07 [PATCH net-next v2] net: ipa: make use of dev_err_cast_probe() Yuesong Li
2024-09-02 8:56 ` Simon Horman
2024-09-03 8:41 ` Paolo Abeni
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).