From patchwork Thu Jul 23 12:24:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 247066 Delivered-To: patch@linaro.org Received: by 2002:a54:2c11:0:0:0:0:0 with SMTP id g17csp1149195ecp; Thu, 23 Jul 2020 05:27:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZ2V754H7YMeqzEElHr2iJRJDhG9SX65XDLYfFFvQ/hN9IFj2M5yNYYpEN6u4bjToW6xgu X-Received: by 2002:a17:906:97d7:: with SMTP id ef23mr4231409ejb.450.1595507235893; Thu, 23 Jul 2020 05:27:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595507235; cv=none; d=google.com; s=arc-20160816; b=l5oOVgimeE0rUWU9aBRu3DpvRItxs5swnbuGODquamnb9kK+Ye8AirPSgGe84WC2LM wMPTLxnkLmnVubpFLBS+BQT9h+YkBC27wTmn9gK5SmHrWfuTftM6YnDqssbDyittC2NW A7WzT2Gwp6P8VXbA8IKc244XS2wnkdcR78I9XPp3fpltSZ1x+R2wCykwtFNWK2nteJlw GoXy7Cti+1VJNI4ICjLOMkzkWUwtojKWxUeO1THxouR0gKLoGd9M5yFhesYmXBFMPbfZ kLlI8fvHkOAUUTnSDKDpraNa+EJt+GYHAOkB0lySl4CtEaWQ5tOcc+yYCsgKP5uFUcBw NZGg== 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=/UGwSSOfVJ61ieGuJp/ke+Vy79kXqOUhlL6mzdoMYJw=; b=vPf3CQ71uzYribz5j5DcYXF6xUrtBoF311gHRmxfFG2SVhBoParDSVcqVhMqEDld5N g7C6QbltItUxwAyz3uqKb3WpIZb9ZIGXONlXaq/4T+8ZqS4IBSpbpEHjTdHRnyMk3Uxh 73NrgmrBR9eCkdP7Wfh50CVmaT9Gneu06weuZypGG4kRr9v2OfNYJX2OIsGaHnsDAVsI n+oS/ud6KHtxtBYMrrgKrlWSH2QEEzvxCSMddLsxYhCe3QWewKnM3rjO6wut4PDmaKgu OfjbAMmbGaciXC8hat0jGDCVTPBq/Mz05sOo2bNhVD2W5/01zVk2bF/m6ztFUQmSZUmi FXrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HB08PN5O; 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 s18si1893435edx.6.2020.07.23.05.27.15 for ; Thu, 23 Jul 2020 05:27:15 -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=HB08PN5O; 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 S1729317AbgGWM06 (ORCPT ); Thu, 23 Jul 2020 08:26:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728940AbgGWMZI (ORCPT ); Thu, 23 Jul 2020 08:25:08 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E13D1C0619DC for ; Thu, 23 Jul 2020 05:25:07 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id f139so4998184wmf.5 for ; Thu, 23 Jul 2020 05:25:07 -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=/UGwSSOfVJ61ieGuJp/ke+Vy79kXqOUhlL6mzdoMYJw=; b=HB08PN5OpZSPQg8TKcCyb9s+OvOQTkDdUf13RCod8CSlkh4gkBoNHy7qbGNR5E5TO4 bxhN/ORl9XKEt9TAYCm8ePdCpHQfuRfreiRN0lraY+8t8nOYVI8xD+et9nuvfv6fPMRa O4NBBI0KQyJJ7iK5d1G2X/sjUq0ROZ2Wdd8XBzMmINzzs/dXTs3Azq/6GsXSZB9cuyfm DoxW05DgTVX04SVdwwCM+kvxJqJxb+UU6UZtWcg5Ivn5I1SZvYW9nSP+ksHgw3bNyj6+ RpdeMM0Ahh+aYDYmkwCPq5sbCf76U8OoqVaPtGXy60YTfg07xmJyHJHnGn/8KnO94LQf gQoA== 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=/UGwSSOfVJ61ieGuJp/ke+Vy79kXqOUhlL6mzdoMYJw=; b=dBYFgVlW4PJkX29JLq4+cAwIsbxQY339u2FuWlOIJFUr30LBjKLb+MuEBJBPw5VjXf 74RRIkWTa9GduAIdJyaLnoFM1aykoUNqd2gpLCbvGHdgrmYC/kr0+CVaLPXmjA9HPGnj 6anIZUqnhV/BCJqUrLMTUzgbJeEFN4Mwashup3S/UhphEuu30qj94kqfxZ4wF4l0B8T1 P7FH0Ouilp8pAWOMOHFpRZX020vxCOBflpGfZarJJNc6JM2noyjMs2WpYqFzC9Djix8v 1ETo9OHlXjSCtTocsfLLdITKbfTKRdFWF2XcZBC7LULJ2yHMDCxoLZaUOipeCKU2z5Ci 7/Dg== X-Gm-Message-State: AOAM533lkbTu77kkVd6RUhyjuWkai09Wr5mcNQ7c3AGaAHcG5bXkvsxJ Kb/Is+yq2NRDyNYVQ6vbaDb5WQ== X-Received: by 2002:a1c:2183:: with SMTP id h125mr4212886wmh.83.1595507106549; Thu, 23 Jul 2020 05:25:06 -0700 (PDT) Received: from localhost.localdomain ([2.27.167.73]) by smtp.gmail.com with ESMTPSA id j5sm3510651wma.45.2020.07.23.05.25.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jul 2020 05:25:05 -0700 (PDT) From: Lee Jones To: jejb@linux.ibm.com, martin.petersen@oracle.com Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, Lee Jones , QLogic-Storage-Upstream@qlogic.com Subject: [PATCH 14/40] scsi: qla4xxx: ql4_83xx: Remove set but unused variable 'status' Date: Thu, 23 Jul 2020 13:24:20 +0100 Message-Id: <20200723122446.1329773-15-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200723122446.1329773-1-lee.jones@linaro.org> References: <20200723122446.1329773-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 Fixes the following W=1 kernel build warning(s): drivers/scsi/qla4xxx/ql4_83xx.c: In function ‘qla4_83xx_dump_pause_control_regs’: drivers/scsi/qla4xxx/ql4_83xx.c:1409:9: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] 1409 | int i, status = QLA_SUCCESS; | ^~~~~~ Cc: QLogic-Storage-Upstream@qlogic.com Signed-off-by: Lee Jones --- drivers/scsi/qla4xxx/ql4_83xx.c | 34 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 22 deletions(-) -- 2.25.1 diff --git a/drivers/scsi/qla4xxx/ql4_83xx.c b/drivers/scsi/qla4xxx/ql4_83xx.c index 638f72c5ab052..de10e67de8c01 100644 --- a/drivers/scsi/qla4xxx/ql4_83xx.c +++ b/drivers/scsi/qla4xxx/ql4_83xx.c @@ -1406,16 +1406,16 @@ int qla4_83xx_isp_reset(struct scsi_qla_host *ha) static void qla4_83xx_dump_pause_control_regs(struct scsi_qla_host *ha) { u32 val = 0, val1 = 0; - int i, status = QLA_SUCCESS; + int i; - status = qla4_83xx_rd_reg_indirect(ha, QLA83XX_SRE_SHIM_CONTROL, &val); + qla4_83xx_rd_reg_indirect(ha, QLA83XX_SRE_SHIM_CONTROL, &val); DEBUG2(ql4_printk(KERN_INFO, ha, "SRE-Shim Ctrl:0x%x\n", val)); /* Port 0 Rx Buffer Pause Threshold Registers. */ DEBUG2(ql4_printk(KERN_INFO, ha, "Port 0 Rx Buffer Pause Threshold Registers[TC7..TC0]:")); for (i = 0; i < 8; i++) { - status = qla4_83xx_rd_reg_indirect(ha, + qla4_83xx_rd_reg_indirect(ha, QLA83XX_PORT0_RXB_PAUSE_THRS + (i * 0x4), &val); DEBUG2(pr_info("0x%x ", val)); } @@ -1426,7 +1426,7 @@ static void qla4_83xx_dump_pause_control_regs(struct scsi_qla_host *ha) DEBUG2(ql4_printk(KERN_INFO, ha, "Port 1 Rx Buffer Pause Threshold Registers[TC7..TC0]:")); for (i = 0; i < 8; i++) { - status = qla4_83xx_rd_reg_indirect(ha, + qla4_83xx_rd_reg_indirect(ha, QLA83XX_PORT1_RXB_PAUSE_THRS + (i * 0x4), &val); DEBUG2(pr_info("0x%x ", val)); } @@ -1437,7 +1437,7 @@ static void qla4_83xx_dump_pause_control_regs(struct scsi_qla_host *ha) DEBUG2(ql4_printk(KERN_INFO, ha, "Port 0 RxB Traffic Class Max Cell Registers[3..0]:")); for (i = 0; i < 4; i++) { - status = qla4_83xx_rd_reg_indirect(ha, + qla4_83xx_rd_reg_indirect(ha, QLA83XX_PORT0_RXB_TC_MAX_CELL + (i * 0x4), &val); DEBUG2(pr_info("0x%x ", val)); } @@ -1448,7 +1448,7 @@ static void qla4_83xx_dump_pause_control_regs(struct scsi_qla_host *ha) DEBUG2(ql4_printk(KERN_INFO, ha, "Port 1 RxB Traffic Class Max Cell Registers[3..0]:")); for (i = 0; i < 4; i++) { - status = qla4_83xx_rd_reg_indirect(ha, + qla4_83xx_rd_reg_indirect(ha, QLA83XX_PORT1_RXB_TC_MAX_CELL + (i * 0x4), &val); DEBUG2(pr_info("0x%x ", val)); } @@ -1459,15 +1459,11 @@ static void qla4_83xx_dump_pause_control_regs(struct scsi_qla_host *ha) DEBUG2(ql4_printk(KERN_INFO, ha, "Port 0 RxB Rx Traffic Class Stats [TC7..TC0]")); for (i = 7; i >= 0; i--) { - status = qla4_83xx_rd_reg_indirect(ha, - QLA83XX_PORT0_RXB_TC_STATS, - &val); + qla4_83xx_rd_reg_indirect(ha, QLA83XX_PORT0_RXB_TC_STATS, &val); val &= ~(0x7 << 29); /* Reset bits 29 to 31 */ qla4_83xx_wr_reg_indirect(ha, QLA83XX_PORT0_RXB_TC_STATS, (val | (i << 29))); - status = qla4_83xx_rd_reg_indirect(ha, - QLA83XX_PORT0_RXB_TC_STATS, - &val); + qla4_83xx_rd_reg_indirect(ha, QLA83XX_PORT0_RXB_TC_STATS, &val); DEBUG2(pr_info("0x%x ", val)); } @@ -1477,24 +1473,18 @@ static void qla4_83xx_dump_pause_control_regs(struct scsi_qla_host *ha) DEBUG2(ql4_printk(KERN_INFO, ha, "Port 1 RxB Rx Traffic Class Stats [TC7..TC0]")); for (i = 7; i >= 0; i--) { - status = qla4_83xx_rd_reg_indirect(ha, - QLA83XX_PORT1_RXB_TC_STATS, - &val); + qla4_83xx_rd_reg_indirect(ha, QLA83XX_PORT1_RXB_TC_STATS, &val); val &= ~(0x7 << 29); /* Reset bits 29 to 31 */ qla4_83xx_wr_reg_indirect(ha, QLA83XX_PORT1_RXB_TC_STATS, (val | (i << 29))); - status = qla4_83xx_rd_reg_indirect(ha, - QLA83XX_PORT1_RXB_TC_STATS, - &val); + qla4_83xx_rd_reg_indirect(ha, QLA83XX_PORT1_RXB_TC_STATS, &val); DEBUG2(pr_info("0x%x ", val)); } DEBUG2(pr_info("\n")); - status = qla4_83xx_rd_reg_indirect(ha, QLA83XX_PORT2_IFB_PAUSE_THRS, - &val); - status = qla4_83xx_rd_reg_indirect(ha, QLA83XX_PORT3_IFB_PAUSE_THRS, - &val1); + qla4_83xx_rd_reg_indirect(ha, QLA83XX_PORT2_IFB_PAUSE_THRS, &val); + qla4_83xx_rd_reg_indirect(ha, QLA83XX_PORT3_IFB_PAUSE_THRS, &val1); DEBUG2(ql4_printk(KERN_INFO, ha, "IFB-Pause Thresholds: Port 2:0x%x, Port 3:0x%x\n",