From patchwork Thu Jul 9 17:45:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 235163 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp1631443ilg; Thu, 9 Jul 2020 10:46:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzX622YWU8mXIaBE/xC9yjwCguBnLX8eKnz09lbnSLr5XkfNO2s7uxbrfH0sfPl3z99WY+3 X-Received: by 2002:a17:906:cd2:: with SMTP id l18mr59903196ejh.18.1594316766627; Thu, 09 Jul 2020 10:46:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594316766; cv=none; d=google.com; s=arc-20160816; b=BLPyVl+dsA/LGXBVqQGsLKf9pxlbLRq0J5zzlL9EOmDAoZWuSg0COlcHsEPRnNyw5G D39MXRCHsgWsXIxnxlzD5VQisT9RsDzoR5ggcAe7PMhzPeVqjOr/SsAQv8V3X6wHOVds u6/3mVc01M8ECsLqRdu0Tzgqsw8lfqwypmDXqcz56AByY41lAwImIigRHriYM1AvCV9v salZD8wNgLBFRCEFpjr1BLtUVGyFEmgTa5EWFFIU5S5wGsHF+3DVSZNlZ1Xubs2/Udjc 12ElST0yIgEJG2H9kWcHW1ECnbNql5fsnbLnnd+zPfaw+ZFvsA1eFlfCpo+BLPn0CMsy E3KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=z87wYd9sTBTgWM4PfTqIXybXjZhO9Ay2HDdpb30MaC4=; b=eOKPrxL2DJiXj6yijJHOHlcJiq5fjcrNmbYB/bznGqu0kTjaUsnHBNLdpeBhDzmYui G6cloDUTpd9YXMFIbNRV56UtgTan+JnTJK3qid0Fr3CHn0EsBADZWVBfVMhfBPoJ+Evi hsFTp+NWab2/IpbUZ9+EvhojTkNtcjsny9jZBqC3+89zX5Y2WH9j3FpmfM96N/yCuZXb NSQwA474hs6eV5Iub5supGkfQS0YJHMv4ezWE0DA+FYGMu0CRiUscQZhedHmSNBFh3O2 KZz9uXM7Drjvh0P09P+qHGde9yrJvv3NDBL6Hui5OkXLyRwta5YdyBkfsn+XFaiufVr0 CHcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jRYy5lBl; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn22si2359666edb.477.2020.07.09.10.46.06 for ; Thu, 09 Jul 2020 10:46:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jRYy5lBl; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728459AbgGIRqF (ORCPT ); Thu, 9 Jul 2020 13:46:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728398AbgGIRqD (ORCPT ); Thu, 9 Jul 2020 13:46:03 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5197BC08C5CE for ; Thu, 9 Jul 2020 10:46:03 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id z13so3293305wrw.5 for ; Thu, 09 Jul 2020 10:46:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=z87wYd9sTBTgWM4PfTqIXybXjZhO9Ay2HDdpb30MaC4=; b=jRYy5lBldTck93hbAO3wZOubSpIDvgxm3p1B5mF4K1ZUKb6VnlFqm/ru/Al4l+4Cp6 OfVsOsS549wwYMyKyt46/ZPKciS+cIHAYULljGRITq61EvjFy3fScyXk8bVuVG3k+h/y uZhg8NaPwvGFFwT3L3XsoExEgiFYFAp71MrF65x1/NttAniy2EUVaGlP0QPsNKl3Z7Td eNndREpoHeiexDIf8YAnVnHJjNu5eZZxycDg0ixlToq/M94/6xP5pJ7xMaDJHiE+6Dq/ r1lXHBi3y26nN2Q7Wg8WF2049yUL9eWi6Ao2dodogn55PmiaLKxuFqltNGNBZLuCBbAS zQdA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=z87wYd9sTBTgWM4PfTqIXybXjZhO9Ay2HDdpb30MaC4=; b=enqc3KWe50eeU0eFJHl5J6+Sr++KBnB0cmS6XKsrjKtdqGj1VVDFFrhYDDh1X8XAe/ ZR6FzqGjiq4D7l7SJZCLNE5l23PuSr82HFV5N7FVnW8xKS6rfRP0EFufKdM8c3NYtx6D lz/dpL2JuGFiv15lZyLvMj/kQuIIHGXuchtWLrB1qhkZTajcvv+hVAAblY6wLqYwSp6A io9PpW1cQ/9PWGtN1+nArLC7tr9XkOH1qHFrCFVPt2ucEu6opVEod0W5ONDFrYXLY3mm mMYiHrENAxQo/JbIQph3TQtVzV5Eg4DQNBLTDj4Iu0pTygN+cpmKaMKeAFSwHw15bNij 30ig== X-Gm-Message-State: AOAM531Pk6/TK2t0RukSubcCsKbSrGChGMd0IOlnrJ+NY6ptw5naC4sL Aj9wdtw3WZ3zGfXe7DLYKqpZtA== X-Received: by 2002:adf:ef89:: with SMTP id d9mr68461569wro.124.1594316762040; Thu, 09 Jul 2020 10:46:02 -0700 (PDT) Received: from localhost.localdomain ([2.27.35.206]) by smtp.gmail.com with ESMTPSA id f15sm6063854wrx.91.2020.07.09.10.46.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jul 2020 10:46:01 -0700 (PDT) From: Lee Jones To: jejb@linux.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Lee Jones , Adaptec OEM Raid Solutions , "PMC-Sierra, Inc" Subject: [PATCH 03/24] scsi: aacraid: dpcsup: Fix logical bug when !DBG Date: Thu, 9 Jul 2020 18:45:35 +0100 Message-Id: <20200709174556.7651-4-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200709174556.7651-1-lee.jones@linaro.org> References: <20200709174556.7651-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org When DBG is not enabled FIB_COUNTER_INCREMENT() results in an empty statement, leaving the contents of if() and else() empty. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/dpcsup.c: In function ‘aac_response_normal’: drivers/scsi/aacraid/dpcsup.c:105:50: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] 105 | FIB_COUNTER_INCREMENT(aac_config.AsyncRecved); | ^ drivers/scsi/aacraid/dpcsup.c: In function ‘aac_intr_normal’: drivers/scsi/aacraid/dpcsup.c:411:30: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] 411 | aac_config.AsyncRecved); | ^ Cc: Adaptec OEM Raid Solutions Cc: "PMC-Sierra, Inc" Signed-off-by: Lee Jones --- drivers/scsi/aacraid/dpcsup.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) -- 2.25.1 diff --git a/drivers/scsi/aacraid/dpcsup.c b/drivers/scsi/aacraid/dpcsup.c index a557aa629827e..25ebb94368f2c 100644 --- a/drivers/scsi/aacraid/dpcsup.c +++ b/drivers/scsi/aacraid/dpcsup.c @@ -99,10 +99,11 @@ unsigned int aac_response_normal(struct aac_queue * q) } if (hwfib->header.XferState & cpu_to_le32(NoResponseExpected | Async)) { - if (hwfib->header.XferState & cpu_to_le32(NoResponseExpected)) + if (hwfib->header.XferState & cpu_to_le32(NoResponseExpected)) { FIB_COUNTER_INCREMENT(aac_config.NoResponseRecved); - else + } else { FIB_COUNTER_INCREMENT(aac_config.AsyncRecved); + } /* * NOTE: we cannot touch the fib after this * call, because it may have been deallocated. @@ -403,12 +404,13 @@ unsigned int aac_intr_normal(struct aac_dev *dev, u32 index, int isAif, if (hwfib->header.XferState & cpu_to_le32(NoResponseExpected | Async)) { if (hwfib->header.XferState & cpu_to_le32( - NoResponseExpected)) + NoResponseExpected)) { FIB_COUNTER_INCREMENT( aac_config.NoResponseRecved); - else + } else { FIB_COUNTER_INCREMENT( aac_config.AsyncRecved); + } start_callback = 1; } else { unsigned long flagv;