Skip to contentSkip to conversation

ALSA: ctxfi: remove unused variable

PATCH Applied Sudip Mukherjee 2 participants 2 messages Oct 21, 2014 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: ctxfi: remove unused variable

As of now the pointer to struct dai is not being used anywhere in the function. So it is safe to remove the variable.
If we are ever doing anything with the container_of(daio, struct dai, daio), then at that time we can again add the variable.

---
 sound/pci/ctxfi/ctatc.c | 4 ----
 1 file changed, 4 deletions(-)
sound/pci/ctxfi/ctatc.c +0 -4
index 4546590..632e843 100644
@@ -1145,7 +1145,6 @@ static int atc_release_resources(struct ct_atc *atc)
 	int i;
 	struct daio_mgr *daio_mgr = NULL;
 	struct dao *dao = NULL;
-	struct dai *dai = NULL;
 	struct daio *daio = NULL;
 	struct sum_mgr *sum_mgr = NULL;
 	struct src_mgr *src_mgr = NULL;
@@ -1172,9 +1171,6 @@ static int atc_release_resources(struct ct_atc *atc)
 				dao = container_of(daio, struct dao, daio);
 				dao->ops->clear_left_input(dao);
 				dao->ops->clear_right_input(dao);
-			} else {
-				dai = container_of(daio, struct dai, daio);
-				/* some thing to do for dai ... */
 			}
 			daio_mgr->put_daio(daio_mgr, daio);
 		}
Signature · 1 line
1.8.1.2
Applied
#1 lore raw

At Tue, 21 Oct 2014 16:28:47 +0530,

Quoted 7 lines · Sudip Mukherjee

As of now the pointer to struct dai is not being used anywhere in the function. So it is safe to remove the variable.
If we are ever doing anything with the container_of(daio, struct dai, daio), then at that time we can again add the variable.

Applied, thanks.

Takashi

Quoted 29 lines
---
 sound/pci/ctxfi/ctatc.c | 4 ----
 1 file changed, 4 deletions(-)
sound/pci/ctxfi/ctatc.c +0 -4
index 4546590..632e843 100644
@@ -1145,7 +1145,6 @@ static int atc_release_resources(struct ct_atc *atc)
 	int i;
 	struct daio_mgr *daio_mgr = NULL;
 	struct dao *dao = NULL;
-	struct dai *dai = NULL;
 	struct daio *daio = NULL;
 	struct sum_mgr *sum_mgr = NULL;
 	struct src_mgr *src_mgr = NULL;
@@ -1172,9 +1171,6 @@ static int atc_release_resources(struct ct_atc *atc)
 				dao = container_of(daio, struct dao, daio);
 				dao->ops->clear_left_input(dao);
 				dao->ops->clear_right_input(dao);
-			} else {
-				dai = container_of(daio, struct dai, daio);
-				/* some thing to do for dai ... */
 			}
 			daio_mgr->put_daio(daio_mgr, daio);
 		}
Signature · 1 line
1.8.1.2