Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp58011ybh; Mon, 9 Mar 2020 16:08:13 -0700 (PDT) X-Google-Smtp-Source: ADFU+vu39qv8sKn4sAkrIUFNGfTSlrnereewynw2J2J8hRbAEtWPGk2HdR3vUiaqQRW5ItRaLhjw X-Received: by 2002:a9d:3603:: with SMTP id w3mr655430otb.94.1583795293310; Mon, 09 Mar 2020 16:08:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583795293; cv=none; d=google.com; s=arc-20160816; b=AqmXKPBlkCUzP23//08/K4REo+qyLFa1j2IAXa8CrO2Km86hB9YeV/+6C1X8i9VbFX fxOHIvSnPQY1cLc7a+e0XGFuCj3JsUWq8RLdhlKn6Aeblmk68GQYvob/+xwQa1LOaEuY mGAGRFxCglCZD1J9a5kPgAxygoS8EF0BvBpoFjPOSWcZWT9WRwPnxNhXBQzrhMEBT7NM o5WQjumF2T1a3zwtQ/QaiQzNgBME+Z8h3xwbQXkyy6IknT8lZ+uBo1MVT7KsdzWS5nGj w11CuQwzdJY4gY6tsdwDjyQUd7ykyRtfeUaWEghhYKwRJoXu9EiAjBO8WIqHXjsvkEt0 daLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=V/EHaLvwL1T42cZtGZEpHg4CUbf8jqXnJsSYAkA+ApI=; b=zwZo79FTujwOkZzgkBU0UbD1Uc4rmoS43VH6zBNlS+YejQ+KKHDTeyU4A6kAjr6hVw EBNrlBSbsCVjelFtnmZDIsjD3inf+kcT3CoGj2eUFjSd1P6sap01Xm2MJj3PO/6MpvrM mtbYOsnfSFjpLGXBEphlQ5Slm1YbZKP/kyAFzZPIFFd0RcEBU+MKolj9Nce0xrXr4Dai pjzEcWzbOwyBVZR9i/shnVGrTfB7SBRe4BGnlzFEeKs28jY7EKqadi20doFSRXWbXq4w ASuTd6yLnJ+yfkdo+efAjC7aU+qd9h6CIHxD+uwdkXsyeLETs6QS4p2DNNq+H0WKLCCp 6bPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DnVMp4AS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 83si4819306oie.242.2020.03.09.16.08.00; Mon, 09 Mar 2020 16:08:13 -0700 (PDT) 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=DnVMp4AS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727370AbgCIXGL (ORCPT + 99 others); Mon, 9 Mar 2020 19:06:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:37882 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726536AbgCIXGL (ORCPT ); Mon, 9 Mar 2020 19:06:11 -0400 Received: from pali.im (pali.im [31.31.79.79]) (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 AF0D92146E; Mon, 9 Mar 2020 23:06:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583795170; bh=9BVVycSfpPDRZx0dw2o2wut/V1EucDmySGq7rPC2jrk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DnVMp4ASBSODGCmZ3WK2Rz1kanMf4TsjqcusgAggwMPCM65hs7a9vmbTHzeiwRR60 IO4SMdCaP78MKOwgQrNqijBzP+7jOH4ZASuSI7d2vXvY2pFa8X5yvHltXnbpHHj3jq pmyUi0LTrsFrdTJ4oXi32RATyuPzI4w6xVrWPyRo= Received: by pali.im (Postfix) id 67F9BBE0; Tue, 10 Mar 2020 00:06:08 +0100 (CET) Date: Tue, 10 Mar 2020 00:06:08 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Dmitry Osipenko Cc: "Andrew F. Davis" , Sebastian Reichel , David Heidelberg , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] power: supply: bq27xxx_battery: Silence deferred-probe error Message-ID: <20200309230608.aur2iddomzrdw4pq@pali> References: <20200308215143.27823-1-digetx@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200308215143.27823-1-digetx@gmail.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday 09 March 2020 00:51:43 Dmitry Osipenko wrote: > The driver fails to probe with -EPROBE_DEFER if battery's power supply > (charger driver) isn't ready yet and this results in a bit noisy error > message in KMSG during kernel's boot up. Let's silence the harmless > error message. > > Signed-off-by: Dmitry Osipenko Hello Dmitry! This change make sense, it is really not an error when bq27k device registration is deferred. You can add my: Reviewed-by: Pali Rohár > --- > drivers/power/supply/bq27xxx_battery.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c > index 195c18c2f426..664e50103eaa 100644 > --- a/drivers/power/supply/bq27xxx_battery.c > +++ b/drivers/power/supply/bq27xxx_battery.c > @@ -1885,7 +1885,10 @@ int bq27xxx_battery_setup(struct bq27xxx_device_info *di) > > di->bat = power_supply_register_no_ws(di->dev, psy_desc, &psy_cfg); > if (IS_ERR(di->bat)) { > - dev_err(di->dev, "failed to register battery\n"); > + if (PTR_ERR(di->bat) == -EPROBE_DEFER) > + dev_dbg(di->dev, "failed to register battery, deferring probe\n"); > + else > + dev_err(di->dev, "failed to register battery\n"); > return PTR_ERR(di->bat); > } >