Date: Wed, 31 Jul 2024 19:32:38 GMT From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 1bd66fac35ec - main - Fix enum warning in isci Message-ID: <202407311932.46VJWc0K094634@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=1bd66fac35ec27fa64d6158f82fdcbdc26098679 commit 1bd66fac35ec27fa64d6158f82fdcbdc26098679 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2024-07-31 11:14:17 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2024-07-31 19:31:50 +0000 Fix enum warning in isci This fixes a clang 19 warning: sys/dev/isci/scil/scif_sas_smp_remote_device.c:197:26: error: comparison of different enumeration types ('SCI_IO_STATUS' (aka 'enum _SCI_IO_STATUS') and 'enum _SCI_STATUS') [-Werror,-Wenum-compare] 197 | if (completion_status == SCI_FAILURE_RETRY_REQUIRED) | ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~ The `completion_status` variable is of type `SCI_IO_STATUS`, not `SCI_STATUS`. In this case, we can seamlessly replace the value with `SCI_IO_FAILURE_RETRY_REQUIRED`, which is numerically equal to `SCI_FAILURE_RETRY_REQUIRED`. MFC after: 3 days --- sys/dev/isci/scil/scif_sas_smp_remote_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/isci/scil/scif_sas_smp_remote_device.c b/sys/dev/isci/scil/scif_sas_smp_remote_device.c index d6055adc13f9..c72402f66889 100644 --- a/sys/dev/isci/scil/scif_sas_smp_remote_device.c +++ b/sys/dev/isci/scil/scif_sas_smp_remote_device.c @@ -194,7 +194,7 @@ SCI_STATUS scif_sas_smp_remote_device_decode_smp_response( //if Core set the status of this io to be RETRY_REQUIRED, we should //retry the IO without even decode the response. - if (completion_status == SCI_FAILURE_RETRY_REQUIRED) + if (completion_status == SCI_IO_FAILURE_RETRY_REQUIRED) { scif_sas_smp_remote_device_continue_current_activity( fw_device, fw_request, SCI_FAILURE_RETRY_REQUIRED
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202407311932.46VJWc0K094634>