Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [Low] Unused local variables `dev` and `vbox_connector` due to the removal of 
the `dev` parameter from `drm_mode_destroy()`.
--

commit 9caafe56634afb7bf9e65d116788497811b64f48
Author: Jan Niedziolka <[email protected]>

gpu/drm: Remove unused *dev parameter from drm_mode_destroy function

This commit removes the unused dev parameter from the drm_mode_destroy
function prototype and updates all callers across the tree to match.

[ ... ]

> diff --git a/drivers/gpu/drm/vboxvideo/vbox_mode.c 
> b/drivers/gpu/drm/vboxvideo/vbox_mode.c
> index 8e4e5fc9d3c5a..fbe5c2382983e 100644
> --- a/drivers/gpu/drm/vboxvideo/vbox_mode.c
> +++ b/drivers/gpu/drm/vboxvideo/vbox_mode.c
> @@ -782,7 +782,7 @@ static int vbox_fill_modes(struct drm_connector 
> *connector, u32 max_x,
>       dev = vbox_connector->base.dev;
>       list_for_each_entry_safe(mode, iterator, &connector->modes, head) {
>               list_del(&mode->head);
> -             drm_mode_destroy(dev, mode);
> +             drm_mode_destroy(mode);

[Severity: Low]
Since the dev parameter was removed from drm_mode_destroy(), are the dev and
vbox_connector variables now completely unused in vbox_fill_modes()?

Looking at the full function context:

static int vbox_fill_modes(struct drm_connector *connector, u32 max_x, u32 
max_y)
{
        struct vbox_connector *vbox_connector;
        struct drm_device *dev;
        struct drm_display_mode *mode, *iterator;

        vbox_connector = to_vbox_connector(connector);
        dev = vbox_connector->base.dev;
        list_for_each_entry_safe(mode, iterator, &connector->modes, head) {
                list_del(&mode->head);
                drm_mode_destroy(mode);
        }

        return drm_helper_probe_single_connector_modes(connector, max_x, max_y);
}

Could leaving these assignments here trigger unused-but-set-variable compiler
warnings, potentially breaking builds with -Werror enabled?

>       }
>  
>       return drm_helper_probe_single_connector_modes(connector, max_x, max_y);

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=1

Reply via email to