[PATCH v6 1/2] part: Export part_driver_lookup_type for external use

Javier Tia javier.tia at linaro.org
Fri Sep 26 00:51:11 CEST 2025


Hi Tom,

On Thu, Sep 25, 2025, at 10:35 AM, Tom Rini wrote:
> 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).

I have removed the duplicate kerneldocs as you mentioned; it's already in the header. Thanks.

Sent patch series v7.

> -- 
> Tom
>
> Attachments:
> * signature.asc

-- 
» Javier Tia ✍


More information about the U-Boot mailing list