2023-12-12 00:04:29

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build warning after merge of the amdgpu tree

Hi all,

After merging the amdgpu tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

drivers/gpu/drm/drm_atomic_uapi.c:366:1: warning: 'drm_atomic_replace_property_blob_from_id' defined but not used [-Wunused-function]
366 | drm_atomic_replace_property_blob_from_id(struct drm_device *dev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Introduced by commit

1d2b049e4582 ("drm/drm_property: make replace_property_blob_from_id a DRM helper")

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2023-12-12 03:02:04

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the amdgpu tree

Hi all,

On Tue, 12 Dec 2023 11:04:15 +1100 Stephen Rothwell <[email protected]> wrote:
>
> After merging the amdgpu tree, today's linux-next build (arm
> multi_v7_defconfig) produced this warning:
>
> drivers/gpu/drm/drm_atomic_uapi.c:366:1: warning: 'drm_atomic_replace_property_blob_from_id' defined but not used [-Wunused-function]
> 366 | drm_atomic_replace_property_blob_from_id(struct drm_device *dev,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Introduced by commit
>
> 1d2b049e4582 ("drm/drm_property: make replace_property_blob_from_id a DRM helper")

This became a build failure in the i386 defconfig build, so I applied
the following patch for today.

From: Stephen Rothwell <[email protected]>
Date: Tue, 12 Dec 2023 13:53:55 +1100
Subject: [PATCH] drm: remove unused function drm_atomic_replace_property_blob_from_id()

Signed-off-by: Stephen Rothwell <[email protected]>
---
drivers/gpu/drm/drm_atomic_uapi.c | 42 -------------------------------
1 file changed, 42 deletions(-)

diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
index 70ddbb93e466..29d4940188d4 100644
--- a/drivers/gpu/drm/drm_atomic_uapi.c
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
@@ -362,48 +362,6 @@ static s32 __user *get_out_fence_for_connector(struct drm_atomic_state *state,
return fence_ptr;
}

-static int
-drm_atomic_replace_property_blob_from_id(struct drm_device *dev,
- struct drm_property_blob **blob,
- uint64_t blob_id,
- ssize_t expected_size,
- ssize_t expected_elem_size,
- bool *replaced)
-{
- struct drm_property_blob *new_blob = NULL;
-
- if (blob_id != 0) {
- new_blob = drm_property_lookup_blob(dev, blob_id);
- if (new_blob == NULL) {
- drm_dbg_atomic(dev,
- "cannot find blob ID %llu\n", blob_id);
- return -EINVAL;
- }
-
- if (expected_size > 0 &&
- new_blob->length != expected_size) {
- drm_dbg_atomic(dev,
- "[BLOB:%d] length %zu different from expected %zu\n",
- new_blob->base.id, new_blob->length, expected_size);
- drm_property_blob_put(new_blob);
- return -EINVAL;
- }
- if (expected_elem_size > 0 &&
- new_blob->length % expected_elem_size != 0) {
- drm_dbg_atomic(dev,
- "[BLOB:%d] length %zu not divisible by element size %zu\n",
- new_blob->base.id, new_blob->length, expected_elem_size);
- drm_property_blob_put(new_blob);
- return -EINVAL;
- }
- }
-
- *replaced |= drm_property_replace_blob(blob, new_blob);
- drm_property_blob_put(new_blob);
-
- return 0;
-}
-
static int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
struct drm_crtc_state *state, struct drm_property *property,
uint64_t val)
--
2.40.1

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2023-12-12 09:02:42

by Melissa Wen

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the amdgpu tree

On 12/12, Stephen Rothwell wrote:
> Hi all,
>
> On Tue, 12 Dec 2023 11:04:15 +1100 Stephen Rothwell <[email protected]> wrote:
> >
> > After merging the amdgpu tree, today's linux-next build (arm
> > multi_v7_defconfig) produced this warning:
> >
> > drivers/gpu/drm/drm_atomic_uapi.c:366:1: warning: 'drm_atomic_replace_property_blob_from_id' defined but not used [-Wunused-function]
> > 366 | drm_atomic_replace_property_blob_from_id(struct drm_device *dev,
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> > Introduced by commit
> >
> > 1d2b049e4582 ("drm/drm_property: make replace_property_blob_from_id a DRM helper")
>
> This became a build failure in the i386 defconfig build, so I applied
> the following patch for today.

Yes, I also noticed it yesterday when building amd-staging-drm-next.

Something went wrong when they applied this patch:
https://lore.kernel.org/amd-gfx/[email protected]/
and your patch below is exactly the part of this patch ^ that is
missing.

In addition, only the first four patches of the series were applied.

Thanks,

Melissa

>
> From: Stephen Rothwell <[email protected]>
> Date: Tue, 12 Dec 2023 13:53:55 +1100
> Subject: [PATCH] drm: remove unused function drm_atomic_replace_property_blob_from_id()
>
> Signed-off-by: Stephen Rothwell <[email protected]>
> ---
> drivers/gpu/drm/drm_atomic_uapi.c | 42 -------------------------------
> 1 file changed, 42 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
> index 70ddbb93e466..29d4940188d4 100644
> --- a/drivers/gpu/drm/drm_atomic_uapi.c
> +++ b/drivers/gpu/drm/drm_atomic_uapi.c
> @@ -362,48 +362,6 @@ static s32 __user *get_out_fence_for_connector(struct drm_atomic_state *state,
> return fence_ptr;
> }
>
> -static int
> -drm_atomic_replace_property_blob_from_id(struct drm_device *dev,
> - struct drm_property_blob **blob,
> - uint64_t blob_id,
> - ssize_t expected_size,
> - ssize_t expected_elem_size,
> - bool *replaced)
> -{
> - struct drm_property_blob *new_blob = NULL;
> -
> - if (blob_id != 0) {
> - new_blob = drm_property_lookup_blob(dev, blob_id);
> - if (new_blob == NULL) {
> - drm_dbg_atomic(dev,
> - "cannot find blob ID %llu\n", blob_id);
> - return -EINVAL;
> - }
> -
> - if (expected_size > 0 &&
> - new_blob->length != expected_size) {
> - drm_dbg_atomic(dev,
> - "[BLOB:%d] length %zu different from expected %zu\n",
> - new_blob->base.id, new_blob->length, expected_size);
> - drm_property_blob_put(new_blob);
> - return -EINVAL;
> - }
> - if (expected_elem_size > 0 &&
> - new_blob->length % expected_elem_size != 0) {
> - drm_dbg_atomic(dev,
> - "[BLOB:%d] length %zu not divisible by element size %zu\n",
> - new_blob->base.id, new_blob->length, expected_elem_size);
> - drm_property_blob_put(new_blob);
> - return -EINVAL;
> - }
> - }
> -
> - *replaced |= drm_property_replace_blob(blob, new_blob);
> - drm_property_blob_put(new_blob);
> -
> - return 0;
> -}
> -
> static int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
> struct drm_crtc_state *state, struct drm_property *property,
> uint64_t val)
> --
> 2.40.1
>
> --
> Cheers,
> Stephen Rothwell


2023-12-12 15:05:44

by Alex Deucher

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the amdgpu tree

On Tue, Dec 12, 2023 at 4:02 AM Melissa Wen <[email protected]> wrote:
>
> On 12/12, Stephen Rothwell wrote:
> > Hi all,
> >
> > On Tue, 12 Dec 2023 11:04:15 +1100 Stephen Rothwell <[email protected]> wrote:
> > >
> > > After merging the amdgpu tree, today's linux-next build (arm
> > > multi_v7_defconfig) produced this warning:
> > >
> > > drivers/gpu/drm/drm_atomic_uapi.c:366:1: warning: 'drm_atomic_replace_property_blob_from_id' defined but not used [-Wunused-function]
> > > 366 | drm_atomic_replace_property_blob_from_id(struct drm_device *dev,
> > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > >
> > > Introduced by commit
> > >
> > > 1d2b049e4582 ("drm/drm_property: make replace_property_blob_from_id a DRM helper")
> >
> > This became a build failure in the i386 defconfig build, so I applied
> > the following patch for today.
>
> Yes, I also noticed it yesterday when building amd-staging-drm-next.
>
> Something went wrong when they applied this patch:
> https://lore.kernel.org/amd-gfx/[email protected]/
> and your patch below is exactly the part of this patch ^ that is
> missing.

I'll ask the display guys what happened there, but in the meantime,
I'll fix that up.

>
> In addition, only the first four patches of the series were applied.

The rest were still going through CI when I pushed out my updates.

Alex

>
> Thanks,
>
> Melissa
>
> >
> > From: Stephen Rothwell <[email protected]>
> > Date: Tue, 12 Dec 2023 13:53:55 +1100
> > Subject: [PATCH] drm: remove unused function drm_atomic_replace_property_blob_from_id()
> >
> > Signed-off-by: Stephen Rothwell <[email protected]>
> > ---
> > drivers/gpu/drm/drm_atomic_uapi.c | 42 -------------------------------
> > 1 file changed, 42 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
> > index 70ddbb93e466..29d4940188d4 100644
> > --- a/drivers/gpu/drm/drm_atomic_uapi.c
> > +++ b/drivers/gpu/drm/drm_atomic_uapi.c
> > @@ -362,48 +362,6 @@ static s32 __user *get_out_fence_for_connector(struct drm_atomic_state *state,
> > return fence_ptr;
> > }
> >
> > -static int
> > -drm_atomic_replace_property_blob_from_id(struct drm_device *dev,
> > - struct drm_property_blob **blob,
> > - uint64_t blob_id,
> > - ssize_t expected_size,
> > - ssize_t expected_elem_size,
> > - bool *replaced)
> > -{
> > - struct drm_property_blob *new_blob = NULL;
> > -
> > - if (blob_id != 0) {
> > - new_blob = drm_property_lookup_blob(dev, blob_id);
> > - if (new_blob == NULL) {
> > - drm_dbg_atomic(dev,
> > - "cannot find blob ID %llu\n", blob_id);
> > - return -EINVAL;
> > - }
> > -
> > - if (expected_size > 0 &&
> > - new_blob->length != expected_size) {
> > - drm_dbg_atomic(dev,
> > - "[BLOB:%d] length %zu different from expected %zu\n",
> > - new_blob->base.id, new_blob->length, expected_size);
> > - drm_property_blob_put(new_blob);
> > - return -EINVAL;
> > - }
> > - if (expected_elem_size > 0 &&
> > - new_blob->length % expected_elem_size != 0) {
> > - drm_dbg_atomic(dev,
> > - "[BLOB:%d] length %zu not divisible by element size %zu\n",
> > - new_blob->base.id, new_blob->length, expected_elem_size);
> > - drm_property_blob_put(new_blob);
> > - return -EINVAL;
> > - }
> > - }
> > -
> > - *replaced |= drm_property_replace_blob(blob, new_blob);
> > - drm_property_blob_put(new_blob);
> > -
> > - return 0;
> > -}
> > -
> > static int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
> > struct drm_crtc_state *state, struct drm_property *property,
> > uint64_t val)
> > --
> > 2.40.1
> >
> > --
> > Cheers,
> > Stephen Rothwell
>
>