Skip to contentSkip to conversation

i40e: mark constant as ULL

PATCH In review Stefan Assmann 2 participants 7 messages Feb 4, 2015 – Feb 24, 2015

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

PATCH 1/1 i40e: mark constant as ULL

This avoids a compile error on 32bit.

---
 drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c +1 -1
index 4627588..f221ace 100644
@@ -908,7 +908,7 @@ static void i40e_write_qword(u8 *hmc_bits,
 	if (ce_info->width < 64)
 		mask = ((u64)1 << ce_info->width) - 1;
 	else
-		mask = 0xFFFFFFFFFFFFFFFF;
+		mask = 0xFFFFFFFFFFFFFFFFULL;
 
 	/* don't swizzle the bits until after the mask because the mask bits
 	 * will be in a different bit position on big endian machines
Signature · 1 line
2.1.0
#1 lore raw
Quoted 6 lines · Stefan Assmann

This avoids a compile error on 32bit.

---
 drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Thanks Stefan, I will add your patch to my queue.

#2 lore raw
In reply to Stefan Assmann
Quoted 6 lines · Stefan Assmann

This avoids a compile error on 32bit.

---
 drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Come to find out, I already have a fix in my queue for this. So I will be dropping your patch.

The patch in my queue fixes the issue by doing the folling change:
- mask = 0xFFFFFFFFFFFFFFFF;
+ mask = ~(u64)0;

#3 lore raw
Quoted 13 lines · Jeff Kirsher
Quoted 6 lines · Stefan Assmann

This avoids a compile error on 32bit.

---
 drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Come to find out, I already have a fix in my queue for this. So I will be dropping your patch.

The patch in my queue fixes the issue by doing the folling change:

Review

Quoted 2 lines
(quoted diff) +1 -1
-               mask = 0xFFFFFFFFFFFFFFFF;
+               mask = ~(u64)0;

OK.

Stefan

#4 lore raw
In reply to Jeff Kirsher
Quoted 13 lines · Jeff Kirsher
Quoted 6 lines · Stefan Assmann

This avoids a compile error on 32bit.

---
 drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Come to find out, I already have a fix in my queue for this. So I will be dropping your patch.

The patch in my queue fixes the issue by doing the folling change:

Review

Quoted 2 lines
(quoted diff) +1 -1
-               mask = 0xFFFFFFFFFFFFFFFF;
+               mask = ~(u64)0;

Jeff,

this does not seem to compile on 32bit either. Please verify and if you agree let's put my patch back in place instead of this one. IIRC your patch has not been posted yet.

Stefan

#5 lore raw
Quoted 17 lines · Stefan Assmann
Quoted 13 lines · Jeff Kirsher
Quoted 6 lines · Stefan Assmann

This avoids a compile error on 32bit.

---
 drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Come to find out, I already have a fix in my queue for this. So I will be dropping your patch.

The patch in my queue fixes the issue by doing the folling change:

Review

Quoted 2 lines
(quoted diff) +1 -1
-               mask = 0xFFFFFFFFFFFFFFFF;
+               mask = ~(u64)0;
Quoted 8 lines

Jeff,

this does not seem to compile on 32bit either. Please verify and if you agree let's put my patch back in place instead of this one. IIRC your patch has not been posted yet.

Stefan

Jeff,

I fat fingered this, everything ok. Please ignore my last comment.

Stefan

#6 lore raw
Quoted 25 lines · Stefan Assmann
Quoted 10 lines · Stefan Assmann
Quoted 9 lines · Jeff Kirsher
Quoted 6 lines · Stefan Assmann

This avoids a compile error on 32bit.

---
 drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Come to find out, I already have a fix in my queue for this. So I

will

Quoted 13 lines

Review

Quoted 6 lines

be dropping your patch.

The patch in my queue fixes the issue by doing the folling change:

(quoted diff) +1 -1
-               mask = 0xFFFFFFFFFFFFFFFF;
+               mask = ~(u64)0;

Jeff,

this does not seem to compile on 32bit either. Please verify and if you agree let's put my patch back in place instead of this one. IIRC your patch has not been posted yet.

Quoted 6 lines
Quoted 2 lines

Stefan

Jeff,

I fat fingered this, everything ok. Please ignore my last comment.

Ok, good to know. I was wondering why our validation had not seen the same issue.