Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4599220ybe; Mon, 9 Sep 2019 11:32:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqxjEfHFOsgPdg+czD2VKSt9KPlzcTmzjDaZLoLyURfLf4ztLj1sMqJH5GDgUc0PSGKeFfSi X-Received: by 2002:a50:8a9a:: with SMTP id j26mr26010455edj.251.1568053923780; Mon, 09 Sep 2019 11:32:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568053923; cv=none; d=google.com; s=arc-20160816; b=aSNf+NXT7olks6yCUpwcFbJRkmTUyUnZet2v0MWORQFCweVeMlnvRFyTIRQBQN3+ZT bR2yvGMwN8CwLKc5GypddChZH3lk1WFVMnEiIGrkwnLWFLj+35xdqJbwIKLcC2cp090+ lA+msa0NGQY1tmHlJPL8X1dAJjbMC+einwefagy2YcyvDkCZOpUqXg0F8Y7RL/whZauP g//ifuNmvoTYzkWyM2X9cxme9xsmiXVaxR8DH64NyML0xu9SV0RIMXDd0kW44CHfzjB5 Ub5kn7yoWC/ngBbV6FgQ6t3tKHQeIAgydw9r0jqUiO1yOLSHo6mrPXa3MRVX7SEuzmzW iBHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=sNPKiG4f293O1xukhlprF97TRd4tQ/u8W2A8cgfAduc=; b=vlbZfAE0gxE6VYcdzcv0aS23gLNzL3OfLctQAjhQB+pXJx9knPSE1umxSYVVZnmYqC u+Zd2XTQAP/DiSLqcDgtWZijjaXVQ5fZCo2ZA/j8aCIHrykzCQGqlYszZJLXn4YRfmd0 UTq41RZFMbmYvshQ3/UJ1UPNh/oWxs98Gr20x4pMTTCmNcRU53kQOa9TjCkip6jPdVJ1 Aq1bqKV8osf0NZzqMzUsTboR9+jEQRqj/l6keuaK2xxxp+CSsd43EtHn4Z4sfvW2TXev EmZm3cP6fQjb54a7UxBzJeZMmRb+krZzaNvD6v8N7svoO8xyg/IA86DsoiOcL6ZzMoqE WfSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mitSbrQl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g20si10549220edc.191.2019.09.09.11.31.40; Mon, 09 Sep 2019 11:32:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mitSbrQl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727014AbfIIFm0 (ORCPT + 99 others); Mon, 9 Sep 2019 01:42:26 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:36548 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726729AbfIIFmZ (ORCPT ); Mon, 9 Sep 2019 01:42:25 -0400 Received: by mail-pf1-f193.google.com with SMTP id y22so8445565pfr.3; Sun, 08 Sep 2019 22:42:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=sNPKiG4f293O1xukhlprF97TRd4tQ/u8W2A8cgfAduc=; b=mitSbrQlq45lqe66coysoEZ9CZFcjROBTC6aTnCdZyTxToUM5CA+2gLVnBxUkmGyqQ GPx2LZlomyvyd846pVL3KcIXWqj6AeTuTTs5Ko32TVwVp9RYr1iJPUuDWDzs4guZI6xK EAiQ5qXNix9ANr5YqmjWHV7z+KIC2gabJEMmPX454jOvB+jx14DXK4rudT5/U0O0B2cs ZCZdv1g2n9Q+Rw05GaaYys7f/jTNDkOlfHL+HPMF9F4+2TLSuprpd2r8w24qv2XtdBcu EDNlW+SFrP8Ykm7ILmHfcB4oiiJ/tqGUbmPfhcOCCFJ8rLv8Biov/OTGqtAhB+2TbHoD BcRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=sNPKiG4f293O1xukhlprF97TRd4tQ/u8W2A8cgfAduc=; b=mcsOXzgClALXSXi26aTEuBKLH0NnAUj6As8k6IEC/9XdKq/FKc2eWaDIPWrTSiZeCS kTxdRlT3IX0p9AMetbYk6o5qFHkV8dfNSfraoy/FLTy9Hvc7FnKJKNQvcD/NXr7+mGkZ HoY5O4wGQFR9/U9qaOpI7Jin8JGnArN63gjFwVB5qFnCp2PapHHwL0cCm6WQGgfxNJ4S uny4oKTON/QDvfko54G+HzXFIN6go+HlXZGRrmNuzr398E6dQyo/bFIzR9vRktByS+iJ uPzqmj7HMSxXHiYf+JWsAgIiUWD3bjEsaLBX4jXBOUWkkLFH0z0S01VuSLLDk+XaorZi EMFg== X-Gm-Message-State: APjAAAWcD5iq8wl7iQbGyNPj0OeJUJm0zf3u02Y120dvVfJdF1A2z+nH IIGUr0z7pa8ynRnRCnjqP0M= X-Received: by 2002:a63:b20f:: with SMTP id x15mr20450987pge.453.1568007744641; Sun, 08 Sep 2019 22:42:24 -0700 (PDT) Received: from LGEARND20B15 ([27.122.242.75]) by smtp.gmail.com with ESMTPSA id h66sm22763016pjb.0.2019.09.08.22.42.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Sep 2019 22:42:24 -0700 (PDT) Date: Mon, 9 Sep 2019 14:42:19 +0900 From: Austin Kim To: aacraid@microsemi.com, jejb@linux.ibm.com, martin.petersen@oracle.com Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org Subject: [PATCH] scsi: dpt_i2o: drop unnecessary comparison statement Message-ID: <20190909054219.GA119246@LGEARND20B15> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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