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
<marek.vasut+rene...@mailbox.org> wrote:

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

Signed-off-by: Marek Vasut <marek.vasut+rene...@mailbox.org>
---
Cc: AKASHI Takahiro <takahiro.aka...@linaro.org>
Cc: Abdellatif El Khlifi <abdellatif.elkhl...@arm.com>
Cc: Bin Meng <bmeng...@gmail.com>
Cc: Heinrich Schuchardt <xypron.gl...@gmx.de>
Cc: Joshua Watt <jpewhac...@gmail.com>
Cc: Michal Suchanek <msucha...@suse.de>
Cc: Simon Glass <s...@chromium.org>
Cc: Tobias Waldekranz <tob...@waldekranz.com>
---
  drivers/block/blk-uclass.c | 2 ++
  include/blk.h              | 2 --
  2 files changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass <s...@chromium.org>

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