Skip to content

Commit

Permalink
cifs: Use ULL suffix for 64-bit constant
Browse files Browse the repository at this point in the history
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: 7ea884c ("smb3: Fix root directory when server returns inode number of zero")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
  • Loading branch information
Geert Uytterhoeven authored and Steve French committed Apr 11, 2018
1 parent c318e6c commit 3995bbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/cifs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3995bbf

Please sign in to comment.