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: <20231219135553.4e1b74f4@xps-13>
Date: Tue, 19 Dec 2023 13:55:53 +0100
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Rafał Miłecki <zajec5@...il.com>
Cc: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>, Greg Kroah-Hartman
 <gregkh@...uxfoundation.org>, Michael Walle <michael@...le.cc>,
 linux-mtd@...ts.infradead.org, linux-arm-kernel@...ts.infradead.org,
 linux-kernel@...r.kernel.org, Rafał Miłecki
 <rafal@...ecki.pl>
Subject: Re: [PATCH v6.8 1/2] nvmem: layouts: refactor .add_cells() callback
 arguments

Hi Rafał,

zajec5@...il.com wrote on Tue, 19 Dec 2023 13:01:03 +0100:

> From: Rafał Miłecki <rafal@...ecki.pl>
> 
> Simply pass whole "struct nvmem_layout" instead of single variables.
> There is nothing in "struct nvmem_layout" that we have to hide from
> layout drivers. They also access it during .probe() and .remove().
> 
> Thanks to this change:
> 
> 1. API gets more consistent
>    All layouts drivers callbacks get the same argument
> 
> 2. Layouts get correct device
>    Before this change NVMEM core code was passing NVMEM device instead
>    of layout device. That resulted in:
>    * Confusing prints
>    * Calling devm_*() helpers on wrong device
>    * Helpers like of_device_get_match_data() dereferencing NULLs
> 
> 3. It gets possible to get match data
>    First of all nvmem_layout_get_match_data() requires passing "struct
>    nvmem_layout" which .add_cells() callback didn't have before this. It
>    doesn't matter much as it's rather useless now anyway (and will be
>    dropped).
>    What's more important however is that of_device_get_match_data() can
>    be used now thanks to owning a proper device pointer.
> 
> Signed-off-by: Rafał Miłecki <rafal@...ecki.pl>

Reviewed-by: Miquel Raynal <miquel.raynal@...tlin.com>

Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ