Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1831136pxb; Mon, 13 Sep 2021 06:31:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvdLnK/UDCtVgCaB9tC8FK64iDYVxiDQnWGlyKl6At/aM2huid1kHoyiznZ52hdzcyQPbr X-Received: by 2002:a6b:fd1a:: with SMTP id c26mr8741206ioi.57.1631539884597; Mon, 13 Sep 2021 06:31:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631539884; cv=none; d=google.com; s=arc-20160816; b=OSwZKeuWHOkbjfH1MOCypaHU7nHC9+odAUM4w9ewtND3IFbiXP/g+45KrIC1wF2ZBj xcotk2kNN4NJsrZ7fZHr0xBT162MBI2xQgTAmykrC9t56TX1mbA+q/vZfyRX4aespr9Q dOnIV1yQl5wLq+r3CfgKlez5jTUkPsv0hNa97sXsy9sSn5ESI+D/P7pYCPHCcYl3QlZF jbYxSopMdT74Pq4zcnuWaZWuGWmrrgfzZzupLh0pJzItKYSdgyIf2/5O+2gktviq/Rle EOk5+a+P4OGa//DaEJVCMSlmVp+5J7xK5xLuCscSMiXHxILuJQfDCj7I9QnwdxiNYQs1 ByUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=M27lqMr42Xrs+7DnbhDYVJo14fqxq105Q8lpDQ9WPMo=; b=xgtmFdty4b34jj09vfIkiQBXyu9QuT0tWBH9ilvH+ipIWJfJmsOG4tYBHqMm/ybvHE wD3MJOQvACcS3Tzw/TwFJckLQojL0VVS6KVogbobm5/V4jsH1cToUBPBC6rtbn1xGcfr dQLQLC1BeQmiL0+EOXsyxo6Xp2V8vqTacXu5rsO7sHfYf+THqw8w3yoYuQEIq7o9voSk R1TGTyfCACQu7cMIDs/tnvhqkRkJI3ObaWgLwcnrKbqbi8wO7AX8H9CLbmGOUWXuScGB 7uBM8BR3r3vOJKcCfwrhFefJ28xCaKWdEaGXBhR2dT6A7yjiwtCTRkhecNqyLNca2JnJ SgaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oD8PBJ0L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x6si7367741ilv.93.2021.09.13.06.31.11; Mon, 13 Sep 2021 06:31:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b=oD8PBJ0L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240423AbhIMNbI (ORCPT + 99 others); Mon, 13 Sep 2021 09:31:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:34832 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240119AbhIMNTz (ORCPT ); Mon, 13 Sep 2021 09:19:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5BFF4610CF; Mon, 13 Sep 2021 13:17:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539051; bh=hswrED2gR8UQ4lYZmyMGHDw5ER84jk+N/42g+xUDEKY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oD8PBJ0LxSMOMV8t/93aodUzfpMz2BDhVAW6cVDTziyuShxhbfTeM0PVgb0zfFbq3 MT/SARorjszh2AoCZgj9x964QKKo+gINUEklNygeu6T19+zwr6KkYAWDIrTBBhpiE6 Mwhx/7pvMbZYa0ydNRiGEVov8oD0y11ee+ekpe/I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans de Goede , Sebastian Reichel , Sasha Levin Subject: [PATCH 5.4 005/144] power: supply: axp288_fuel_gauge: Report register-address on readb / writeb errors Date: Mon, 13 Sep 2021 15:13:06 +0200 Message-Id: <20210913131048.148295034@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131047.974309396@linuxfoundation.org> References: <20210913131047.974309396@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hans de Goede [ Upstream commit caa534c3ba40c6e8352b42cbbbca9ba481814ac8 ] When fuel_gauge_reg_readb()/_writeb() fails, report which register we were trying to read / write when the error happened. Also reword the message a bit: - Drop the axp288 prefix, dev_err() already prints this - Switch from telegram / abbreviated style to a normal sentence, aligning the message with those from fuel_gauge_read_*bit_word() Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin --- drivers/power/supply/axp288_fuel_gauge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/power/supply/axp288_fuel_gauge.c b/drivers/power/supply/axp288_fuel_gauge.c index f40fa0e63b6e..993e4a4a34b3 100644 --- a/drivers/power/supply/axp288_fuel_gauge.c +++ b/drivers/power/supply/axp288_fuel_gauge.c @@ -149,7 +149,7 @@ static int fuel_gauge_reg_readb(struct axp288_fg_info *info, int reg) } if (ret < 0) { - dev_err(&info->pdev->dev, "axp288 reg read err:%d\n", ret); + dev_err(&info->pdev->dev, "Error reading reg 0x%02x err: %d\n", reg, ret); return ret; } @@ -163,7 +163,7 @@ static int fuel_gauge_reg_writeb(struct axp288_fg_info *info, int reg, u8 val) ret = regmap_write(info->regmap, reg, (unsigned int)val); if (ret < 0) - dev_err(&info->pdev->dev, "axp288 reg write err:%d\n", ret); + dev_err(&info->pdev->dev, "Error writing reg 0x%02x err: %d\n", reg, ret); return ret; } -- 2.30.2