lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0a11e836-dcc0-0fba-4da7-caf28cbcf7d6@gmail.com>
Date:   Thu, 17 Sep 2020 17:59:28 +0300
From:   Dmitry Osipenko <digetx@...il.com>
To:     Thierry Reding <thierry.reding@...il.com>
Cc:     Jonathan Hunter <jonathanh@...dia.com>,
        Laxman Dewangan <ldewangan@...dia.com>,
        Wolfram Sang <wsa@...-dreams.de>,
        Michał Mirosław <mirq-linux@...e.qmqm.pl>,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        linux-i2c@...r.kernel.org, linux-tegra@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v7 08/34] i2c: tegra: Remove error message used for
 devm_request_irq() failure

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 <mirq-linux@...e.qmqm.pl>
>> Signed-off-by: Dmitry Osipenko <digetx@...il.com>
>> ---
>>  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
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ