[PATCH 31/53] nfc: mrvl: Simplify a create*_workqueue() call

Bart Van Assche posted 53 patches 1 year, 5 months ago
Only 52 patches received!
[PATCH 31/53] nfc: mrvl: Simplify a create*_workqueue() call
Posted by Bart Van Assche 1 year, 5 months ago
Pass a format string to create*_workqueue2() instead of formatting the
workqueue name before create*_workqueue() is called.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/nfc/nfcmrvl/fw_dnld.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/nfc/nfcmrvl/fw_dnld.c b/drivers/nfc/nfcmrvl/fw_dnld.c
index e83f65596a88..fc8d9466422d 100644
--- a/drivers/nfc/nfcmrvl/fw_dnld.c
+++ b/drivers/nfc/nfcmrvl/fw_dnld.c
@@ -442,12 +442,10 @@ static void fw_dnld_rx_work(struct work_struct *work)
 
 int nfcmrvl_fw_dnld_init(struct nfcmrvl_private *priv)
 {
-	char name[32];
-
 	INIT_WORK(&priv->fw_dnld.rx_work, fw_dnld_rx_work);
-	snprintf(name, sizeof(name), "%s_nfcmrvl_fw_dnld_rx_wq",
-		 dev_name(&priv->ndev->nfc_dev->dev));
-	priv->fw_dnld.rx_wq = create_singlethread_workqueue(name);
+	priv->fw_dnld.rx_wq = create_singlethread_workqueue2(
+		"%s_nfcmrvl_fw_dnld_rx_wq",
+		dev_name(&priv->ndev->nfc_dev->dev));
 	if (!priv->fw_dnld.rx_wq)
 		return -ENOMEM;
 	skb_queue_head_init(&priv->fw_dnld.rx_q);
Re: [PATCH 31/53] nfc: mrvl: Simplify a create*_workqueue() call
Posted by Krzysztof Kozlowski 1 year, 5 months ago
On 01/07/2024 00:26, Bart Van Assche wrote:
> Pass a format string to create*_workqueue2() instead of formatting the
> workqueue name before create*_workqueue() is called.
> 
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
Re: [PATCH 31/53] nfc: mrvl: Simplify a create*_workqueue() call
Posted by Krzysztof Kozlowski 1 year, 5 months ago
On 01/07/2024 00:26, Bart Van Assche wrote:
> Pass a format string to create*_workqueue2() instead of formatting the
> workqueue name before create*_workqueue() is called.
> 
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
>  drivers/nfc/nfcmrvl/fw_dnld.c | 8 +++-----

I only got this patch, no links to new API being introduced and there is
no create_singlethread_workqueue2() call. Looks fine, but tricky to
review. Provide first patch or lore link in patch changelog.


Best regards,
Krzysztof
Re: [PATCH 31/53] nfc: mrvl: Simplify a create*_workqueue() call
Posted by Bart Van Assche 1 year, 5 months ago
On 7/1/24 2:17 AM, Krzysztof Kozlowski wrote:
> On 01/07/2024 00:26, Bart Van Assche wrote:
>> Pass a format string to create*_workqueue2() instead of formatting the
>> workqueue name before create*_workqueue() is called.
>>
>> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
>> ---
>>   drivers/nfc/nfcmrvl/fw_dnld.c | 8 +++-----
> 
> I only got this patch, no links to new API being introduced and there is
> no create_singlethread_workqueue2() call. Looks fine, but tricky to
> review. Provide first patch or lore link in patch changelog.

Thanks for the advice. I will do this if I have to repost this patch
series.

This is the link to the entire patch series:
https://lore.kernel.org/linux-kernel/20240630222904.627462-1-bvanassche@acm.org/

Further feedback is welcome.

Thanks,

Bart.