[PATCH v6 1/2] part: Export part_driver_lookup_type for external use
Tom Rini
trini at konsulko.com
Thu Sep 25 18:35:41 CEST 2025
On Thu, Sep 25, 2025 at 09:20:53AM +0300, Ilias Apalodimas wrote:
> Hi Javier,
>
> On Thu, 25 Sept 2025 at 02:31, Javier Tia <javier.tia at linaro.org> wrote:
> >
> > Make part_driver_lookup_type non-static so it can be used outside
> > part.c. This allows external callers to determine the appropriate
> > partition driver for a block device, enabling more flexible handling of
> > partition types.
> >
> > Add a prototype and kernel-doc comment in part.h to document the
> > function contract. Provide a stub inline implementation returning NULL
> > when partition support is disabled, ensuring build consistency across
> > configurations.
> >
> > Signed-off-by: Javier Tia <javier.tia at linaro.org>
> > ---
> > disk/part.c | 2 +-
> > include/part.h | 21 +++++++++++++++++++++
> > 2 files changed, 22 insertions(+), 1 deletion(-)
> >
> > diff --git a/disk/part.c b/disk/part.c
> > index 66e2b3a7219..f0c6866e210 100644
> > --- a/disk/part.c
> > +++ b/disk/part.c
> > @@ -63,7 +63,7 @@ static struct part_driver *part_driver_get_type(int part_type)
> > * @dev_desc: Device descriptor
> > * Return: Driver found, or NULL if none
> > */
> > -static struct part_driver *part_driver_lookup_type(struct blk_desc *desc)
> > +struct part_driver *part_driver_lookup_type(struct blk_desc *desc)
Since Ilias has a comment, I'll also note that with the kerneldoc moving
to the header, the version in the C file should be removed (this means
they won't get out of sync).
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250925/2d3af930/attachment.sig>
More information about the U-Boot
mailing list