Skip to contentSkip to conversation

staging: vboxvideo: remove unused variables

PATCH In review Paolo Cretaro 3 participants 3 messages Jul 22, 2017 – Jul 23, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: vboxvideo: remove unused variables

Fix compiler warnings:
vbox_mode.c:57:15: warning: variable ‘crtc_id’ set but not used vbox_mode.c:581:25: warning: variable ‘vbox_connector’ set but not used

---
 drivers/staging/vboxvideo/vbox_mode.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/staging/vboxvideo/vbox_mode.c +0 -5
index f2b85f3256fa..a7eea70a3804 100644
@@ -54,14 +54,12 @@ static void vbox_do_modeset(struct drm_crtc *crtc,
 	struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc);
 	struct vbox_private *vbox;
 	int width, height, bpp, pitch;
-	unsigned int crtc_id;
 	u16 flags;
 	s32 x_offset, y_offset;
 
 	vbox = crtc->dev->dev_private;
 	width = mode->hdisplay ? mode->hdisplay : 640;
 	height = mode->vdisplay ? mode->vdisplay : 480;
-	crtc_id = vbox_crtc->crtc_id;
 	bpp = crtc->enabled ? CRTC_FB(crtc)->format->cpp[0] * 8 : 32;
 	pitch = crtc->enabled ? CRTC_FB(crtc)->pitches[0] : width * bpp / 8;
 	x_offset = vbox->single_framebuffer ? crtc->x : vbox_crtc->x_hint;
@@ -578,9 +576,6 @@ static int vbox_mode_valid(struct drm_connector *connector,
 
 static void vbox_connector_destroy(struct drm_connector *connector)
 {
-	struct vbox_connector *vbox_connector;
-
-	vbox_connector = to_vbox_connector(connector);
 	drm_connector_unregister(connector);
 	drm_connector_cleanup(connector);
 	kfree(connector);
Signature · 1 line
2.13.3
Acked-by on v1 1/1
#1 lore raw

Hi,

Quoted 5 lines · Paolo Cretaro

Fix compiler warnings:
vbox_mode.c:57:15: warning: variable ‘crtc_id’ set but not used vbox_mode.c:581:25: warning: variable ‘vbox_connector’ set but not used

Patch looks good to me:

Regards,

Hans

Quoted 34 lines
---
  drivers/staging/vboxvideo/vbox_mode.c | 5 -----
  1 file changed, 5 deletions(-)
drivers/staging/vboxvideo/vbox_mode.c +0 -5
index f2b85f3256fa..a7eea70a3804 100644
@@ -54,14 +54,12 @@ static void vbox_do_modeset(struct drm_crtc *crtc,
  	struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc);
  	struct vbox_private *vbox;
  	int width, height, bpp, pitch;
-	unsigned int crtc_id;
  	u16 flags;
  	s32 x_offset, y_offset;
 
  	vbox = crtc->dev->dev_private;
  	width = mode->hdisplay ? mode->hdisplay : 640;
  	height = mode->vdisplay ? mode->vdisplay : 480;
-	crtc_id = vbox_crtc->crtc_id;
  	bpp = crtc->enabled ? CRTC_FB(crtc)->format->cpp[0] * 8 : 32;
  	pitch = crtc->enabled ? CRTC_FB(crtc)->pitches[0] : width * bpp / 8;
  	x_offset = vbox->single_framebuffer ? crtc->x : vbox_crtc->x_hint;
@@ -578,9 +576,6 @@ static int vbox_mode_valid(struct drm_connector *connector,
 
  static void vbox_connector_destroy(struct drm_connector *connector)
  {
-	struct vbox_connector *vbox_connector;
-
-	vbox_connector = to_vbox_connector(connector);
  	drm_connector_unregister(connector);
  	drm_connector_cleanup(connector);
  	kfree(connector);
#2 lore raw

Hello,

Quoted 7 lines · Hans de Goede

Hi,

Quoted 4 lines · Paolo Cretaro

Fix compiler warnings:
vbox_mode.c:57:15: warning: variable ‘crtc_id’ set but not used vbox_mode.c:581:25: warning: variable ‘vbox_connector’ set but not used

Quoted 5 lines
Quoted 1 line

Patch looks good to me:

This is more or less copied and pasted from my reply to Colin King's patch on the 19th, but it applies equally here.

Looks good to me too. Not had time to actually apply it yet, but as said, it looks completely sensible.

Regards
Michael

Quoted 40 lines

Regards,

Hans

Quoted 35 lines
---
  drivers/staging/vboxvideo/vbox_mode.c | 5 -----
  1 file changed, 5 deletions(-)
drivers/staging/vboxvideo/vbox_mode.c +0 -5
index f2b85f3256fa..a7eea70a3804 100644
@@ -54,14 +54,12 @@ static void vbox_do_modeset(struct drm_crtc *crtc,
      struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc);
      struct vbox_private *vbox;
      int width, height, bpp, pitch;
-    unsigned int crtc_id;
      u16 flags;
      s32 x_offset, y_offset;
        vbox = crtc->dev->dev_private;
      width = mode->hdisplay ? mode->hdisplay : 640;
      height = mode->vdisplay ? mode->vdisplay : 480;
-    crtc_id = vbox_crtc->crtc_id;
      bpp = crtc->enabled ? CRTC_FB(crtc)->format->cpp[0] * 8 : 32;
      pitch = crtc->enabled ? CRTC_FB(crtc)->pitches[0] : width * bpp
 / 8;
      x_offset = vbox->single_framebuffer ? crtc->x : vbox_crtc->x_hint;
@@ -578,9 +576,6 @@ static int vbox_mode_valid(struct drm_connector
 *connector,
    static void vbox_connector_destroy(struct drm_connector *connector)
  {
-    struct vbox_connector *vbox_connector;
-
-    vbox_connector = to_vbox_connector(connector);
      drm_connector_unregister(connector);
      drm_connector_cleanup(connector);
      kfree(connector);
Signature · 11 lines
Michael Thayer | VirtualBox engineer
ORACLE Deutschland B.V. & Co. KG | Werkstr. 24 | D-71384 Weinstadt

ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstraße 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande Handelsregister
der Handelskammer Midden-Nederland, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher