lkml.org 
[lkml]   [2023]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] PCI: kirin: Use devm_kasprintf()
From
Le 13/11/2023 à 10:55, Krzysztof Wilczyński a écrit :
> Hello!
>
> [...]
>> @@ -387,9 +386,8 @@ static int kirin_pcie_get_gpio_enable(struct kirin_pcie *pcie,
>> if (pcie->gpio_id_clkreq[i] < 0)
>> return pcie->gpio_id_clkreq[i];
>>
>> - sprintf(name, "pcie_clkreq_%d", i);
>> - pcie->clkreq_names[i] = devm_kstrdup_const(dev, name,
>> - GFP_KERNEL);
>> + pcie->clkreq_names[i] = devm_kasprintf(dev, GFP_KERNEL,
>> + "pcie_clkreq_%d", i);
>
> I think, the kirin_pcie_parse_port(), which is just below form this
> function, might benefit from the same type of a nice change. Thoughts?
>
> Krzysztof
>

Argh, yes, I've not seen it.

I'll send a v2 with both.
Thx for seeing it.

CJ

\
 
 \ /
  Last update: 2023-11-20 13:58    [W:0.096 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site