On Tue, Dec 12, 2023 at 4:02 AM Melissa Wen <mwen@xxxxxxxxxx> wrote: > > On 12/12, Stephen Rothwell wrote: > > Hi all, > > > > On Tue, 12 Dec 2023 11:04:15 +1100 Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> 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/20231116195812.906115-3-mwen@xxxxxxxxxx/ > 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 <sfr@xxxxxxxxxxxxxxxx> > > 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 <sfr@xxxxxxxxxxxxxxxx> > > --- > > 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 > >