瀏覽代碼

[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>
Thierry Reding 11 年之前
父節點
當前提交
6b15075c2c
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      arch/ia64/sn/kernel/bte.c

+ 2 - 2
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)
 		if (mode & BTE_USE_ANY) {
 		if (mode & BTE_USE_ANY) {
 			nasid_to_try[1] = my_nasid;
 			nasid_to_try[1] = my_nasid;
 		} else {
 		} else {
-			nasid_to_try[1] = (int)NULL;
+			nasid_to_try[1] = 0;
 		}
 		}
 	} else {
 	} else {
 		/* try local then remote */
 		/* try local then remote */
@@ -122,7 +122,7 @@ bte_result_t bte_copy(u64 src, u64 dest, u64 len, u64 mode, void *notification)
 		if (mode & BTE_USE_ANY) {
 		if (mode & BTE_USE_ANY) {
 			nasid_to_try[1] = NASID_GET(dest);
 			nasid_to_try[1] = NASID_GET(dest);
 		} else {
 		} else {
-			nasid_to_try[1] = (int)NULL;
+			nasid_to_try[1] = 0;
 		}
 		}
 	}
 	}