From patchwork Sun Oct 8 21:47:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christos Gkekas X-Patchwork-Id: 9992021 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A224260364 for ; Sun, 8 Oct 2017 21:47:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A7EB28543 for ; Sun, 8 Oct 2017 21:47:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F33D285A5; Sun, 8 Oct 2017 21:47:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4669928599 for ; Sun, 8 Oct 2017 21:47:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752060AbdJHVrw (ORCPT ); Sun, 8 Oct 2017 17:47:52 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:38131 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751214AbdJHVrv (ORCPT ); Sun, 8 Oct 2017 17:47:51 -0400 Received: by mail-wm0-f67.google.com with SMTP id q124so18436969wmb.5; Sun, 08 Oct 2017 14:47:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=8+eLXwtz/PZbLb4LjAW1yJO5sV8KcSdrBBDsviywHbQ=; b=ShZriyxP/Wzci+HE0fkUVvg5Z3kfcOubvi8rNVhSeP8TKy2Ahz7gQPppA0bcx/7P3H ig9GJBO9mmHtKfYKNjCFkKQvNAskzJLxCbBA01fH8q/JuHtduPdbXcOWc6mwEtR9JOzM HnBWA7y56NgbKyRoASv6KTMpJDGq3CMl0v2IL4IWXa96rrU9/0dZ/hU0fqJMw7xgiOnC qbZh2IT9McM3/lP/IzlewDtlJ6U2QoFzvwtFRUgTiG+Odwclx6+gjCgTnPTmzr9jHIm0 BA40BrcoiWm7YtdSTQRfZuKEX8gqm3hQ69gGzZiJVHmXr1BPcXWfZoUshTiESd2IMZmH lrXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=8+eLXwtz/PZbLb4LjAW1yJO5sV8KcSdrBBDsviywHbQ=; b=atvobSMh/2WJY0gUKW6eJYINU6gFr2waPmQjsJyMNKH7N2QTb4t4J4QD9mcTr2gvVl zhsP/DhBWDfB279FnwXSQrXjzI0bj9VORkZ/DtvgBwjNlHGaLBpcdtBs+6tSPTMVBwsz fe4JK4Lrq2vwUAtEtdY9SWNqgifzr+Lr5NE14pWUHSx0Y0FUa+Iavdt4uM7ugid/K937 Jp9ihMISmpAzs7qxZIoM4RZb26ydku/EhiuIvK55bh2M027dGjYgcyMRs8YEDbg2lfhp cokYRn3oQiTSAGKAL98Rgtqq8q241tO4cQbODh/LLO9S2VOs1sGCRBrbyJIUBvWI5gOr exYQ== X-Gm-Message-State: AMCzsaXpoAV0NCJbnqw6L3hG52zX/1QljzaGdJwcEY/RgmQ4ZOy2Qw// mXgAFIhJgoSOcSzpk19PIz8= X-Google-Smtp-Source: AOwi7QDiCQXEjFNZviGcPzsTANfEsZDOefQmXSBAmRPWmCyEqHS/JIYZc2cRGHP+HSKYqXNvD/0yCw== X-Received: by 10.223.134.93 with SMTP id 29mr8349421wrw.60.1507499269943; Sun, 08 Oct 2017 14:47:49 -0700 (PDT) Received: from inspiron ([2a02:c7d:5e0c:c300:61ec:ecf7:55fa:ca9a]) by smtp.gmail.com with ESMTPSA id k105sm11547993wrc.90.2017.10.08.14.47.48 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 08 Oct 2017 14:47:48 -0700 (PDT) From: Christos Gkekas To: Dario Ballabio , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Christos Gkekas Subject: [PATCH] scsi: eata: Remove unnecessary cpp_index check Date: Sun, 8 Oct 2017 22:47:46 +0100 Message-Id: <1507499266-10410-1-git-send-email-chris.gekas@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Variable spp->cpp_index is unsigned so checking whether it is less than zero is redundant. Signed-off-by: Christos Gkekas --- drivers/scsi/eata.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c index 6501c33..53a8fcd 100644 --- a/drivers/scsi/eata.c +++ b/drivers/scsi/eata.c @@ -2332,12 +2332,11 @@ static irqreturn_t ihdlr(struct Scsi_Host *shost) printk ("%s: ihdlr, spp->eoc == 0, irq %d, reg 0x%x, count %d.\n", ha->board_name, irq, reg, ha->iocount); - if (spp->cpp_index < 0 || spp->cpp_index >= shost->can_queue) + if (spp->cpp_index >= shost->can_queue) printk ("%s: ihdlr, bad spp->cpp_index %d, irq %d, reg 0x%x, count %d.\n", ha->board_name, spp->cpp_index, irq, reg, ha->iocount); - if (spp->eoc == 0 || spp->cpp_index < 0 - || spp->cpp_index >= shost->can_queue) + if (spp->eoc == 0 || spp->cpp_index >= shost->can_queue) goto handled; /* Find the mailbox to be serviced on this board */