]> git.itanic.dy.fi Git - linux-stable/commit
PCI: kirin: Use devm_kasprintf() to dynamically allocate clock names
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 18 Nov 2023 07:55:48 +0000 (08:55 +0100)
committerKrzysztof Wilczyński <kwilczynski@kernel.org>
Sun, 17 Dec 2023 03:02:33 +0000 (03:02 +0000)
commit9f5077ef8f8157270f51f4ebd782c985d56d33c6
treecee56717e2bda0d48fa95cccbc949ef32d2180a3
parentb85ea95d086471afb4ad062012a4d73cd328fa86
PCI: kirin: Use devm_kasprintf() to dynamically allocate clock names

Use devm_kasprintf() instead of open coding it.  This saves the need of
an intermediate buffer.

There was also no reason to use devm_kstrdup_const() as string is known
to be constant.

[kwilczynski: commit log, and add missing Reviewed-by tag]
Link: https://lore.kernel.org/linux-pci/1bad6879083a7d836c8a47418a0afa22485e8f69.1700294127.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/pci/controller/dwc/pcie-kirin.c