diff mbox series

media: v4l2-core: constify the class struct

Message ID 20241018131351.70563-1-brgl@bgdev.pl
State New
Headers show
Series media: v4l2-core: constify the class struct | expand

Commit Message

Bartosz Golaszewski Oct. 18, 2024, 1:13 p.m. UTC
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

All functions that take the class address as argument expect a const
pointer so we can make the video class constant.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 drivers/media/v4l2-core/v4l2-dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bartosz Golaszewski Oct. 18, 2024, 5:24 p.m. UTC | #1
On Fri, Oct 18, 2024 at 5:07 PM Patchwork Integration
<patchwork@media-ci.org> wrote:
>
> Dear Bartosz Golaszewski:
>
> The unreliable Media-CI system has found some issues with your series.
> Check the report at: https://linux-media.pages.freedesktop.org/-/users/patchwork/-/jobs/65292429/artifacts/report.htm
>
> Please fix your series, and upload a new version. If you have a patchwork
> account, do not forget to mark the current series as Superseded.
>
> If you believe that the CI is wrong, kindly reply-all to this email.
>
> Check the latest rules for contributing your patches at Documentation/process.
>
> Best regards, and Happy Hacking!
>
> # Broken Tests
> ## Test [static-upstream:test-coccinelle](https://gitlab.freedesktop.org/linux-media/users/patchwork/-/jobs/65292423)
>  - **[stderr](https://linux-media.pages.freedesktop.org/-/users/patchwork/-/jobs/65292423/artifacts/junit/test-coccinelle.err.txt):**
> ```
> drivers/media/platform/raspberrypi/rp1-cfe/cfe.c:2326:2-9: line 2326 is redundant because platform_get_irq() already prints an error
> ```
>

I think this is a false positive.

Bart
Ricardo Ribalda Oct. 18, 2024, 5:26 p.m. UTC | #2
Hi Bartosz

It is indeed. Sorry about that. We have already landed the fix.

Sorry for the noise

On Sat, 19 Oct 2024 at 02:25, Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>
> On Fri, Oct 18, 2024 at 5:07 PM Patchwork Integration
> <patchwork@media-ci.org> wrote:
> >
> > Dear Bartosz Golaszewski:
> >
> > The unreliable Media-CI system has found some issues with your series.
> > Check the report at: https://linux-media.pages.freedesktop.org/-/users/patchwork/-/jobs/65292429/artifacts/report.htm
> >
> > Please fix your series, and upload a new version. If you have a patchwork
> > account, do not forget to mark the current series as Superseded.
> >
> > If you believe that the CI is wrong, kindly reply-all to this email.
> >
> > Check the latest rules for contributing your patches at Documentation/process.
> >
> > Best regards, and Happy Hacking!
> >
> > # Broken Tests
> > ## Test [static-upstream:test-coccinelle](https://gitlab.freedesktop.org/linux-media/users/patchwork/-/jobs/65292423)
> >  - **[stderr](https://linux-media.pages.freedesktop.org/-/users/patchwork/-/jobs/65292423/artifacts/junit/test-coccinelle.err.txt):**
> > ```
> > drivers/media/platform/raspberrypi/rp1-cfe/cfe.c:2326:2-9: line 2326 is redundant because platform_get_irq() already prints an error
> > ```
> >
>
> I think this is a false positive.
>
> Bart
Bartosz Golaszewski Oct. 25, 2024, 8:05 a.m. UTC | #3
On Fri, Oct 18, 2024 at 7:26 PM Ricardo Ribalda <ribalda@chromium.org> wrote:
>
> Hi Bartosz
>
> It is indeed. Sorry about that. We have already landed the fix.
>
> Sorry for the noise
>

Can this be picked up then?

Bart
Bartosz Golaszewski Oct. 31, 2024, 12:35 p.m. UTC | #4
On Fri, Oct 25, 2024 at 10:05 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>
> On Fri, Oct 18, 2024 at 7:26 PM Ricardo Ribalda <ribalda@chromium.org> wrote:
> >
> > Hi Bartosz
> >
> > It is indeed. Sorry about that. We have already landed the fix.
> >
> > Sorry for the noise
> >
>
> Can this be picked up then?
>
> Bart

Ping
diff mbox series

Patch

diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c
index dbd6fba93179..5bcaeeba4d09 100644
--- a/drivers/media/v4l2-core/v4l2-dev.c
+++ b/drivers/media/v4l2-core/v4l2-dev.c
@@ -229,7 +229,7 @@  static void v4l2_device_release(struct device *cd)
 		v4l2_device_put(v4l2_dev);
 }
 
-static struct class video_class = {
+static const struct class video_class = {
 	.name = VIDEO_NAME,
 	.dev_groups = video_device_groups,
 };