Messages in this thread | | | Subject | Re: [PATCH 01/16] scsi: libsas: Use enum for response frame DATAPRES field | From | John Garry <> | Date | Thu, 27 Jan 2022 11:55:23 +0000 |
| |
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
| |