linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: dpt_i2o: drop unnecessary comparison statement
@ 2019-09-09  5:42 Austin Kim
  2019-09-10 11:17 ` Austin Kim
  0 siblings, 1 reply; 2+ messages in thread
From: Austin Kim @ 2019-09-09  5:42 UTC (permalink / raw)
  To: aacraid, jejb, martin.petersen; +Cc: linux-kernel, linux-scsi

The type of 'chan' is u32 which contain non-negative value.
So 'chan < 0' is statment is always false.

Remove unnecessary comparison statement

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

diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
index abc74fd..df48ef5 100644
--- a/drivers/scsi/dpt_i2o.c
+++ b/drivers/scsi/dpt_i2o.c
@@ -1120,7 +1120,7 @@ static struct adpt_device* adpt_find_device(adpt_hba* pHba, u32 chan, u32 id, u6
 {
 	struct adpt_device* d;
 
-	if(chan < 0 || chan >= MAX_CHANNEL)
+	if(chan >= MAX_CHANNEL)
 		return NULL;
 	
 	d = pHba->channel[chan].device[id];
-- 
2.6.2


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

* Re: [PATCH] scsi: dpt_i2o: drop unnecessary comparison statement
  2019-09-09  5:42 [PATCH] scsi: dpt_i2o: drop unnecessary comparison statement Austin Kim
@ 2019-09-10 11:17 ` Austin Kim
  0 siblings, 0 replies; 2+ messages in thread
From: Austin Kim @ 2019-09-10 11:17 UTC (permalink / raw)
  To: aacraid, jejb, martin.petersen; +Cc: linux-kernel, linux-scsi

Hello, Maintainers...
Would you please review this patch and share the feedback?

Thanks,
Austin Kim

2019년 9월 9일 (월) 오후 2:42, Austin Kim <austindh.kim@gmail.com>님이 작성:
>
> The type of 'chan' is u32 which contain non-negative value.
> So 'chan < 0' is statment is always false.
>
> Remove unnecessary comparison statement
>
> Signed-off-by: Austin Kim <austindh.kim@gmail.com>
> ---
>  drivers/scsi/dpt_i2o.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
> index abc74fd..df48ef5 100644
> --- a/drivers/scsi/dpt_i2o.c
> +++ b/drivers/scsi/dpt_i2o.c
> @@ -1120,7 +1120,7 @@ static struct adpt_device* adpt_find_device(adpt_hba* pHba, u32 chan, u32 id, u6
>  {
>         struct adpt_device* d;
>
> -       if(chan < 0 || chan >= MAX_CHANNEL)
> +       if(chan >= MAX_CHANNEL)
>                 return NULL;
>
>         d = pHba->channel[chan].device[id];
> --
> 2.6.2
>

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-09  5:42 [PATCH] scsi: dpt_i2o: drop unnecessary comparison statement Austin Kim
2019-09-10 11:17 ` 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).