drm: ssd130x: remove redundant initialization of pointer mode
PATCH 1/1 drm: ssd130x: remove redundant initialization of pointer mode
Pointer mode is being assigned a value that is never read, it is being re-assigned later with a new value. The initialization is redundant and can be removed.
Cleans up clang scan build warning:drivers/gpu/drm/solomon/ssd130x.c:582:27: warning: Value stored to 'mode' during its initialization is never read [deadcode.DeadStores]
--- drivers/gpu/drm/solomon/ssd130x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/solomon/ssd130x.c +1 -1
@@ -579,7 +579,7 @@ static const struct drm_simple_display_pipe_funcs ssd130x_pipe_funcs = {static int ssd130x_connector_get_modes (struct drm_connector *connector) {struct ssd130x_device *ssd130x =drm_to_ssd130x (connector->dev); -struct drm_display_mode *mode = &ssd130x->mode; +struct drm_display_mode *mode;struct device *dev = ssd130x->dev; mode =drm_mode_duplicate (connector->dev, &ssd130x->mode);
Signature · 1 line
2.34.1
Hello Colin,
Thanks for the patch.
Quoted 5 lines · Colin Ian King
Pointer mode is being assigned a value that is never read, it is being re-assigned later with a new value. The initialization is redundant and can be removed.
Indeed.
Best regards,
Javier
Quoted 6 lines · Javier Martinez Canillas
Hello Colin,
Thanks for the patch.
Quoted 1 line · Colin Ian King
Quoted 9 lines
Quoted 4 lines
Pointer mode is being assigned a value that is never read, it is being re-assigned later with a new value. The initialization is redundant and can be removed.
Indeed.
Pushed to drm-misc-next (with fixed drm/ssd130x subject prefix).
Thanks!
--
Best regards,
Javier Martinez Canillas
Linux Engineering
Red Hat