lkml.org 
[lkml]   [2014]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: [PATCH 1/2] [CIFS] Fix signed/unsigned pointer warning
On Sun, Dec 14, 2014 at 4:28 PM, Steve French <smfrench@gmail.com> wrote:
> On Sat, Dec 13, 2014 at 11:29 PM, Kevin Cernekee <cernekee@gmail.com> wrote:
>> On Sat, Dec 13, 2014 at 9:20 PM, Steve French <smfrench@gmail.com> wrote:
>>> Probably harmless patch - but I didn't notice the warning on x86
>>> kernel build (building on Fedora 21, gcc 4.9.2)
>>
>> Did you test x86 32-bit or 64-bit? In the generic do_div()
>
> I built current mainline with 64 bit disabled. No warnings on this
> before or after the patch.

Ah, right, it only shows up on 32-bit architectures that use the
generic do_div implementation. To see the warning on x86, you'd need
to do something like this:

$ git --no-pager diff
diff --git a/arch/x86/include/asm/div64.h b/arch/x86/include/asm/div64.h
index ced283a..f693002 100644
--- a/arch/x86/include/asm/div64.h
+++ b/arch/x86/include/asm/div64.h
@@ -1,7 +1,7 @@
#ifndef _ASM_X86_DIV64_H
#define _ASM_X86_DIV64_H

-#ifdef CONFIG_X86_32
+#if 0//def CONFIG_X86_32

#include <linux/types.h>
#include <linux/log2.h>
$ touch fs/cifs/netmisc.c
$ make ARCH=x86 vmlinux
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CC fs/cifs/netmisc.o
fs/cifs/netmisc.c: In function ‘cifs_NTtimeToUnix’:
fs/cifs/netmisc.c:937:23: warning: comparison of distinct pointer
types lacks a cast [enabled by default]
fs/cifs/netmisc.c:941:22: warning: comparison of distinct pointer
types lacks a cast [enabled by default]
LD fs/cifs/cifs.o
LD fs/cifs/built-in.o
LD fs/built-in.o
LINK vmlinux
LD vmlinux.o
MODPOST vmlinux.o
GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
LD init/built-in.o
KSYM .tmp_kallsyms1.o
KSYM .tmp_kallsyms2.o
LD vmlinux
SORTEX vmlinux
SYSMAP System.map
$

> merged into cifs-2.6.git

Thanks!


\
 
 \ /
  Last update: 2014-12-15 02:21    [W:0.052 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site