lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 27 Sep 2022 10:44:19 +0800
From:   Jason Yan <yanaijie@...wei.com>
To:     Damien Le Moal <damien.lemoal@...nsource.wdc.com>,
        <martin.petersen@...cle.com>, <jejb@...ux.ibm.com>
CC:     <linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <hare@...e.com>, <hch@....de>, <bvanassche@....org>,
        <john.garry@...wei.com>, <jinpu.wang@...ud.ionos.com>
Subject: Re: [PATCH v3 1/8] scsi: libsas: introduce sas address comparation
 helpers

Hi Damien,

On 2022/9/27 10:23, Damien Le Moal wrote:
> On 9/27/22 11:29, Jason Yan wrote:
>> Sas address comparation is widely used in libsas. However they are all
> 
> s/comparation/comparison
> 
> Here and in the patch title.
> 

Thank you. I will fix the typo.

Jason

> Other than that, Looks OK to me.
> 
> Reviewed-by: Damien Le Moal <damien.lemoal@...nsource.wdc.com>
> 
>> opencoded and to avoid the line spill over 80 columns, are mostly split
>> into multi-lines. Introduce some helpers to prepare some refactor.
>>
>> Signed-off-by: Jason Yan <yanaijie@...wei.com>
>> ---
>>   drivers/scsi/libsas/sas_internal.h | 17 +++++++++++++++++
>>   1 file changed, 17 insertions(+)
>>
>> diff --git a/drivers/scsi/libsas/sas_internal.h b/drivers/scsi/libsas/sas_internal.h
>> index 8d0ad3abc7b5..3384429b7eb0 100644
>> --- a/drivers/scsi/libsas/sas_internal.h
>> +++ b/drivers/scsi/libsas/sas_internal.h
>> @@ -111,6 +111,23 @@ static inline void sas_smp_host_handler(struct bsg_job *job,
>>   }
>>   #endif
>>   
>> +static inline bool sas_phy_match_dev_addr(struct domain_device *dev,
>> +					 struct ex_phy *phy)
>> +{
>> +	return SAS_ADDR(dev->sas_addr) == SAS_ADDR(phy->attached_sas_addr);
>> +}
>> +
>> +static inline bool sas_phy_match_port_addr(struct asd_sas_port *port,
>> +					   struct ex_phy *phy)
>> +{
>> +	return SAS_ADDR(port->sas_addr) == SAS_ADDR(phy->attached_sas_addr);
>> +}
>> +
>> +static inline bool sas_phy_addr_match(struct ex_phy *p1, struct ex_phy *p2)
>> +{
>> +	return  SAS_ADDR(p1->attached_sas_addr) == SAS_ADDR(p2->attached_sas_addr);
>> +}
>> +
>>   static inline void sas_fail_probe(struct domain_device *dev, const char *func, int err)
>>   {
>>   	pr_warn("%s: for %s device %016llx returned %d\n",
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ