Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp670988pxk; Thu, 17 Sep 2020 12:57:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySuVscWsfdly3QMV+wpnepo8E0zMiUqUqMnTpZWfQAgXzcJwj81OQTAe4Ueo7GbusgYVuQ X-Received: by 2002:a05:6402:1548:: with SMTP id p8mr35993507edx.65.1600372638475; Thu, 17 Sep 2020 12:57:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600372638; cv=none; d=google.com; s=arc-20160816; b=fFugT8qjkBAvY/9EfAbhTCxtgG2BCQfVYBOUZAZJK+rfap7o6pfT9AfXNyYk5SmaBW HdOYrsITWyS2ihdOLArUmWaHCVrO8YXsQ0PVJH85GVtjJS5bsn3FG95s4LY47OqA4LVq 4ihGBKbFN9GlFXjie8dzFlfPu50slY/WJM+y9HR6RfHwwDFcBaEgwmAysfkSyJEh8RYs qzIOSA8BrZ+i1GivkF3ELQO2JA6okLMIpi9MUr0iOsoH4AHUkLs36/aWQEj1ZSoBAuTw p8dhRMWcEH4Ol6idhAO+jEhO3//A6RUVoosse1mjnh0agCvoMIyBxt8nMVz4BadzBCEg tbyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=5b+6iKz7/t1fonq7I0abGl0uRV12XzzWdSbVpQjE5Vw=; b=ewxamY5VMJtyJl2UWFyA1QIfphFeodyM2eMJTENrm8p2djjqvB1nw5XHI5wIwIxrJV PNAWdJSpauLmuAKp9X0k6MGuJGqAAaakdG2Jjxqn07TOTnrccM1nqbX+5Fg1b/duGEeA ionXQ7Y+pO1ZFpe0AOde5c2wBukLkV+huSy3gJgvr7cycaiLQVbMKD0NnKuU40eByWpj QXSQktO7j6PnZ/qHH1ZgTfrRsVR9CoT671WkkXrNuWpUCaAlXDpRjAdMZ9jNFFIHUTO7 h1TdWvW3+tmofnVvybSjOQII6xbNPum2mMlKSayLT4mjqDLqvFvlscng7d73ISk8ozjv DAqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cbRL789X; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n4si672200ejs.15.2020.09.17.12.56.55; Thu, 17 Sep 2020 12:57:18 -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=@gmail.com header.s=20161025 header.b=cbRL789X; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726650AbgIQTzI (ORCPT + 99 others); Thu, 17 Sep 2020 15:55:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727693AbgIQO7c (ORCPT ); Thu, 17 Sep 2020 10:59:32 -0400 Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD64CC06174A; Thu, 17 Sep 2020 07:59:31 -0700 (PDT) Received: by mail-lf1-x143.google.com with SMTP id x77so2553494lfa.0; Thu, 17 Sep 2020 07:59:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=5b+6iKz7/t1fonq7I0abGl0uRV12XzzWdSbVpQjE5Vw=; b=cbRL789XfnfU1Xx4aPxfYvS0BogNxW6NYyP/o+A0BzA8uAnN9kRa/ceXi062kYTW4g EXEuLIZjE60aRPcqgzDHis6VKgXJvFKPKWHbnIcGL7jcyEGSiG1hNA1m0LwC2C7eCZ1F LlrThZ8KZMCZLAjenpChvvsb15mkU6JqmcCuYM2eS5OKyiZ4PFsygb/fieSPDdTA4AvJ 4wevfUutG6jfzO8x6cX9dpmlJE+NxAjeO+4ZRibi45FocH/5ixYF9gQZGA0OPdP5TRyl jNVmfG7ZRAaATTJhdtr9h0vGX3VBmQGTvfH09Q8F+qLFpDtTKWBqfvukuNPSmcL4elNY 62jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=5b+6iKz7/t1fonq7I0abGl0uRV12XzzWdSbVpQjE5Vw=; b=HPs612WM/pacvoFsConNrQuzbILVtFthAsuuhEWEje88a7+phMCfDdT+OXGl3JtlHZ 7HeAcxSmSCHDxKl9FOgvjIbeBxZzbtq5IOoSCiiQdxpPF5yDUG6gIUymMzJx9bvPakL/ sKEZs+f1eMnrroIY1SgPHDw/r8usf1YMb52L4swEjbdQQ51ldNcw6M3vyprGDinEjkf9 0rzjDZXisyCTG1O/3CUVpC9kAvaAU7Ka3NiKWNtGVTGTnEFU2e4HkuGn8yrTF1qJK3t4 UcznFTofSgfgx3bcLDjP5I2v/k9vGealwjxpyJDEnVsf/jLyoAR+0sdSj8eHlWIG/t28 2Uug== X-Gm-Message-State: AOAM530syzSbfwW8sO/YJG3+tO8euDMY+1+PcaspzysNICkjCv4hkGRD ICZZ/zCNafBhBiWzjfEscqFVE4osu7A= X-Received: by 2002:a19:992:: with SMTP id 140mr8866749lfj.273.1600354770100; Thu, 17 Sep 2020 07:59:30 -0700 (PDT) Received: from [192.168.2.145] (109-252-170-211.dynamic.spd-mgts.ru. [109.252.170.211]) by smtp.googlemail.com with ESMTPSA id y8sm6073590ljy.107.2020.09.17.07.59.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Sep 2020 07:59:29 -0700 (PDT) Subject: Re: [PATCH v7 08/34] i2c: tegra: Remove error message used for devm_request_irq() failure To: Thierry Reding Cc: Jonathan Hunter , Laxman Dewangan , Wolfram Sang , =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , Andy Shevchenko , linux-i2c@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200908224006.25636-1-digetx@gmail.com> <20200908224006.25636-9-digetx@gmail.com> <20200917112852.GT3515672@ulmo> From: Dmitry Osipenko Message-ID: <0a11e836-dcc0-0fba-4da7-caf28cbcf7d6@gmail.com> Date: Thu, 17 Sep 2020 17:59:28 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200917112852.GT3515672@ulmo> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 17.09.2020 14:28, Thierry Reding пишет: > On Wed, Sep 09, 2020 at 01:39:40AM +0300, Dmitry Osipenko wrote: >> The error message prints number of vIRQ, which isn't a useful information. >> In practice devm_request_irq() never fails, hence let's remove the bogus >> message in order to make code cleaner. >> >> Reviewed-by: Michał Mirosław >> Signed-off-by: Dmitry Osipenko >> --- >> drivers/i2c/busses/i2c-tegra.c | 4 +--- >> 1 file changed, 1 insertion(+), 3 deletions(-) > > I think I have seen this fail occasionally when something's wrong in the > IRQ code, or when we are not properly configuring the IRQ in device tree > for example. > > So I'd prefer if this error message stayed here. I agree that it's not a > terribly useful error message, so perhaps adding the error code to it > would make it more helpful? We have dtbs_check nowadays and I assume you only saw a such problem during of hardware bring-up, correct? Realistically, this error should never happen "randomly" and even if it will happen, then you will still know that I2C driver failed because driver-core will tell you about that. Hence there is no much value in the error message, it should be more practical to remove it in order to keep the code cleaner. >> diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c >> index a52c72135390..b813c0976c10 100644 >> --- a/drivers/i2c/busses/i2c-tegra.c >> +++ b/drivers/i2c/busses/i2c-tegra.c >> @@ -1807,10 +1807,8 @@ static int tegra_i2c_probe(struct platform_device *pdev) >> >> ret = devm_request_irq(&pdev->dev, i2c_dev->irq, tegra_i2c_isr, >> IRQF_NO_SUSPEND, dev_name(&pdev->dev), i2c_dev); >> - if (ret) { >> - dev_err(&pdev->dev, "Failed to request irq %i\n", i2c_dev->irq); >> + if (ret) >> goto release_dma; >> - } >> >> i2c_set_adapdata(&i2c_dev->adapter, i2c_dev); >> i2c_dev->adapter.owner = THIS_MODULE; >> -- >> 2.27.0 >>