linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: qedf: Remove always false 'tmp_prio < 0' statement
@ 2019-09-19  7:55 Austin Kim
  2019-09-19  8:52 ` Saurav Kashyap
  2019-09-24  2:30 ` Martin K. Petersen
  0 siblings, 2 replies; 4+ messages in thread
From: Austin Kim @ 2019-09-19  7:55 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linux-scsi, linux-kernel, QLogic-Storage-Upstream, austindh.kim

Since tmp_prio is declared as u8, the following statement is always false.
   tmp_prio < 0

So remove 'always false' statement.

Signed-off-by: Austin Kim <austindh.kim@gmail.com>
---
 drivers/scsi/qedf/qedf_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
index 1659d35..59ca98f 100644
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -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);
-- 
2.6.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: [PATCH] scsi: qedf: Remove always false 'tmp_prio < 0' statement
  2019-09-19  7:55 [PATCH] scsi: qedf: Remove always false 'tmp_prio < 0' statement Austin Kim
@ 2019-09-19  8:52 ` Saurav Kashyap
  2019-09-24  2:30 ` Martin K. Petersen
  1 sibling, 0 replies; 4+ messages in thread
From: Saurav Kashyap @ 2019-09-19  8:52 UTC (permalink / raw)
  To: Austin Kim, jejb, martin.petersen
  Cc: linux-scsi, linux-kernel, QLogic-Storage-Upstream



> -----Original Message-----
> From: linux-scsi-owner@vger.kernel.org <linux-scsi-owner@vger.kernel.org> On
> Behalf Of Austin Kim
> Sent: Thursday, September 19, 2019 1:26 PM
> To: jejb@linux.ibm.com; martin.petersen@oracle.com
> Cc: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org; QLogic-Storage-
> Upstream@cavium.com; austindh.kim@gmail.com
> Subject: [PATCH] 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.
> 
> Signed-off-by: Austin Kim <austindh.kim@gmail.com>
> ---
>  drivers/scsi/qedf/qedf_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index
> 1659d35..59ca98f 100644
> --- a/drivers/scsi/qedf/qedf_main.c
> +++ b/drivers/scsi/qedf/qedf_main.c
> @@ -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);
> --
> 2.6.2

Hi Austin,
Thanks for the patch.

Acked-by: Saurav Kashyap <skashyap@marvell.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] scsi: qedf: Remove always false 'tmp_prio < 0' statement
  2019-09-19  7:55 [PATCH] scsi: qedf: Remove always false 'tmp_prio < 0' statement Austin Kim
  2019-09-19  8:52 ` Saurav Kashyap
@ 2019-09-24  2:30 ` Martin K. Petersen
  2019-09-25 10:13   ` Austin Kim
  1 sibling, 1 reply; 4+ messages in thread
From: Martin K. Petersen @ 2019-09-24  2:30 UTC (permalink / raw)
  To: Austin Kim
  Cc: jejb, martin.petersen, linux-scsi, linux-kernel, QLogic-Storage-Upstream


Austin,

> Since tmp_prio is declared as u8, the following statement is always false.
>    tmp_prio < 0
>
> So remove 'always false' statement.

Applied to 5.4/scsi-fixes, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] scsi: qedf: Remove always false 'tmp_prio < 0' statement
  2019-09-24  2:30 ` Martin K. Petersen
@ 2019-09-25 10:13   ` Austin Kim
  0 siblings, 0 replies; 4+ messages in thread
From: Austin Kim @ 2019-09-25 10:13 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: jejb, linux-scsi, linux-kernel, QLogic-Storage-Upstream

2019년 9월 24일 (화) 오전 11:32, Martin K. Petersen <martin.petersen@oracle.com>님이 작성:
>
>
> Austin,
[...]
> > So remove 'always false' statement.
>
> Applied to 5.4/scsi-fixes, thanks!
>

Good, thanks for information.

> --
> Martin K. Petersen      Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-09-25 10:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-19  7:55 [PATCH] scsi: qedf: Remove always false 'tmp_prio < 0' statement Austin Kim
2019-09-19  8:52 ` Saurav Kashyap
2019-09-24  2:30 ` Martin K. Petersen
2019-09-25 10:13   ` Austin Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).