public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Yan <yanaijie@huawei.com>
To: John Garry <john.g.garry@oracle.com>,
	<martin.petersen@oracle.com>, <jejb@linux.ibm.com>
Cc: <linux-scsi@vger.kernel.org>, <hare@suse.com>, <hch@lst.de>,
	<bvanassche@acm.org>, <jinpu.wang@cloud.ionos.com>,
	<damien.lemoal@opensource.wdc.com>
Subject: Re: [PATCH 2/6] scsi: libsas: delete wrapper function sas_discover_end_dev()
Date: Thu, 8 Dec 2022 14:56:25 +0800	[thread overview]
Message-ID: <7d7baa08-903d-7f04-a7d9-56a473cfa220@huawei.com> (raw)
In-Reply-To: <8729c1c5-c306-1fdc-ff30-174740be97c4@oracle.com>

On 2022/12/5 16:57, John Garry wrote:
> On 04/12/2022 08:16, Jason Yan wrote:
>> After commit 0558f33c06bb ("scsi: libsas: direct call probe and 
>> destruct")
>> this function is only a wrapper of sas_notify_lldd_dev_found(). And the
>> function name does not reflect the real purpose of this function now.
> 
> Why is this? Maybe add "dev_found" to the name could help.
> 
>> Remove it and call sas_notify_lldd_dev_found() directly. The log is also
>> changed accordingly.
>>
>> Cc: John Garry <john.g.garry@oracle.com>
>> Signed-off-by: Jason Yan <yanaijie@huawei.com>
>> ---
>>   drivers/scsi/libsas/sas_discover.c | 13 +------------
>>   drivers/scsi/libsas/sas_expander.c |  4 ++--
>>   include/scsi/libsas.h              |  1 -
>>   3 files changed, 3 insertions(+), 15 deletions(-)
>>
>> diff --git a/drivers/scsi/libsas/sas_discover.c 
>> b/drivers/scsi/libsas/sas_discover.c
>> index d5bc1314c341..efc6bf95bb67 100644
>> --- a/drivers/scsi/libsas/sas_discover.c
>> +++ b/drivers/scsi/libsas/sas_discover.c
>> @@ -269,17 +269,6 @@ static void sas_resume_devices(struct work_struct 
>> *work)
>>       sas_resume_sata(port);
>>   }
>> -/**
>> - * sas_discover_end_dev - discover an end device (SSP, etc)
>> - * @dev: pointer to domain device of interest
>> - *
>> - * See comment in sas_discover_sata().
>> - */
>> -int sas_discover_end_dev(struct domain_device *dev)
>> -{
>> -    return sas_notify_lldd_dev_found(dev);
>> -}
>> -
>>   /* ---------- Device registration and unregistration ---------- */
>>   void sas_free_device(struct kref *kref)
>> @@ -447,7 +436,7 @@ static void sas_discover_domain(struct work_struct 
>> *work)
>>       switch (dev->dev_type) {
>>       case SAS_END_DEVICE:
>> -        error = sas_discover_end_dev(dev);
>> +        error = sas_notify_lldd_dev_found(dev);
> 
> For me, personally, I prefer consistent API name, like 
> sas_discover_end_dev() and sas_discover_sata(), even if 
> sas_discover_end_dev() is just a wrapper.

Fair enough. I was just thinking that this API name is not proper now
because it is only notifying the lldd.

I will drop this patch if you insist.

Thanks,
Jason

  reply	other threads:[~2022-12-08  6:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-04  8:16 [PATCH 0/6] scsi: libsas: Some coding style fixes and cleanups Jason Yan
2022-12-04  8:16 ` [PATCH 1/6] scsi: libsas: move sas_get_ata_command_set() up to save the declaration Jason Yan
2022-12-05  8:45   ` John Garry
2022-12-08  6:36     ` Jason Yan
2022-12-04  8:16 ` [PATCH 2/6] scsi: libsas: delete wrapper function sas_discover_end_dev() Jason Yan
2022-12-05  8:57   ` John Garry
2022-12-08  6:56     ` Jason Yan [this message]
2022-12-04  8:16 ` [PATCH 3/6] scsi: libsas: rename sas_discover_sata() and related refactors Jason Yan
2022-12-04  8:16 ` [PATCH 4/6] scsi: libsas: remove useless dev_list delete in sas_ex_discover_end_dev() Jason Yan
2022-12-05  9:14   ` John Garry
2022-12-08  7:21     ` Jason Yan
2022-12-08 10:40       ` John Garry
2022-12-08 11:11         ` Jason Yan
2022-12-04  8:16 ` [PATCH 5/6] scsi: libsas: factor out sas_ata_add_dev() Jason Yan
2022-12-05  9:24   ` John Garry
2022-12-08  7:26     ` Jason Yan
2022-12-04  8:16 ` [PATCH 6/6] scsi: libsas: factor out sas_ex_add_dev() Jason Yan
2022-12-05  9:31   ` John Garry
2022-12-08  8:07     ` Jason Yan

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=7d7baa08-903d-7f04-a7d9-56a473cfa220@huawei.com \
    --to=yanaijie@huawei.com \
    --cc=bvanassche@acm.org \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=hare@suse.com \
    --cc=hch@lst.de \
    --cc=jejb@linux.ibm.com \
    --cc=jinpu.wang@cloud.ionos.com \
    --cc=john.g.garry@oracle.com \
    --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