Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1593886pxb; Mon, 12 Apr 2021 01:45:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+K9+lA+VMetmgOIyJpg0OzylvSXot0ZmZQ/w6/gQ1y2qw26Ailtdv7uVODDuScTOtjY13 X-Received: by 2002:a17:90b:1e01:: with SMTP id pg1mr1696644pjb.156.1618217125110; Mon, 12 Apr 2021 01:45:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618217125; cv=none; d=google.com; s=arc-20160816; b=zhH0D/wCqUoRoG4XzDS6QnKvju2/ofgpk8ctIZk1P1bF/nS6bRadkHjfcZM+X9Yd47 ApK3nzrX2EZ1R2xlC0NAEYntSj5yMfvfUGk19/ezo2Vdhg35/fyBdCAHWNOadQBIUmwr i4kxL5TqSN5djcEHKwjD465EEbvC7n3Da9OHyW6bIA1y4gcquGh/KexAJ4PkHJBeiA3a FdI5Q4eB4vaiDRI4pGRroTpqaTfaNRytVC/ONxSKNJVPTyFydNK4bYdEkpb4i8H9z2wJ fxs3GfIEyy/aGwVS0u7tFWmmDzufOVfJ3+/y4rRmuzGznaXbcTPXbGRqiwXRl0C/DnBC jggA== 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=C6Vd4oQ9gXULdidToq6nssAUNnTQ1U5yAWPaiL5+CK8=; b=POHjjnWF9al0RItXB2AE6DEaWgX55De5mGTISR6RgEC5LwmWAeRPIL3+FL2d/suUyg Z646f4DgNolmqx6c6V/cl+gMc7EB3ZVg7AFSefMujajaSRMNCMvTI0JICNhA0qnDVcpJ bZjd6x5BSkjvrdWcJhWEfblO0sm3GJJB0Pbb7hrLfUFFuKFC9saVArMVjsBiRn87elHO ejdROT17MkxtRXjy6JymeoWgrWcQOw+HW9937REfnkOIb4r2jl5bec+bqL2Ct2SRSEyy sHTD9SaezHlXSgnqB/Raf9wvGibFa0Y5yFmPrb6Afq1crS+dHwTZ4y+THszUfxGloCI6 e0kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xoo0b8Pk; 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 j6si12170493pgm.340.2021.04.12.01.45.13; Mon, 12 Apr 2021 01:45:25 -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=xoo0b8Pk; 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 S237524AbhDLInc (ORCPT + 99 others); Mon, 12 Apr 2021 04:43:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:34944 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237493AbhDLInV (ORCPT ); Mon, 12 Apr 2021 04:43:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B0C57611F0; Mon, 12 Apr 2021 08:43:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618216982; bh=e71fwFmFZmS8AjnjosGQeCNNIl6ytjvQ2rak1nkU3EM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xoo0b8PkaNfdMGPNdf2AUE0xsyzNarYfDvjrj0Aqg8B507FXr+/JlNFbjmB5bfZaH dNNUxyOfK1CMiMjXEGTRxOFOrJmLNgc6xq6eHaGMVyFq5z/n5sKbLpAdqjQCGR/3DG TzOyPBZkm1APN1Di6okTfACwUlUEIJzSMKPPL0Hw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Klaus Kudielka , Wolfram Sang , Wolfram Sang , stable@kernel.org Subject: [PATCH 4.19 26/66] i2c: turn recovery error on init to debug Date: Mon, 12 Apr 2021 10:40:32 +0200 Message-Id: <20210412083958.978438750@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210412083958.129944265@linuxfoundation.org> References: <20210412083958.129944265@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: Wolfram Sang commit e409a6a3e0690efdef9b8a96197bc61ff117cfaf upstream. In some configurations, recovery is optional. So, don't throw an error when it is not used because e.g. pinctrl settings for recovery are not provided. Reword the message and make it debug output. Reported-by: Klaus Kudielka Tested-by: Klaus Kudielka Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang Cc: stable@kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/i2c/i2c-core-base.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -262,13 +262,14 @@ EXPORT_SYMBOL_GPL(i2c_recover_bus); static void i2c_init_recovery(struct i2c_adapter *adap) { struct i2c_bus_recovery_info *bri = adap->bus_recovery_info; - char *err_str; + char *err_str, *err_level = KERN_ERR; if (!bri) return; if (!bri->recover_bus) { - err_str = "no recover_bus() found"; + err_str = "no suitable method provided"; + err_level = KERN_DEBUG; goto err; } @@ -298,7 +299,7 @@ static void i2c_init_recovery(struct i2c return; err: - dev_err(&adap->dev, "Not using recovery: %s\n", err_str); + dev_printk(err_level, &adap->dev, "Not using recovery: %s\n", err_str); adap->bus_recovery_info = NULL; }