Skip to contentSkip to conversation

arch:arm:plat-omap:iovmm: remove unused variable 'va'

PATCH In review Maxin B. John 2 participants 3 messages Aug 8, 2011 – Aug 10, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch:arm:plat-omap:iovmm: remove unused variable 'va'

The pointer "va" returned from "phys_to_virt(pa)" is never used in "sgtable_fill_kmalloc()".So,it is safe to remove this set-but-unused variable.

---

arch/arm/plat-omap/iovmm.c +0 -3
index c60737c..79e7fed 100644
@@ -423,9 +423,6 @@ static void sgtable_fill_kmalloc(struct sg_table *sgt, u32 pa, u32 da,
 {
 	unsigned int i;
 	struct scatterlist *sg;
-	void *va;
-
-	va = phys_to_virt(pa);
 
 	for_each_sg(sgt->sgl, sg, sgt->nents, i) {
 		unsigned bytes;
#1 lore raw

ping.

Quoted 20 lines · Maxin B. John

The pointer "va" returned from "phys_to_virt(pa)" is never used in "sgtable_fill_kmalloc()".So,it is safe to remove this set-but-unused variable.

---

arch/arm/plat-omap/iovmm.c +0 -3
index c60737c..79e7fed 100644
@@ -423,9 +423,6 @@ static void sgtable_fill_kmalloc(struct sg_table *sgt, u32 pa, u32 da,
 ?{
 ? ? ? ?unsigned int i;
 ? ? ? ?struct scatterlist *sg;
- ? ? ? void *va;
-
- ? ? ? va = phys_to_virt(pa);
 
 ? ? ? ?for_each_sg(sgt->sgl, sg, sgt->nents, i) {
 ? ? ? ? ? ? ? ?unsigned bytes;
#2 lore raw
Quoted 1 line · Maxin B John

ping.

Sorry I've been on vacation, applying to fixes.

Regards,

Tony

Quoted 21 lines · Maxin B. John
Quoted 20 lines

The pointer "va" returned from "phys_to_virt(pa)" is never used in "sgtable_fill_kmalloc()".So,it is safe to remove this set-but-unused variable.

---

arch/arm/plat-omap/iovmm.c +0 -3
index c60737c..79e7fed 100644
@@ -423,9 +423,6 @@ static void sgtable_fill_kmalloc(struct sg_table *sgt, u32 pa, u32 da,
 ?{
 ? ? ? ?unsigned int i;
 ? ? ? ?struct scatterlist *sg;
- ? ? ? void *va;
-
- ? ? ? va = phys_to_virt(pa);
 
 ? ? ? ?for_each_sg(sgt->sgl, sg, sgt->nents, i) {
 ? ? ? ? ? ? ? ?unsigned bytes;