scsi: qedf: Remove always false 'tmp_prio < 0' statement
Subsystems (2)
PATCH 1/1 scsi: qedf: Remove always false 'tmp_prio < 0' statement
Since tmp_prio is declared as u8, the following statement is always false.
tmp_prio < 0
So remove 'always false' statement.
--- drivers/scsi/qedf/qedf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qedf/qedf_main.c +1 -1
@@ -596,7 +596,7 @@ static void qedf_dcbx_handler(void *dev, struct qed_dcbx_get *get, u32 mib_type) tmp_prio = get->operational.app_prio.fcoe;if (qedf_default_prio >-1 ) qedf->prio = qedf_default_prio; -else if (tmp_prio <0 || tmp_prio >7 ) { +else if (tmp_prio >7 ) {QEDF_INFO (&(qedf->dbg_ctx),QEDF_LOG_DISC ,"FIP/FCoE prio %d out of range, setting to %d.\n" , tmp_prio,QEDF_DEFAULT_PRIO );
Signature · 1 line
2.6.2
Quoted 34 lines
-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Austin Kim
Sent: Thursday, September 19, 2019 1:26 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]; QLogic-Storage- [email protected]; [email protected]
Subject: [PATCH] scsi: qedf: Remove always false 'tmp_prio< 0' statementSince
tmp_priois declared as u8, the following statement is always false.
tmp_prio< 0So remove 'always false' statement.
Signed-off-by Austin Kim <[email protected]>--- drivers/scsi/qedf/qedf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/scsi/qedf/qedf_main.c index renamed from drivers/scsi/qedf/qedf_main.c +0
-01659d35..59ca98f 100644
drivers/scsi/qedf/qedf_main.c +1
-1@@ -596,7 +596,7 @@ static void qedf_dcbx_handler(void *dev, struct qed_dcbx_get *get, u32 mib_type) tmp_prio = get->operational.app_prio.fcoe;if (qedf_default_prio >-1 ) qedf->prio = qedf_default_prio; -else if (tmp_prio <0 || tmp_prio >7 ) { +else if (tmp_prio >7 ) { QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC, "FIP/FCoE prio %d out of range, setting to %d.\n",
Quoted 3 lines
tmp_prio,QEDF_DEFAULT_PRIO);
--
2.6.2
Hi Austin,
Thanks for the patch.
Martin K. Petersen
AppliedAustin,
Quoted 4 lines
Since
tmp_priois declared as u8, the following statement is always false.
tmp_prio< 0So remove 'always false' statement.
Applied to 5.4/scsi-fixes, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
2019년 9월 24일 (화) 오전 11:32, Martin K. Petersen <[email protected]>님이 작성:
Quoted 3 lines
Austin,
[...]
Quoted 4 lines
Quoted 1 line
So remove 'always false' statement.
Applied to 5.4/scsi-fixes, thanks!
Good, thanks for information.
Quoted 2 lines
--
Martin K. Petersen Oracle Linux Engineering