From: John Garry <john.g.garry@oracle.com>
To: Jason Yan <yanaijie@huawei.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 v2 4/5] scsi: libsas: factor out sas_ata_add_dev()
Date: Tue, 13 Dec 2022 16:22:35 +0000 [thread overview]
Message-ID: <76747055-4b60-a5d0-2b40-8140efcb29ae@oracle.com> (raw)
In-Reply-To: <20221213150942.988371-5-yanaijie@huawei.com>
On 13/12/2022 15:09, Jason Yan wrote:
> Factor out sas_ata_add_dev() and put it in sas_ata.c since it is a sata
> related interface. Also follow the standard coding style to define an
> inline empty function when CONFIG_SCSI_SAS_ATA is not enabled.
>
> Cc: John Garry <john.g.garry@oracle.com>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
Apart from comment, below:
Reviewed-by: John Garry <john.g.garry@oracle.com>
> ---
> drivers/scsi/libsas/sas_ata.c | 62 ++++++++++++++++++++++++++++++
> drivers/scsi/libsas/sas_expander.c | 54 +-------------------------
> include/scsi/sas_ata.h | 9 +++++
> 3 files changed, 73 insertions(+), 52 deletions(-)
>
> diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
>
>
> @@ -109,6 +111,13 @@ static inline int sas_discover_sata(struct domain_device *dev)
> pr_notice("ATA device seen but CONFIG_SCSI_SAS_ATA=N so cannot attach\n");
> return -ENXIO;
> }
> +static inline int sas_ata_add_dev(struct domain_device *parent, struct ex_phy *phy,
> + struct domain_device *child, int phy_id)
> +{
> + pr_notice("ATA device seen but CONFIG_SCSI_SAS_ATA=N so cannot add device, target proto 0x%x at %016llx:0x%x\n",
> + phy->attached_tproto, SAS_ADDR(parent->sas_addr), phy_id);
Do you really think that we need to add all this info, like
parent->sas_addr?
Indeed, I think that we could make all these prints for
CONFIG_SCSI_SAS_ATA=N into a single global pr_notice_once(). That's just
my thoughts.
> + return -ENODEV;
> +}
> #endif
>
> #endif /* _SAS_ATA_H_ */
next prev parent reply other threads:[~2022-12-13 16:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-13 15:09 [PATCH v2 0/5] scsi: libsas: Some coding style fixes and cleanups Jason Yan
2022-12-13 15:09 ` [PATCH v2 1/5] scsi: libsas: move sas_get_ata_command_set() up to save the declaration Jason Yan
2022-12-13 16:00 ` John Garry
2022-12-13 15:09 ` [PATCH v2 2/5] scsi: libsas: change the coding style of sas_discover_sata() Jason Yan
2022-12-13 16:08 ` John Garry
2022-12-13 15:09 ` [PATCH v2 3/5] scsi: libsas: remove useless dev_list delete in sas_ex_discover_end_dev() Jason Yan
2022-12-13 16:13 ` John Garry
2022-12-13 15:09 ` [PATCH v2 4/5] scsi: libsas: factor out sas_ata_add_dev() Jason Yan
2022-12-13 16:22 ` John Garry [this message]
2022-12-14 2:46 ` Jason Yan
2022-12-13 15:09 ` [PATCH v2 5/5] scsi: libsas: factor out sas_ex_add_dev() Jason Yan
2022-12-13 16:24 ` John Garry
2022-12-13 16:12 ` [PATCH v2 0/5] scsi: libsas: Some coding style fixes and cleanups John Garry
2022-12-14 2:54 ` 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=76747055-4b60-a5d0-2b40-8140efcb29ae@oracle.com \
--to=john.g.garry@oracle.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=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=yanaijie@huawei.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