public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: Bart Van Assche <bvanassche@acm.org>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH v2 01/18] scsi: Expand all create*_workqueue() invocations
Date: Tue, 20 Aug 2024 08:15:19 +0900	[thread overview]
Message-ID: <4220a817-592f-4bba-ab80-64993968f605@kernel.org> (raw)
In-Reply-To: <bd0ad5fc-bf76-423a-b734-bc306b2edc45@acm.org>

On 8/20/24 02:17, Bart Van Assche wrote:
> On 8/18/24 4:25 PM, Damien Le Moal wrote:
>> On 8/17/24 06:55, Bart Van Assche wrote:
>>> diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
>>> index 1078c20c5ef6..f49783b89d04 100644
>>> --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
>>> +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
>>> @@ -2363,8 +2363,8 @@ static int _bnx2fc_create(struct net_device *netdev,
>>>   	interface->vlan_id = vlan_id;
>>>   	interface->tm_timeout = BNX2FC_TM_TIMEOUT;
>>>   
>>> -	interface->timer_work_queue =
>>> -			create_singlethread_workqueue("bnx2fc_timer_wq");
>>> +	interface->timer_work_queue = alloc_ordered_workqueue(
>>> +		"%s", WQ_MEM_RECLAIM, "bnx2fc_timer_wq");
>>
>> Very odd line split. And there are a few more like this one. Maybe your patch
>> needs some manual tuning after running the script ?
>>
>> The patch overall looks good to me, but it would be nice to have consistency in
>> the line splitting. Personnally, I prefer the pattern such as:
>>
>> -	kmpath_rdacd = create_singlethread_workqueue("kmpath_rdacd");
>> +	kmpath_rdacd =
>> +		alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM, "kmpath_rdacd");
>>
>> instead of:
>>
>> -	lio_wq = create_singlethread_workqueue("efct_lio_worker");
>> +	lio_wq = alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM,
>> +					 "efct_lio_worker");
>>
>> Though I guess that is a matter of taste :)
> 
> (reduced cc-list)
> 
> If I run "git clang-format HEAD^" on this patch, no code is changed. 
> Does this perhaps mean that the .clang-format style file in the kernel
> tree needs further tuning? The most recent change in that file other
> than adding for-each macro names is from two years ago (see also commit 
> 781121a7f6d1 ("clang-format: Fix space after for_each macros")). Or does
> this perhaps mean that there is broad agreement about the coding style
> parameters in the .clang-format file?

As I said, most likely a matter of taste :)
The pattern:

	lio_wq = alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM,
					 "efct_lio_worker");

follows the regular kernel coding style.
I only meant to say that I find the pattern:

	lio_wq =
		alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM, "efct_lio_worker");

more pleasing visually. But the line may be too long anyway...

> 
> Thanks,
> 
> Bart.
> 
> 

-- 
Damien Le Moal
Western Digital Research


  reply	other threads:[~2024-08-19 23:15 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-16 21:55 [PATCH v2 00/18] Simplify multiple create*_workqueue() invocations Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 01/18] scsi: Expand all " Bart Van Assche
2024-08-18 23:25   ` Damien Le Moal
2024-08-19 17:17     ` Bart Van Assche
2024-08-19 23:15       ` Damien Le Moal [this message]
2024-08-20  5:59   ` Peter Wang (王信友)
2024-08-16 21:55 ` [PATCH v2 02/18] scsi: mptfusion: Simplify the alloc*_workqueue() invocations Bart Van Assche
2024-08-18 23:51   ` Damien Le Moal
2024-08-19 17:08     ` Bart Van Assche
2024-08-19 23:05       ` Damien Le Moal
2024-08-16 21:55 ` [PATCH v2 03/18] scsi: be2iscsi: Simplify an alloc_workqueue() invocation Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 04/18] scsi: bfa: Simplify an alloc_ordered_workqueue() invocation Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 05/18] scsi: esas2r: " Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 06/18] scsi: fcoe: Simplify alloc_ordered_workqueue() invocations Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 07/18] scsi: ibmvscsi_tgt: Simplify an alloc_workqueue() invocation Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 08/18] scsi: mpi3mr: Simplify an alloc_ordered_workqueue() invocation Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 09/18] scsi: mpt3sas: " Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 10/18] scsi: myrb: " Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 11/18] scsi: myrs: " Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 12/18] scsi: qedf: Simplify alloc_workqueue() invocations Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 13/18] scsi: qedi: Simplify an alloc_workqueue() invocation Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 14/18] scsi: snic: Simplify alloc_workqueue() invocations Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 15/18] scsi: scsi_transport_fc: " Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 16/18] scsi: stex: Simplify an alloc_ordered_workqueue() invocation Bart Van Assche
2024-08-16 21:55 ` [PATCH v2 17/18] scsi: ufs: Simplify alloc*_workqueue() invocation Bart Van Assche
2024-08-17  1:53   ` Manivannan Sadhasivam
2024-08-20  6:00   ` Peter Wang (王信友)
2024-08-16 21:55 ` [PATCH v2 18/18] scsi: core: Simplify an alloc_workqueue() invocation Bart Van Assche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4220a817-592f-4bba-ab80-64993968f605@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=bvanassche@acm.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox