Skip to contentSkip to conversation

cifs: Use ULL suffix for 64-bit constant

PATCH In review Geert Uytterhoeven 2 participants 2 messages Apr 5, 2018 – Apr 10, 2018

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

PATCH 1/1 cifs: Use ULL suffix for 64-bit constant

On 32-bit (e.g. with m68k-linux-gnu-gcc-4.1):

fs/cifs/inode.c: In function ‘simple_hashstr’:
fs/cifs/inode.c:713: warning: integer constant is too large for ‘long’ type

Fixes 7ea884c77e5c97f1 ("smb3: Fix root directory when server returns inode number of zero")
---
 fs/cifs/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/cifs/inode.c +1 -1
index f856df4adae3c8e8..3c371f7f5963e793 100644
@@ -710,7 +710,7 @@ cifs_get_file_info(struct file *filp)
 /* Simple function to return a 64 bit hash of string.  Rarely called */
 static __u64 simple_hashstr(const char *str)
 {
-	const __u64 hash_mult =  1125899906842597L; /* a big enough prime */
+	const __u64 hash_mult =  1125899906842597ULL; /* a big enough prime */
 	__u64 hash = 0;
 
 	while (*str)
Signature · 1 line
2.7.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Geert Uytterhoeven

On 32-bit (e.g. with m68k-linux-gnu-gcc-4.1):

fs/cifs/inode.c: In function ‘simple_hashstr’:
fs/cifs/inode.c:713: warning: integer constant is too large for ‘long’ type

Fixes 7ea884c77e5c97f1 ("smb3: Fix root directory when server returns inode number of zero")

this is already in Steve's for-next, marking as reviewed:

Signature · 4 lines
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)