Skip to contentSkip to conversation

arm: msm: smd: convert unsigned addr to unsigned long

PATCH In review Daniel Walker 2 participants 2 messages Apr 19, 2010 – Apr 20, 2010

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

PATCH 3/5 arm: msm: smd: convert unsigned addr to unsigned long

"unsigned" translates to "unsigned int", but this value holds an address. We always want to use unsigned long for addresses since it will change size to fit the machine.

This just convert the one address holder to unsigned long.

---
 arch/arm/mach-msm/smd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-msm/smd.c +1 -1
index 6237a6c..4dd0d08 100644
@@ -867,9 +867,9 @@ static irqreturn_t smsm_irq_handler(int irq, void *data)
 int smsm_change_state(enum smsm_state_item item,
 		      uint32_t clear_mask, uint32_t set_mask)
 {
+	unsigned long addr = smd_info.state + item * 4;
 	unsigned long flags;
 	unsigned state;
-	unsigned addr = smd_info.state + item * 4;
 
 	if (!smd_info.ready)
 		return -EIO;
Signature · 1 line
1.6.2.3
#1 lore raw
Quoted 7 lines · Daniel Walker

"unsigned" translates to "unsigned int", but this value holds an address. We always want to use unsigned long for addresses since it will change size to fit the machine.

This just convert the one address holder to unsigned long.

ack.

Quoted 19 lines
---
 arch/arm/mach-msm/smd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-msm/smd.c +1 -1
index 6237a6c..4dd0d08 100644
@@ -867,9 +867,9 @@ static irqreturn_t smsm_irq_handler(int irq, void *data)
 int smsm_change_state(enum smsm_state_item item,
 		      uint32_t clear_mask, uint32_t set_mask)
 {
+	unsigned long addr = smd_info.state + item * 4;
 	unsigned long flags;
 	unsigned state;
-	unsigned addr = smd_info.state + item * 4;
 
 	if (!smd_info.ready)
 		return -EIO;
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html