git: 34f0a01b6bd4 - main - mpi3mr: Fix confusion over | and &

From: Warner Losh <imp_at_FreeBSD.org>
Date: Mon, 29 Jan 2024 04:45:17 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=34f0a01b6bd4ff0e61a7066729515148400e0982

commit 34f0a01b6bd4ff0e61a7066729515148400e0982
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2023-12-11 02:44:47 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-01-29 04:43:56 +0000

    mpi3mr: Fix confusion over | and &
    
    Use sc->mpi3mr_debug & MPI3MR_IOT over the | version to test if a bit is
    set.
    
    CID: 1529718
    Sponsored by:           Netflix
---
 sys/dev/mpi3mr/mpi3mr_cam.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/dev/mpi3mr/mpi3mr_cam.c b/sys/dev/mpi3mr/mpi3mr_cam.c
index 3cef46f3f642..b842e2a05bda 100644
--- a/sys/dev/mpi3mr/mpi3mr_cam.c
+++ b/sys/dev/mpi3mr/mpi3mr_cam.c
@@ -1187,7 +1187,7 @@ mpi3mr_enqueue_request(struct mpi3mr_softc *sc, struct mpi3mr_cmd *cm)
 					mpi3mr_dprint(sc, MPI3MR_IOT,
 						"VD: Setting divert flag for tg_id(%d), persist_id(%d)\n",
 						tg->id, targ->per_id);
-					if (sc->mpi3mr_debug | MPI3MR_IOT)
+					if (sc->mpi3mr_debug & MPI3MR_IOT)
 						mpi3mr_print_cdb(ccb);
 					mpi3mr_set_io_divert_for_all_vd_in_tg(sc,
 					    tg, 1);
@@ -1209,7 +1209,7 @@ mpi3mr_enqueue_request(struct mpi3mr_softc *sc, struct mpi3mr_cmd *cm)
 					mpi3mr_dprint(sc, MPI3MR_IOT,
 						"PD: Setting divert flag for persist_id(%d)\n",
 						targ->per_id);
-					if (sc->mpi3mr_debug | MPI3MR_IOT)
+					if (sc->mpi3mr_debug & MPI3MR_IOT)
 						mpi3mr_print_cdb(ccb);
 				}
 			}