Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17894112ybl; Thu, 2 Jan 2020 14:15:27 -0800 (PST) X-Google-Smtp-Source: APXvYqy3+tD9jEWFvYkZuhwcIwo0uNNRyd1byx0giXHS54Ur2+7p3xPxgcDeTNINSbpP6iSBsA3r X-Received: by 2002:a05:6830:159a:: with SMTP id i26mr95773687otr.3.1578003327111; Thu, 02 Jan 2020 14:15:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578003327; cv=none; d=google.com; s=arc-20160816; b=Hl5GEhN+Pm1Kg6+6rqLCQTYxSrEo6Z2CHVq4kCvjAO/y/hZ+4iHOPJnxNebhR3Uf9Q Fz4RzD2waAYN+qctRGSXXGjawnM802TNTORNPYq7K8LGmd24kQIWnTkZSxG2XMVrEQUm 2L8KeQjhsQPO2REkTEff2LOnZA4jjl3B8GBoZZwO66c0G0xShmdL9O1bP23EJ9Omi49H 6DXKsQndzbo+CQWMNoBoMDr0O6Z0O5wDTGLrtS0WPUT0y86/EgYJ8RL/kP3+Q9krKx/D DrZiSrS/3svFd+oGVxFfmUAypVDv2htmHyssz3cqWM34U5q/6YJSQwBGJLOETIVLAo+R mI3A== 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=I1h5xZLB1KaAQek0Ieqp0dAJqgBwvCib/IlCnImyRyA=; b=mVZWNQksJD82kFsZAobIdoIRizajIjto0WaCklrxsge2qdia7m6JgW/quOnkaUsU0A YB+J6O4geAof9FQG3as/iUu01PzbU8hcVvIGi5GaFYO/bwNW8gChCoPFQNrEHLunfnSU KQ/HdXRrfz+JazQQzTQXvIisVfKpRLhNtefbHYuH3YSP6KWbyl1liL0GIfVoNsA4cT7U sR8G9lNHByhU+TXVdnXyATdRRrcDLGXSno/taHF8SxfPlu5pTAvitungc0WIjLTeXM2t cF/A73njH3lEfbRunSthU6jMkapXXCI4qsYVMH+CjamqyDAsExsiM/EF9T60ROWmAMHL XnZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=h1GVOftk; 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 d140si27116698oig.269.2020.01.02.14.15.15; Thu, 02 Jan 2020 14:15:27 -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=h1GVOftk; 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 S1727847AbgABWOJ (ORCPT + 99 others); Thu, 2 Jan 2020 17:14:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:54258 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727825AbgABWOH (ORCPT ); Thu, 2 Jan 2020 17:14:07 -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 539DB2464E; Thu, 2 Jan 2020 22:14:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578003246; bh=0C9It06bdDevtst3v5TQ4lt7SqVv3bBSLAsECQ6Yk1U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h1GVOftkNyQ7T535J69f9NNerfwzzMezOBm5bnWZ5Jrj1o/gtDqC+xnl3pQJlJwdf y63aRgnm3L3+Kgi+X0RxkuZ8hiNuVyl4VB52XoQ1b7iqMKXAdEwWQWZtlfzMIyB9eK kHrySddjExJL/MO1ZiyTawkIBVE3C7mEY/3wFHQk= 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 5.4 080/191] libnvdimm/btt: fix variable rc set but not used Date: Thu, 2 Jan 2020 23:06:02 +0100 Message-Id: <20200102215838.478051812@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102215829.911231638@linuxfoundation.org> References: <20200102215829.911231638@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 3e9f45aec8d1..5129543a0473 100644 --- a/drivers/nvdimm/btt.c +++ b/drivers/nvdimm/btt.c @@ -1261,11 +1261,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