From patchwork Fri Oct 30 18:22:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 7528601 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 735F39F2F7 for ; Fri, 30 Oct 2015 18:23:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8AB7720709 for ; Fri, 30 Oct 2015 18:23:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9F97620585 for ; Fri, 30 Oct 2015 18:23:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760401AbbJ3SX1 (ORCPT ); Fri, 30 Oct 2015 14:23:27 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:33363 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760394AbbJ3SXY (ORCPT ); Fri, 30 Oct 2015 14:23:24 -0400 Received: by padhy1 with SMTP id hy1so75210139pad.0 for ; Fri, 30 Oct 2015 11:23:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical_com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=sWS4hlnFejY9d772YPRDEFlTaw/oF3ApGn85mLLNjdc=; b=MWZ4z5b7LVVnrKQZd6z5sWwgeJ4oTHdxET4XbUoB9J7hdxvc7Rs6PDOJ4VGggC2waM mKHABKoBaW7QA/6a9P+poyfl2dARt1xFJ6CtU+cQqVkRSpadGKhsvluSoXHhk0wCiYbT TP7Z2wn6N73No2NrCh9A/95Ozsm+akLhLYVplk0cNYMmuqXsl/vM5hzEougfwvH/zwkv TJeJ8kKHQiVE6U0Wvk+2+WdxX2ZDKsKOfyT3R61PLR7mteTFw2595oa1hGPo+ag1p+Ov OG1N5RXMAYuaAbM7OrHCTjjcY4VuSX7OQ3vGwqdB+ekSsPHrgwvdPIMKxZwSJ7BFjPY4 rgdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=sWS4hlnFejY9d772YPRDEFlTaw/oF3ApGn85mLLNjdc=; b=AwWv+y1XPC4RYKd9J3jrIDFhb3vtic/E9emwCMGXJGZl7LHBiSvATNptxxgvh4+UFm NGcp2+wL7zJCI3StGwPSX/1T3yvysmfGjpiTBN41uY4+E01uksKwaK+Aro0tSUiNPGtD EzTnebDtDQ/rQ0rJd3gByKWfUrbXadsRW36FCZqRfyIWuKfkKliPBcAIyRZ7DopRoPL6 aE9dE1mEu5R6Y4xo90GMATPGQ7pDqfu1K70E6uZxt0PC933wB25nmxw2ki9Xc9evzmfh 9nLtxRYSVmOiQ4w1348HGXrWqUJA2RSDNnidzWPiM/LD3zFbd+wMDH7IohIIQe6Za3tc nnew== X-Gm-Message-State: ALoCoQn7Jsox4tkjTtxjeOiG3RifZhT92pmT6nm1tB8ZkYySVPPNBY/a6UEu3Pg6G9J0fL7ZArMl X-Received: by 10.68.69.15 with SMTP id a15mr10453036pbu.62.1446229403796; Fri, 30 Oct 2015 11:23:23 -0700 (PDT) Received: from localhost.localdomain (host-174-45-44-32.hln-mt.client.bresnan.net. [174.45.44.32]) by smtp.gmail.com with ESMTPSA id y16sm6828639pbt.88.2015.10.30.11.23.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Oct 2015 11:23:22 -0700 (PDT) From: tim.gardner@canonical.com To: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Tim Gardner , Jayamohan Kallickal , Minh Tran , John Soni Jose , "James E.J. Bottomley" Subject: [PATCH v4.3-rc7] be2iscsi : Fix bogus WARN_ON length check Date: Fri, 30 Oct 2015 12:22:58 -0600 Message-Id: <1446229378-2956-1-git-send-email-tim.gardner@canonical.com> X-Mailer: git-send-email 1.9.1 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Tim Gardner drivers/scsi/be2iscsi/be_main.c: In function 'be_sgl_create_contiguous': drivers/scsi/be2iscsi/be_main.c:3187:18: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] WARN_ON(!length > 0); gcc version 5.2.1 Cc: Jayamohan Kallickal Cc: Minh Tran Cc: John Soni Jose Cc: "James E.J. Bottomley" Signed-off-by: Tim Gardner Reviewed-by: Manoj Kumar --- drivers/scsi/be2iscsi/be_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 7a6dbfb..5cdcd29 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -3184,7 +3184,7 @@ be_sgl_create_contiguous(void *virtual_address, { WARN_ON(!virtual_address); WARN_ON(!physical_address); - WARN_ON(!length > 0); + WARN_ON(!length); WARN_ON(!sgl); sgl->va = virtual_address;