From patchwork Mon Jul 13 07:46:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 235330 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2611527ilg; Mon, 13 Jul 2020 00:48:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgRrH+4ptq66s1v6wR/O/9l2OP8wuVJSXKnjH0tyS8KbBUkrBrNRWUZzxXJ2nrTqO6/Bl8 X-Received: by 2002:a17:906:4d4c:: with SMTP id b12mr70878811ejv.506.1594626518577; Mon, 13 Jul 2020 00:48:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594626518; cv=none; d=google.com; s=arc-20160816; b=ye2AIvF37n05G9bl0cNuHX+QvQ9dmOOw7t81yZON30wX4v9OvyyTcmrjSJqHPQYkaL Un/3SUAEvcDLMmCKHFmexAUMP+b0UEYfCfHs3QJDm+FSnRCzhHAg4lnNnaRwhUjh5XaN mjyKH1uMEx1xk0pY6l/O4UetnfdHkcm1t54Sk5n+HdEoFXaR4sL7yuYrNqlgWnzOcoEa FFDPBIf4HsrUSjvVfOBZlB2eC4NeMqsyzDl3k5pM7YtBwIQ+QRPmat9/IoWVn7dbcFiX aA2Adz19fxoJRpWSehjW207W0rD6qPx5KgZZJu4NFQ5jISTipDk3aN770G1setDr+cPX Qblg== 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=8R5JqiLjYcza4fbV6goyYqcdxR7v8Q2JkVSQFyfGqhI=; b=BNv9agTRcAOnpiCyfu1QazZP8AeojynHZL/hkWzPUSlXi6/PAqULDd64UGLaU3Eksi X/Q/Lfg23vLvl9Gr5UiA1IASG7WL8yBW4ufBfh9FZmuJdn7x0g9SWYXPt17vZIjOcQxv IRjQh+/Wj+pvcFxA6E6v9Nb2JQOCF8k0IwdAY0PzJ1uB6ehv+pYuL1vdcQKYxjFbjCgM /K7qrWhRqSu2m5K2URl6J2Z/nxqXz/YG6t9twcsC6lmMgaHH7yBMiSdZ2Z+LR7ye09Z+ vKRV545MThmSwl7blyLqsW+D7yC8ohsefWMO46ZS5NO8zROUNiSFXEvAKWuDkfxfwbnn bPxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=udRqTFtV; 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 bt23si8303152edb.545.2020.07.13.00.48.38 for ; Mon, 13 Jul 2020 00:48:38 -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=udRqTFtV; 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 S1729155AbgGMHrB (ORCPT ); Mon, 13 Jul 2020 03:47:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729115AbgGMHq7 (ORCPT ); Mon, 13 Jul 2020 03:46:59 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E91AC061794 for ; Mon, 13 Jul 2020 00:46:58 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id f7so14681547wrw.1 for ; Mon, 13 Jul 2020 00:46:58 -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=8R5JqiLjYcza4fbV6goyYqcdxR7v8Q2JkVSQFyfGqhI=; b=udRqTFtVMJHrG8FeYyUiq433O2fFQWC945bPEuJp10f4RrlpzSBC3G1uT3JrWYA1z+ KkuTTQHCBdHe1LYCAy/Iu3gl9yKuqzR0//GRW+h8lH+KZWAZK605JeIx5pB2kAKHOSXI V335Wh3pK7UbDMZzCDpcb1FmsQkI8K+4bAYGhygGqjF9tBjGZSaj7UJQVmYRRKniBfXr SCBIkyICY6k35WAoLl9qqCFZJfpliOIQY1ByScnoV6kBjLvUTTfL9aJVq/QlI5KXWYzP VMQdVskZjbYEcfJ7cJY+OgjrxcgZjB6XG39HbAY8rYrFvKZnFv+LkC0PtP30tOSv65uW AZqg== 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=8R5JqiLjYcza4fbV6goyYqcdxR7v8Q2JkVSQFyfGqhI=; b=PpZq4lRDyzHjvrQeJOZ4qyHwpb6InMpr8mTh+HUHGKWWgSOAOWNiUdcy56eXCNLy6D 8sCfehgjiwMmNjGxhkU2y1VxzmYpaRW6VsbblBGNHh1S7rrR/mXjh32SzS6yDQsxs953 Xzz90DVcJz9UUcWgGarPJjQ20BvW/tyc0Xz0WHTWyxtWQ8ygZXaBQSQW6L9ZtWQimllf qbWAMCqaBvh2IxQOANKecZSDq96ua2Wn0mma2XqVvJdsoY0bukiIXtyPaI6aeSuHi3d6 UOggFl62Wcdv3k9kjCjfUsyQ2JsRVpVzQrOIvJk1dVKanvA206XeVjMVGrAcxK5pTI3R E3vQ== X-Gm-Message-State: AOAM532W4LRghZ2637WujTOTBOPpb88FLZviXZZ9KolBminA3cEQAGtS HIyheMSGtC92x8Hwu2R7e1FcR8jbRYk= X-Received: by 2002:a5d:664e:: with SMTP id f14mr78870952wrw.6.1594626417338; Mon, 13 Jul 2020 00:46:57 -0700 (PDT) Received: from localhost.localdomain ([2.31.163.6]) by smtp.gmail.com with ESMTPSA id k11sm25142488wrd.23.2020.07.13.00.46.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 00:46:56 -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@cavium.com Subject: [PATCH v2 09/29] scsi: qedf: qedf_main: Remove set but not checked variable 'tmp' Date: Mon, 13 Jul 2020 08:46:25 +0100 Message-Id: <20200713074645.126138-10-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200713074645.126138-1-lee.jones@linaro.org> References: <20200713074645.126138-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 Looks like the return value of readw() has never been checked. Fixes the following W=1 kernel build warning(s): drivers/scsi/qedf/qedf_main.c: In function ‘__qedf_probe’: drivers/scsi/qedf/qedf_main.c:3203:6: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable] Cc: QLogic-Storage-Upstream@cavium.com Signed-off-by: Lee Jones --- drivers/scsi/qedf/qedf_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.25.1 diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index a77a74fad6a7e..47fc14f5ed9d7 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -3199,7 +3199,6 @@ static int __qedf_probe(struct pci_dev *pdev, int mode) void *task_start, *task_end; struct qed_slowpath_params slowpath_params; struct qed_probe_params qed_params; - u16 tmp; /* * When doing error recovery we didn't reap the lport so don't try @@ -3393,9 +3392,9 @@ static int __qedf_probe(struct pci_dev *pdev, int mode) "Writing %d to primary and secondary BDQ doorbell registers.\n", qedf->bdq_prod_idx); writew(qedf->bdq_prod_idx, qedf->bdq_primary_prod); - tmp = readw(qedf->bdq_primary_prod); + readw(qedf->bdq_primary_prod); writew(qedf->bdq_prod_idx, qedf->bdq_secondary_prod); - tmp = readw(qedf->bdq_secondary_prod); + readw(qedf->bdq_secondary_prod); qed_ops->common->set_power_state(qedf->cdev, PCI_D0);