Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 955445 - sys-kernel/gentoo-sources-6.6.89 build fails: error: implicit declaration of function 'v4l2_subdev_get_locked_active_state'
Summary: sys-kernel/gentoo-sources-6.6.89 build fails: error: implicit declaration of ...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2025-05-05 08:44 UTC by Matt Whitlock
Modified: 2025-05-17 17:09 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Whitlock 2025-05-05 08:44:27 UTC
Function v4l2_subdev_get_locked_active_state is declared in include/media/v4l2-subdev.h only if CONFIG_MEDIA_CONTROLLER is defined, but then it is called in v4l2_subdev_is_streaming of drivers/media/v4l2-core/v4l2-subdev.c regardless of whether CONFIG_MEDIA_CONTROLLER is defined. This causes a compile-time error when CONFIG_MEDIA_CONTROLLER is undefined:

drivers/media/v4l2-core/v4l2-subdev.c: In function 'v4l2_subdev_is_streaming':
drivers/media/v4l2-core/v4l2-subdev.c:2253:17: error: implicit declaration of function 'v4l2_subdev_get_locked_active_state' [-Wimplicit-function-declaration]
 2253 |         state = v4l2_subdev_get_locked_active_state(sd);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/v4l2-core/v4l2-subdev.c:2253:15: error: assignment to 'struct v4l2_subdev_state *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
 2253 |         state = v4l2_subdev_get_locked_active_state(sd);
      |               ^
make[5]: *** [scripts/Makefile.build:243: drivers/media/v4l2-core/v4l2-subdev.o] Error 1

My kernel config is unchanged since 6.6.88, and that version built fine, so evidently this regression was introduced between 6.6.88 and 6.6.89.
Comment 1 Mike Pagano gentoo-dev 2025-05-05 12:09:28 UTC
emerge --info ? Compiler version ?
Comment 2 Matt Whitlock 2025-05-17 16:35:28 UTC
(In reply to Mike Pagano from comment #1)
> emerge --info ? Compiler version ?

Not relevant, as the source code is visibly incorrect.

I reported this upstream, as the problem exists in the vanilla sources too and continues to exist in 6.6.90.