diff options
author | Thierry Reding <treding@nvidia.com> | 2014-07-28 11:01:49 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2014-07-29 19:28:15 -0400 |
commit | 6b15075c2c3662dbe1ac41404c6a2013b24efa1d (patch) | |
tree | 361a148e23953d2bc770df879b4f1b4531558e84 /arch/ia64/sn/kernel/bte.c | |
parent | 882d6f384b1ea58bc04a16b855492f5d683bc97b (diff) |
[IA64] sn: Do not needlessly convert between pointers and integers
The nasid_to_try variable is an array of integers, so plain integers can
be used when assigning values to the elements rather than casting a NULL
pointer to an integer, which results in the following warning from GCC:
arch/ia64/sn/kernel/bte.c:117:22: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
nasid_to_try[1] = (int)NULL;
^
arch/ia64/sn/kernel/bte.c:125:22: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
nasid_to_try[1] = (int)NULL;
^
Replace (int)NULL with a simple 0 to silence these warnings.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/sn/kernel/bte.c')
-rw-r--r-- | arch/ia64/sn/kernel/bte.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/ia64/sn/kernel/bte.c b/arch/ia64/sn/kernel/bte.c index cad775a1a157..b2eb48490754 100644 --- a/arch/ia64/sn/kernel/bte.c +++ b/arch/ia64/sn/kernel/bte.c | |||
@@ -114,7 +114,7 @@ bte_result_t bte_copy(u64 src, u64 dest, u64 len, u64 mode, void *notification) | |||
114 | if (mode & BTE_USE_ANY) { | 114 | if (mode & BTE_USE_ANY) { |
115 | nasid_to_try[1] = my_nasid; | 115 | nasid_to_try[1] = my_nasid; |
116 | } else { | 116 | } else { |
117 | nasid_to_try[1] = (int)NULL; | 117 | nasid_to_try[1] = 0; |
118 | } | 118 | } |
119 | } else { | 119 | } else { |
120 | /* try local then remote */ | 120 | /* try local then remote */ |
@@ -122,7 +122,7 @@ bte_result_t bte_copy(u64 src, u64 dest, u64 len, u64 mode, void *notification) | |||
122 | if (mode & BTE_USE_ANY) { | 122 | if (mode & BTE_USE_ANY) { |
123 | nasid_to_try[1] = NASID_GET(dest); | 123 | nasid_to_try[1] = NASID_GET(dest); |
124 | } else { | 124 | } else { |
125 | nasid_to_try[1] = (int)NULL; | 125 | nasid_to_try[1] = 0; |
126 | } | 126 | } |
127 | } | 127 | } |
128 | 128 | ||