Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17924570ybl; Thu, 2 Jan 2020 14:55:43 -0800 (PST) X-Google-Smtp-Source: APXvYqzVMqHMqmHQ/FZKhC0Ejx73PlXpU4pFVZB/30uT38lJkY8zxj7h3wNDcucU4ETo3aLLNaw+ X-Received: by 2002:a9d:6b03:: with SMTP id g3mr94297397otp.200.1578005743602; Thu, 02 Jan 2020 14:55:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578005743; cv=none; d=google.com; s=arc-20160816; b=NE38NCmvRCKHHoSuQCr/K2IO70RVeRbyF2kytsBU8c7Xl6/ZycRs6YKTrimC5trBgX gKC4UTxPu11bzHyrkZLlpAVZ7O5tMiENJ57aah12IjWWJS+JGCw6+8DnEPlAXqjlfY17 ozT8E3BKg6PcHnWlFqCBTTAHtlBwjWmYrHfpqn4gCee8UQ2AQJ9NnUGeBK4wROp+t/il aOWBfIwqZvLs2FkT/hDtgGQazMAqZFK20x2hoTC00kGqZHBBxNSsZLjxxKx7IzxWANjw iaDtfyFuliYMbpErID6QvHDxUafMLPoJZz+aL5eB4CaEcDS1PbCi2fsQjnHmD1akwYSQ DJcQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=eUjr2+HCbQ9LPziIMOaOWp28ig2oIj/2nUY4NAYoCuM=; b=muCbCUezoPv9l3STCvHYXACoS0HS2W/2P/y0Ab+0hjQUdAAbnIMJx68KlArzALdmKE m9XaBNX1wXHmXe/kPzVv47A7gXN8CwMYxaRuXF0j/uUemPf8aCfDES2WvHu0dmoQa1jN EEoZYnBMivzNwbMtdIV0mQuN/Jf62Lsp0E3o1y4LYvdOEh8lY+NMiMZpZ6q9k61S9jra hlGtIKszt8hjG15Y2iXAjqElNoInopFZZ4Vm0nEHKQjLguD3NWhwl/OqcPjATM1kBRCc xAfOBdmc2xFZCWhQWupGu4oqsnhsGjtlX5SYL01ZzbwRV8XCIpppJy4+/beXqGntK+Nc Nxvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=p5VY9EtI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w6si26355679oti.4.2020.01.02.14.55.32; Thu, 02 Jan 2020 14:55:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=p5VY9EtI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729414AbgABWyD (ORCPT + 99 others); Thu, 2 Jan 2020 17:54:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:39864 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727834AbgABWVL (ORCPT ); Thu, 2 Jan 2020 17:21:11 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 18C4C21582; Thu, 2 Jan 2020 22:21:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578003670; bh=sXMuB2CZO8zNQEWG2MGhBwus/l8bV2Pqvf5j3FHDyFo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p5VY9EtI36NMevM1T8vRWOzsyardD+AdtU9dChMGwi5Jy3MT/gXPV1e4kjiiJoOA4 rNFYqhCSaGNdfgEzcNl11MChIifiXoKYcTlny6xXo8H/r+xaPirFzHwxMrWrbHNkWP a/U4uBvG2hM+JfzypDy/QcjLSo8kD6PRbqmVnGAY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Qian Cai , Vishal Verma , Dan Williams , Sasha Levin Subject: [PATCH 4.19 048/114] libnvdimm/btt: fix variable rc set but not used Date: Thu, 2 Jan 2020 23:07:00 +0100 Message-Id: <20200102220033.933129789@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220029.183913184@linuxfoundation.org> References: <20200102220029.183913184@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Qian Cai [ Upstream commit 4e24e37d5313edca8b4ab86f240c046c731e28d6 ] drivers/nvdimm/btt.c: In function 'btt_read_pg': drivers/nvdimm/btt.c:1264:8: warning: variable 'rc' set but not used [-Wunused-but-set-variable] int rc; ^~ Add a ratelimited message in case a storm of errors is encountered. Fixes: d9b83c756953 ("libnvdimm, btt: rework error clearing") Signed-off-by: Qian Cai Reviewed-by: Vishal Verma Link: https://lore.kernel.org/r/1572530719-32161-1-git-send-email-cai@lca.pw Signed-off-by: Dan Williams Signed-off-by: Sasha Levin --- drivers/nvdimm/btt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c index 0360c015f658..75ae2c508a04 100644 --- a/drivers/nvdimm/btt.c +++ b/drivers/nvdimm/btt.c @@ -1260,11 +1260,11 @@ static int btt_read_pg(struct btt *btt, struct bio_integrity_payload *bip, ret = btt_data_read(arena, page, off, postmap, cur_len); if (ret) { - int rc; - /* Media error - set the e_flag */ - rc = btt_map_write(arena, premap, postmap, 0, 1, - NVDIMM_IO_ATOMIC); + if (btt_map_write(arena, premap, postmap, 0, 1, NVDIMM_IO_ATOMIC)) + dev_warn_ratelimited(to_dev(arena), + "Error persistently tracking bad blocks at %#x\n", + premap); goto out_rtt; } -- 2.20.1