svn commit: r360843 - in stable: 11/sys/dev/mfi 12/sys/dev/mfi

Dimitry Andric dim at FreeBSD.org
Sat May 9 11:18:35 UTC 2020


Author: dim
Date: Sat May  9 11:18:34 2020
New Revision: 360843
URL: https://svnweb.freebsd.org/changeset/base/360843

Log:
  MFC r358689 (by jhibbits):
  
  Fix a mistaken conditional in mfi_tbolt_send_frame()
  
  As written, the condition of (cdb[0] != 0x28 || cdb[0] != 0x2A) will always
  be true, since if it's one, it's obviously not the other.  Reading the code,
  the intent appears to be that it should only perform the operation if it's
  neither, otherwise the conditional can be elided.
  
  Found by clang 10.

Modified:
  stable/11/sys/dev/mfi/mfi_tbolt.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/sys/dev/mfi/mfi_tbolt.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/sys/dev/mfi/mfi_tbolt.c
==============================================================================
--- stable/11/sys/dev/mfi/mfi_tbolt.c	Sat May  9 11:10:44 2020	(r360842)
+++ stable/11/sys/dev/mfi/mfi_tbolt.c	Sat May  9 11:18:34 2020	(r360843)
@@ -1107,7 +1107,7 @@ mfi_tbolt_send_frame(struct mfi_softc *sc, struct mfi_
 
 	if (hdr->cmd == MFI_CMD_PD_SCSI_IO) {
 		/* check for inquiry commands coming from CLI */
-		if (cdb[0] != 0x28 || cdb[0] != 0x2A) {
+		if (cdb[0] != 0x28 && cdb[0] != 0x2A) {
 			if ((req_desc = mfi_tbolt_build_mpt_cmd(sc, cm)) ==
 			    NULL) {
 				device_printf(sc->mfi_dev, "Mapping from MFI "


More information about the svn-src-all mailing list