lkml.org 
[lkml]   [2022]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 01/16] scsi: libsas: Use enum for response frame DATAPRES field
From
Date
On 27/01/2022 11:31, chenxiang (M) wrote:
>> +
>
> I find that iu->datapres is also used in other drivers with 0/1/2, and
> maybe it is worth to replace all of them with those enum.
>
>   2    290
> /home/chenxiang/kernel_next/kernel-dev/drivers/scsi/aic94xx/aic94xx_tmf.c <<<unknown>>>
>
>              if (ru->datapres == 1)
> 5   1055
> /home/chenxiang/kernel_next/kernel-dev/drivers/scsi/isci/request.c
> <<<unknown>>>
>              if (datapres == 1 || datapres == 2) {
>    6   1740
> /home/chenxiang/kernel_next/kernel-dev/drivers/scsi/isci/request.c
> <<<unknown>>>
>              if (resp_iu->datapres == 0x01 ||
>    7   1741
> /home/chenxiang/kernel_next/kernel-dev/drivers/scsi/isci/request.c
> <<<unknown>>>
>                  resp_iu->datapres == 0x02) {
>  17   1641
> /home/chenxiang/kernel_next/kernel-dev/drivers/scsi/mvsas/mv_sas.c
> <<<unknown>>>
>              iu->datapres = 2;
>
>>   /* fill task_status_struct based o

OK, I can move that enum to libsas.h and use in those drivers.

But I will also check that they are not duplicating code already in libsas.h

Thanks,
John

\
 
 \ /
  Last update: 2022-01-27 12:56    [W:0.133 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site