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: <54538CEC.3060006@roeck-us.net>
Date:	Fri, 31 Oct 2014 06:21:48 -0700
From:	Guenter Roeck <linux@...ck-us.net>
To:	Jean Delvare <jdelvare@...e.de>,
	Michael Ellerman <mpe@...erman.id.au>
CC:	lm-sensors@...sensors.org, linux-kernel@...r.kernel.org,
	neelegup@...ux.vnet.ibm.com
Subject: Re: [PATCH 1/2] hwmon: (ibmpowernv) Quieten when probing finds no
 device

On 10/31/2014 02:41 AM, Jean Delvare wrote:
> Hi Michael,
>
> On Fri, 31 Oct 2014 17:45:22 +1100, Michael Ellerman wrote:
>> Because we build kernels with drivers built in for many platforms, it's
>> normal for the ibmpowernv driver to be loaded on systems that don't have
>> the appropriate hardware.
>>
>> Currently the driver spams the log with:
>>
>>    ibmpowernv ibmpowernv.0: Opal node 'sensors' not found
>>    ibmpowernv: Platfrom driver probe failed
>>
>> But there is no error, this machine is not a powernv and doesn't have
>> the hardware. So change the sensors message to dev_dbg(), and only print
>> an error about the probe failing if it's not ENODEV.
>>
>> Also fix the spelling of "Platfrom" and print the actual error value.
>>
>> Signed-off-by: Michael Ellerman <mpe@...erman.id.au>
>> ---
>>   drivers/hwmon/ibmpowernv.c | 6 ++++--
>>   1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/hwmon/ibmpowernv.c b/drivers/hwmon/ibmpowernv.c
>> index d2bf2c97ae70..6a30eeea94be 100644
>> --- a/drivers/hwmon/ibmpowernv.c
>> +++ b/drivers/hwmon/ibmpowernv.c
>> @@ -181,7 +181,7 @@ static int __init populate_attr_groups(struct platform_device *pdev)
>>
>>   	opal = of_find_node_by_path("/ibm,opal/sensors");
>>   	if (!opal) {
>> -		dev_err(&pdev->dev, "Opal node 'sensors' not found\n");
>> +		dev_dbg(&pdev->dev, "Opal node 'sensors' not found\n");
>>   		return -ENODEV;
>>   	}
>>
>> @@ -335,7 +335,9 @@ static int __init ibmpowernv_init(void)
>>
>>   	err = platform_driver_probe(&ibmpowernv_driver, ibmpowernv_probe);
>>   	if (err) {
>> -		pr_err("Platfrom driver probe failed\n");
>> +		if (err != -ENODEV)
>> +			pr_err("Platform driver probe failed (%d)\n", err);
>>
>>   		goto exit_device_del;
>>   	}
>>
>
> Looks reasonable.
>
The reduced noise, ok, but a better fix would be to not attempt to load
the driver in the first place. This should be doable by introducing an
of_match_table.

Guenter

> Reviewed-by: Jean Delvare <jdelvare@...e.de>
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ