From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A99C745C7A; Tue, 12 Nov 2024 18:46:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1184C40655; Tue, 12 Nov 2024 18:46:30 +0100 (CET) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mails.dpdk.org (Postfix) with ESMTP id 38965402E2 for ; Tue, 12 Nov 2024 18:46:27 +0100 (CET) Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-7240d93fffdso5065403b3a.2 for ; Tue, 12 Nov 2024 09:46:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731433586; x=1732038386; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=RDZl1u8almJRWOlYCRFO53F3q2kGAICE5TeKhTqscIQ=; b=ObSl0PIPxTmKvBYDYTVdaFvRKFTcLFR9pvemA+jPcNd8ukEYpeIQWHk8meTUXMDYkb ///gXUOryEFkNxeWpJ+/CQUW7Kel3FqarBgOjefySboQcaj7VqF9renrNarNyqAHa6fI qjlw/4Lb/yDs7Xzuwl1p9z4U/qKO/a+peqE4eYJz1ZidMz7bO0IuscvmmacA//cwT8Vv RJTWcQxGUevkZUOcXYtbMvwy7+KE7xy5cxeJdH09hu6KCuAZNqYiQHZsUxqvzgq/Upbv VSBw2VCy8MNS2TrI/fIh7yVQyMGcIVTmOPJiU6KksNrfXrMC53n7gkLisL9MndccbLo4 N7gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731433586; x=1732038386; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RDZl1u8almJRWOlYCRFO53F3q2kGAICE5TeKhTqscIQ=; b=linOLV0/GPMs+WeDUNrhcXi2kHAVCadTG/Gc8UzMjfAnibQOeXlfViL07tv+LA7X8S pFWrvlhplXV1DvxRGNhkIXA1tem/kMmKZycymzcNCZPfuTV4ROF3HnydB1PyNzGA70BL 78Ikra0l0mOjGln826a8iPce+gXhYO/W9tFcvo7d/wPnJB1BsNmL0GnDA2gf2zQkRJ5g GjAm1I74ChMTY74Cj7Z+VB5YL74n5DXcBkkqHmbEH8h0N4g4Tn38v03ROKboKuKQZbZ1 3/KQNasSTDrYqiCInW3B2BVmx1ZmqT/G3SIqdcY6iVEE6kmAVpX6hZ/5Od96Y0Np9PV8 8HAw== X-Gm-Message-State: AOJu0YysKyJLBhQ3vFlDBvgW5dKtH4y4MyO4GUVQBwSMxKB38cO/cmfj q2DbVm73s9B73Nhm7eDb+RvCEWc8MjX5ie0/ZYkZX2WekUD5ZmQ8U2tdYw3Sy4HlyGKkIUsx0N0 nPkw= X-Google-Smtp-Source: AGHT+IEoI11ZCydjolw37QYZS4VbkdsKtjAkZxF6YkYCRyo3HiT8SRXUZpxngdmL2cnN76+we6q3PA== X-Received: by 2002:a05:6a00:4fd0:b0:71e:4c01:b3da with SMTP id d2e1a72fcca58-724132618c6mr21686839b3a.5.1731433586380; Tue, 12 Nov 2024 09:46:26 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72407863dd8sm11846758b3a.26.2024.11.12.09.46.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 09:46:25 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Julien Aube , Harish Patil Subject: [PATCH 2/4] net/bnx2x: fix always true expression Date: Tue, 12 Nov 2024 09:43:54 -0800 Message-ID: <20241112174613.326565-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241112174613.326565-1-stephen@networkplumber.org> References: <20241112174613.326565-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Coverity spotted that the check to enable single interrupt mode would evaluate as always true since: The or condition sc->interrupt_mode != 2 || sc->interrupt_mode != 3 will always be true because sc->interrupt_mode cannot be equal to two different values at the same time, so it must be not equal to at least one of them. Coverity issue: 362046 Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Stephen Hemminger --- drivers/net/bnx2x/bnx2x.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c index 3153cc4d80..af31ac4604 100644 --- a/drivers/net/bnx2x/bnx2x.c +++ b/drivers/net/bnx2x/bnx2x.c @@ -11189,11 +11189,9 @@ static int bnx2x_init_hw_func(struct bnx2x_softc *sc) /* Turn on a single ISR mode in IGU if driver is going to use * INT#x or MSI */ - if ((sc->interrupt_mode != INTR_MODE_MSIX) - || (sc->interrupt_mode != INTR_MODE_SINGLE_MSIX)) { + if (sc->interrupt_mode == INTR_MODE_INTX || + sc->interrupt_mode == INTR_MODE_MSI) pf_conf |= IGU_PF_CONF_SINGLE_ISR_EN; - } - /* * Timers workaround bug: function init part. * Need to wait 20msec after initializing ILT, -- 2.45.2