Skip to contentSkip to conversation

drm/nouveau:disp: Remove set but not used variable 'ret'

PATCH In review Baokun Li 1 participant 3 messages May 15, 2021 – Jun 15, 2021

Subsystems (3)
lore
Share & tools
lore

Baokun Li

author
#0 lore raw

PATCH 1/1 drm/nouveau:disp: Remove set but not used variable 'ret'

From: "[email protected]" <[email protected]>

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/nouveau/dispnv50/disp.c: In function 'nv50_mstm_cleanup':
drivers/gpu/drm/nouveau/dispnv50/disp.c:1389:6: warning:
variable ‘ret’ set but not used [-Wunused-but-set-variable]

drivers/gpu/drm/nouveau/dispnv50/disp.c: In function 'nv50_mstm_prepare':
drivers/gpu/drm/nouveau/dispnv50/disp.c:1413:6: warning:
variable ‘ret’ set but not used [-Wunused-but-set-variable]

It never used since introduction.

---
 drivers/gpu/drm/nouveau/dispnv50/disp.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/gpu/drm/nouveau/dispnv50/disp.c +3 -6
index 1c9c0cdf85db..5ee3f1fc76d7 100644
@@ -1386,12 +1386,10 @@ nv50_mstm_cleanup(struct nv50_mstm *mstm)
 {
 	struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev);
 	struct drm_encoder *encoder;
-	int ret;
 
 	NV_ATOMIC(drm, "%s: mstm cleanup\n", mstm->outp->base.base.name);
-	ret = drm_dp_check_act_status(&mstm->mgr);
-
-	ret = drm_dp_update_payload_part2(&mstm->mgr);
+	drm_dp_check_act_status(&mstm->mgr);
+	drm_dp_update_payload_part2(&mstm->mgr);
 
 	drm_for_each_encoder(encoder, mstm->outp->base.base.dev) {
 		if (encoder->encoder_type == DRM_MODE_ENCODER_DPMST) {
@@ -1410,10 +1408,9 @@ nv50_mstm_prepare(struct nv50_mstm *mstm)
 {
 	struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev);
 	struct drm_encoder *encoder;
-	int ret;
 
 	NV_ATOMIC(drm, "%s: mstm prepare\n", mstm->outp->base.base.name);
-	ret = drm_dp_update_payload_part1(&mstm->mgr);
+	drm_dp_update_payload_part1(&mstm->mgr);
 
 	drm_for_each_encoder(encoder, mstm->outp->base.base.dev) {
 		if (encoder->encoder_type == DRM_MODE_ENCODER_DPMST) {
Signature · 1 line
2.25.4
#1 lore raw

ping

Quoted 50 lines · Baokun Li

From: "[email protected]" <[email protected]>

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/nouveau/dispnv50/disp.c: In function 'nv50_mstm_cleanup':
drivers/gpu/drm/nouveau/dispnv50/disp.c:1389:6: warning:
variable ‘ret’ set but not used [-Wunused-but-set-variable]

drivers/gpu/drm/nouveau/dispnv50/disp.c: In function 'nv50_mstm_prepare':
drivers/gpu/drm/nouveau/dispnv50/disp.c:1413:6: warning:
variable ‘ret’ set but not used [-Wunused-but-set-variable]

It never used since introduction.

---
  drivers/gpu/drm/nouveau/dispnv50/disp.c | 9 +++------
  1 file changed, 3 insertions(+), 6 deletions(-)
drivers/gpu/drm/nouveau/dispnv50/disp.c +3 -6
index 1c9c0cdf85db..5ee3f1fc76d7 100644
@@ -1386,12 +1386,10 @@ nv50_mstm_cleanup(struct nv50_mstm *mstm)
  {
  	struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev);
  	struct drm_encoder *encoder;
-	int ret;
 
  	NV_ATOMIC(drm, "%s: mstm cleanup\n", mstm->outp->base.base.name);
-	ret = drm_dp_check_act_status(&mstm->mgr);
-
-	ret = drm_dp_update_payload_part2(&mstm->mgr);
+	drm_dp_check_act_status(&mstm->mgr);
+	drm_dp_update_payload_part2(&mstm->mgr);
 
  	drm_for_each_encoder(encoder, mstm->outp->base.base.dev) {
  		if (encoder->encoder_type == DRM_MODE_ENCODER_DPMST) {
@@ -1410,10 +1408,9 @@ nv50_mstm_prepare(struct nv50_mstm *mstm)
  {
  	struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev);
  	struct drm_encoder *encoder;
-	int ret;
 
  	NV_ATOMIC(drm, "%s: mstm prepare\n", mstm->outp->base.base.name);
-	ret = drm_dp_update_payload_part1(&mstm->mgr);
+	drm_dp_update_payload_part1(&mstm->mgr);
 
  	drm_for_each_encoder(encoder, mstm->outp->base.base.dev) {
  		if (encoder->encoder_type == DRM_MODE_ENCODER_DPMST) {
#2 lore raw
In reply to Baokun Li

ping

Quoted 50 lines · Baokun Li

From: "[email protected]" <[email protected]>

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/nouveau/dispnv50/disp.c: In function 'nv50_mstm_cleanup':
drivers/gpu/drm/nouveau/dispnv50/disp.c:1389:6: warning:
variable ‘ret’ set but not used [-Wunused-but-set-variable]

drivers/gpu/drm/nouveau/dispnv50/disp.c: In function 'nv50_mstm_prepare':
drivers/gpu/drm/nouveau/dispnv50/disp.c:1413:6: warning:
variable ‘ret’ set but not used [-Wunused-but-set-variable]

It never used since introduction.

---
  drivers/gpu/drm/nouveau/dispnv50/disp.c | 9 +++------
  1 file changed, 3 insertions(+), 6 deletions(-)
drivers/gpu/drm/nouveau/dispnv50/disp.c +3 -6
index 1c9c0cdf85db..5ee3f1fc76d7 100644
@@ -1386,12 +1386,10 @@ nv50_mstm_cleanup(struct nv50_mstm *mstm)
  {
  	struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev);
  	struct drm_encoder *encoder;
-	int ret;
 
  	NV_ATOMIC(drm, "%s: mstm cleanup\n", mstm->outp->base.base.name);
-	ret = drm_dp_check_act_status(&mstm->mgr);
-
-	ret = drm_dp_update_payload_part2(&mstm->mgr);
+	drm_dp_check_act_status(&mstm->mgr);
+	drm_dp_update_payload_part2(&mstm->mgr);
 
  	drm_for_each_encoder(encoder, mstm->outp->base.base.dev) {
  		if (encoder->encoder_type == DRM_MODE_ENCODER_DPMST) {
@@ -1410,10 +1408,9 @@ nv50_mstm_prepare(struct nv50_mstm *mstm)
  {
  	struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev);
  	struct drm_encoder *encoder;
-	int ret;
 
  	NV_ATOMIC(drm, "%s: mstm prepare\n", mstm->outp->base.base.name);
-	ret = drm_dp_update_payload_part1(&mstm->mgr);
+	drm_dp_update_payload_part1(&mstm->mgr);
 
  	drm_for_each_encoder(encoder, mstm->outp->base.base.dev) {
  		if (encoder->encoder_type == DRM_MODE_ENCODER_DPMST) {