On 8/15/23 02:31, AKASHI Takahiro wrote:
On Mon, Aug 14, 2023 at 04:42:57PM -0600, Simon Glass wrote:
On Sun, 13 Aug 2023 at 17:47, Marek Vasut
<[email protected]> wrote:

Move the macro into blk-uclass.c , since it is only used there.

Signed-off-by: Marek Vasut <[email protected]>
---
Cc: AKASHI Takahiro <[email protected]>
Cc: Abdellatif El Khlifi <[email protected]>
Cc: Bin Meng <[email protected]>
Cc: Heinrich Schuchardt <[email protected]>
Cc: Joshua Watt <[email protected]>
Cc: Michal Suchanek <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Tobias Waldekranz <[email protected]>
---
  drivers/block/blk-uclass.c | 2 ++
  include/blk.h              | 2 --
  2 files changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass <[email protected]>

Unfortunately this does not stop people using the ops member directly.

For this series, I tried a patch myself [1] but I think I stuffed it
up. So I will let Takahiro-San figure it out. I would very much like
to see this clean-up go in.

At that time I thought that the necessary change was small and trivial:)

As for Marek's patch, let me first explain why I implement that way,
i.e. separating disk_blk_*() from part_disk_*():
- Initially I tried to implement disk_blk_*() work for both UCLASS_BLOCK
   and UCLASS_PARTITION, while this idea was rejected by Simon.
- Then, I implemented part_disk_*() with direct access to the devices,
   and part_disk_*(), as helper functions, with block caching.

I think the later should not be part_disk_*(), but rather disk_blk_*() ?

   I thought that this approach was aligned with the implementation of
   block devices (blk_[read|wirte]).

If you don't think the second point makes sense, I can agree to Marek's
approach.

Does it even make sense to have accessors which bypass the block cache ?

--
Best regards,
Marek Vasut

Reply via email to