Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2433781ybh; Mon, 9 Mar 2020 05:54:38 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuzUKv+m86NJ3pbZOkvDjf1ha6iMKsCppltRf5RHhFVrZiiSSTZ8xrIA3RL5T+nRpj27Okt X-Received: by 2002:a05:6808:3a1:: with SMTP id n1mr10746952oie.89.1583758478273; Mon, 09 Mar 2020 05:54:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583758478; cv=none; d=google.com; s=arc-20160816; b=uxzdPLF8Cu3Yp4beDT5ZalgOfH1SajuA0T21lKSo0gVtG95wh2GtLbfnvrBD5wPD51 fpuG97iIBBUDE8g5w3539msEKFuNMshD6JKnp00mk1TZ/6PTKAXmd1VDtfZ81PNLpVkb 9E8JOXBouZ4hZl4iPWe484gdN2gVqd3hxtWGKcvaTKu5AHh+8bbot+8x3KUNHT4krgSL n9v79x+fyGXJQfdSJNCn1S0RqRpvzaMGLP7+6CkO/QeI+4/L9pJKPY9AX+uaNQHBE6fH bGHDzdNPMO5jylc7pa/cLHVXoOOBf58txK4sow9wZUHOOeTa2yxsmdyHIVIV/EL99Qnv bVAg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=J/GfNup1LbUZmzynPCLejvsNC0QrUORNG+Rvtweybn0=; b=WpPJRykE6mhCchJdE4KHggySjX+V0lMJsCS6uuN7Z4PchgFdPNXFLAm+Q0vh9KJKLh X7Yde75I7hioOfxVUXrmmQI9krwKYAwsgVeXbHwBWiQLy+Orc4yzcGu1h2JkD5fa4a4i VXM3Qs7tVWIGXUEOOoAYLTud6nLjVvdqVyDk2oZ0SxVoCtRWegZD3TDs5jeqxywcIZyn v7w6G7KkKK+Y8QcPDZwROzZCD02zGyWR7fcZkyJ7nCBZUVwQpkhxp3rGdU6B5odaiBIZ 5Jux2aTA/8RkV9NqZGIlnsT3D4YWsHiCPelPH386UkHHM4XnNCOhWJ07agHjIapDEjZZ r3Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=dBopjlb1; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l11si458907oib.32.2020.03.09.05.54.26; Mon, 09 Mar 2020 05:54:38 -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=@ti.com header.s=ti-com-17Q1 header.b=dBopjlb1; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726486AbgCIMwv (ORCPT + 99 others); Mon, 9 Mar 2020 08:52:51 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:56882 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726442AbgCIMwu (ORCPT ); Mon, 9 Mar 2020 08:52:50 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 029CpxOA012547; Mon, 9 Mar 2020 07:51:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1583758319; bh=J/GfNup1LbUZmzynPCLejvsNC0QrUORNG+Rvtweybn0=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=dBopjlb1HaIwBaw1TQwj0v5NuTqCLZgs6UnQLgTxJYosKuHNXUyNZ2uHd8M4Wk8xA BrtOGFBSHMiTccdV4W5BhD7woUMHzVeMYY9zEHE9ZL0UHPMCDAupnQzfec+O0UhNPb vnH6//EB6fWZaxEr8XWheZYeWW0n8aDWyBt6bY1g= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 029CpxZ8022346 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 9 Mar 2020 07:51:59 -0500 Received: from DLEE114.ent.ti.com (157.170.170.25) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Mon, 9 Mar 2020 07:51:59 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Mon, 9 Mar 2020 07:51:59 -0500 Received: from [10.250.77.18] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 029CpwtI045259; Mon, 9 Mar 2020 07:51:58 -0500 Subject: Re: [PATCH v1] power: supply: bq27xxx_battery: Silence deferred-probe error To: Dmitry Osipenko , =?UTF-8?Q?Pali_Roh=c3=a1r?= , Sebastian Reichel , David Heidelberg CC: , References: <20200308215143.27823-1-digetx@gmail.com> From: "Andrew F. Davis" Message-ID: <7493a430-905e-baf4-1265-a6b3eb31f79f@ti.com> Date: Mon, 9 Mar 2020 08:51:58 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200308215143.27823-1-digetx@gmail.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/8/20 5:51 PM, 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 > --- Reviewed-by: Andrew F. Davis > 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); > } > >