From patchwork Thu Jan 4 12:57:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suganath Prabu S X-Patchwork-Id: 10144693 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 62CC36034B for ; Thu, 4 Jan 2018 12:57:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50CE92817F for ; Thu, 4 Jan 2018 12:57:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4586028635; Thu, 4 Jan 2018 12:57:39 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI 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 D9D282817F for ; Thu, 4 Jan 2018 12:57:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752679AbeADM5h (ORCPT ); Thu, 4 Jan 2018 07:57:37 -0500 Received: from mail-qk0-f196.google.com ([209.85.220.196]:42675 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752690AbeADM5f (ORCPT ); Thu, 4 Jan 2018 07:57:35 -0500 Received: by mail-qk0-f196.google.com with SMTP id d202so1772214qkc.9 for ; Thu, 04 Jan 2018 04:57:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=w38pNbzXNAjj01usR6qW7XVP/p5TeIbmbPtdO8xW538=; b=AvpUCc0HCudPo7sxzJJQVGNpusDvnwlmz9zkLJ+kLrTGIQNmnEX5zZRyDkTJTI+p9J C5Ra3qUEqvP1W926/8kEjiBCcMLXroedwxljNPLeYgsQevYS6ktxhmuJ2HwNYwVYQ2yC JMFUytAWhl0VGtzgpK5P4qeh3IPegq7nPp1B8= 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; bh=w38pNbzXNAjj01usR6qW7XVP/p5TeIbmbPtdO8xW538=; b=OSOJ4j5cqjebNT6BrEZL6HMy8+gVX7oIZj7oOMcw9Y69PQGGSuyTu6U9AOHbbYYXbH h6NMF7XvDnb1X+Yd3+VSHnT6bwXyVYwsUyk2QBeHu2DAwALf4c4/lG04GfCbxLPZnmRW 465lax29LiS4kScHza9t2DvRoCkO+CAkyqfuZL+N/+4wbG4WxLu8Uly5kjSSkAJXMHzL zzEtNcaP7JnIvGXnAwxShxqWEwW0OgSf678uZTkjPTjF8GkhXc8AbwPgpjtm0v9961qW McPdIuLPcCG7kWaAF//2ArORux2nBrR13kOuOwc1j23oR78b4LuM5Ruue9cd8ZmJyCiI qGNw== X-Gm-Message-State: AKGB3mL8rOUTKTe51FGDt6XT4svN6g9Kq9qPA4lKdXyZrmEZWM7Ce3Ae 6TaUdAKG+O6EpII2l94sgfwL+CsS X-Google-Smtp-Source: ACJfBouD5sip/Q3ol5ST41siRJraR0Xcbs1F6ZoxZNkTGW9n7dcLGuHaVY3O/SZm1lqdWS1VzJB/MQ== X-Received: by 10.55.145.196 with SMTP id t187mr5837343qkd.125.1515070654481; Thu, 04 Jan 2018 04:57:34 -0800 (PST) Received: from dhcp-135-24-192-103.dhcp.broadcom.net ([192.19.239.250]) by smtp.googlemail.com with ESMTPSA id v58sm2064328qtk.18.2018.01.04.04.57.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Jan 2018 04:57:34 -0800 (PST) From: Suganath Prabu S To: linux-scsi@vger.kernel.org, linux-nvme@lists.infradead.org Cc: Sathya.Prakash@broadcom.com, sreekanth.reddy@broadcom.com, chaitra.basappa@broadcom.com, Hannes Reinecke , Hannes Reinecke , Suganath Prabu S Subject: [Resend 01/11] mpt3sas: set default value for cb_idx Date: Thu, 4 Jan 2018 04:57:01 -0800 Message-Id: <1515070631-14740-2-git-send-email-suganath-prabu.subramani@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1515070631-14740-1-git-send-email-suganath-prabu.subramani@broadcom.com> References: <1515070631-14740-1-git-send-email-suganath-prabu.subramani@broadcom.com> 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 From: Hannes Reinecke No functional change Signed-off-by: Hannes Reinecke Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 08237b8..e3857e5 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -899,7 +899,7 @@ static u8 _base_get_cb_idx(struct MPT3SAS_ADAPTER *ioc, u16 smid) { int i; - u8 cb_idx; + u8 cb_idx = 0xFF; if (smid < ioc->hi_priority_smid) { i = smid - 1; @@ -910,8 +910,7 @@ _base_get_cb_idx(struct MPT3SAS_ADAPTER *ioc, u16 smid) } else if (smid <= ioc->hba_queue_depth) { i = smid - ioc->internal_smid; cb_idx = ioc->internal_lookup[i].cb_idx; - } else - cb_idx = 0xFF; + } return cb_idx; }