From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: Simon Glass <sjg@chromium.org>
Cc: Marek Vasut <marek.vasut+renesas@mailbox.org>,
u-boot@lists.denx.de,
Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>,
Bin Meng <bmeng.cn@gmail.com>,
Heinrich Schuchardt <xypron.glplk@gmx.de>,
Joshua Watt <jpewhacker@gmail.com>,
Michal Suchanek <msuchanek@suse.de>,
Tobias Waldekranz <tobias@waldekranz.com>
Subject: Re: [PATCH 8/8] disk: Make blk_get_ops() internal to blk uclass
Date: Tue, 15 Aug 2023 09:31:05 +0900 [thread overview]
Message-ID: <ZNrHSX5atPqd4x/2@octopus> (raw)
In-Reply-To: <CAPnjgZ2GHvNE0q1-r8VqRJhAPy-EuOsMqkmDq9NPPiDfMBz6wQ@mail.gmail.com>
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+renesas@mailbox.org> wrote:
> >
> > Move the macro into blk-uclass.c , since it is only used there.
> >
> > Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
> > ---
> > Cc: AKASHI Takahiro <takahiro.akashi@linaro.org>
> > Cc: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
> > Cc: Bin Meng <bmeng.cn@gmail.com>
> > Cc: Heinrich Schuchardt <xypron.glplk@gmx.de>
> > Cc: Joshua Watt <jpewhacker@gmail.com>
> > Cc: Michal Suchanek <msuchanek@suse.de>
> > Cc: Simon Glass <sjg@chromium.org>
> > Cc: Tobias Waldekranz <tobias@waldekranz.com>
> > ---
> > drivers/block/blk-uclass.c | 2 ++
> > include/blk.h | 2 --
> > 2 files changed, 2 insertions(+), 2 deletions(-)
>
> Reviewed-by: Simon Glass <sjg@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 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.
Thanks,
-Takahiro Akashi
> Regards,
> Simon
>
> [1] https://patchwork.ozlabs.org/project/uboot/patch/20230319192957.1084530-1-sjg@chromium.org/
next prev parent reply other threads:[~2023-08-15 0:31 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-13 23:46 [PATCH 1/8] disk: Drop always true conditional check Marek Vasut
2023-08-13 23:46 ` [PATCH 2/8] disk: Simplify disk_blk_read() using blk_read() Marek Vasut
2023-08-23 14:42 ` Tom Rini
2023-08-13 23:46 ` [PATCH 3/8] disk: Simplify disk_blk_{write, erase}() using blk_{write, erase}() Marek Vasut
2023-08-23 14:42 ` Tom Rini
2023-08-13 23:46 ` [PATCH 4/8] disk: Handle partition to block device offset conversion Marek Vasut
2023-08-23 14:42 ` Tom Rini
2023-08-13 23:46 ` [PATCH 5/8] disk: Extend disk_blk_part_validate() with range checking Marek Vasut
2023-08-23 14:42 ` Tom Rini
2023-08-13 23:46 ` [PATCH 6/8] disk: Switch part_blk_*() functions to disk_blk_*() Marek Vasut
2023-08-23 14:42 ` Tom Rini
2023-08-13 23:46 ` [PATCH 7/8] disk: Move part_create_block_devices() to blk uclass Marek Vasut
2023-08-23 14:42 ` Tom Rini
2023-08-13 23:46 ` [PATCH 8/8] disk: Make blk_get_ops() internal " Marek Vasut
2023-08-14 22:42 ` Simon Glass
2023-08-15 0:31 ` AKASHI Takahiro [this message]
2023-08-15 8:24 ` Marek Vasut
2023-08-23 14:42 ` Tom Rini
2023-08-23 14:42 ` [PATCH 1/8] disk: Drop always true conditional check Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZNrHSX5atPqd4x/2@octopus \
--to=takahiro.akashi@linaro.org \
--cc=abdellatif.elkhlifi@arm.com \
--cc=bmeng.cn@gmail.com \
--cc=jpewhacker@gmail.com \
--cc=marek.vasut+renesas@mailbox.org \
--cc=msuchanek@suse.de \
--cc=sjg@chromium.org \
--cc=tobias@waldekranz.com \
--cc=u-boot@lists.denx.de \
--cc=xypron.glplk@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.