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: <652e1f21-c443-3a25-a57f-71e0f835d47d@collabora.com>
Date:   Mon, 3 Dec 2018 23:13:20 +0100
From:   Enric Balletbo i Serra <enric.balletbo@...labora.com>
To:     Lee Jones <lee.jones@...aro.org>
Cc:     gwendal@...omium.org, drinkcat@...omium.org,
        linux-kernel@...r.kernel.org, groeck@...omium.org,
        kernel@...labora.com, bleung@...omium.org,
        Olof Johansson <olof@...om.net>
Subject: Re: [PATCH v3 1/8] mfd / platform: cros_ec: use devm_mfd_add_devices.

Hi Lee,

On 3/12/18 11:32, Lee Jones wrote:
> On Tue, 27 Nov 2018, Enric Balletbo i Serra wrote:
> 
>> Use devm_mfd_add_devices() for adding cros-ec core MFD child devices. This
>> reduces the need of remove callback from platform/chrome for removing the
>> MFD child devices.
>>
>> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@...labora.com>
>> ---
>>
>> Changes in v3:
>> - Removed cros_ec_remove from include file.
>>
>> Changes in v2:
>> - Use devm only for the cros-ec core.
>>
>>  drivers/mfd/cros_ec.c                 | 14 +++-----------
>>  drivers/mfd/cros_ec_dev.c             |  1 +
>>  drivers/platform/chrome/cros_ec_i2c.c | 10 ----------
>>  drivers/platform/chrome/cros_ec_lpc.c |  4 ----
>>  drivers/platform/chrome/cros_ec_spi.c | 11 -----------
>>  include/linux/mfd/cros_ec.h           | 10 ----------
>>  6 files changed, 4 insertions(+), 46 deletions(-)
> 
> Nice patch.
> 
> Just one question:
> 
> [...]
> 
>> diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c
>> index 8f9d6964173e..ff788d3e6d5f 100644
>> --- a/drivers/mfd/cros_ec_dev.c
>> +++ b/drivers/mfd/cros_ec_dev.c
>> @@ -493,6 +493,7 @@ static int ec_device_remove(struct platform_device *pdev)
>>  
>>  	cros_ec_debugfs_remove(ec);
>>  
>> +	mfd_remove_devices(ec->dev);
> 
> Why is this still required?
> 

Hmm, maybe that line shouldn't be here as is not really related to this patch,
it's more a fix for the cros_ec_dev to remove those cells that are registered
with mfd_add_devices.

Actually what we have is cros_ec that instantiates one or two cros_ec_dev
(depends on the platform) and cros_ec_dev instantiating different subdrivers.
The purpose of the patch was use the device managed resource for the cros_ec
driver, I did not touch the cros_ec_dev driver

>>  	cdev_del(&ec->cdev);
>>  	device_unregister(&ec->class_dev);
>>  	return 0;
> 
> [...]
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ