aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Simmons <jsimmons@infradead.org>2017-01-28 19:05:07 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-03 07:01:38 -0500
commit9fc9a344a3d6531a91abafdf8c5309831b038ab7 (patch)
tree2cecd2fdf7284a4df4108a07f73e2dac3c9082fd
parent3f4f78240d7c098f3db2f8b671484406fff32dfc (diff)
staging: libcfs: remove integer types abstraction from libcfs
Replace the ulong_ptr_t and long_ptr_t with standard kernel types. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/20204 Reviewed-by: Frank Zago <fzago@cray.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h4
-rw-r--r--drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c2
-rw-r--r--drivers/staging/lustre/lnet/libcfs/debug.c2
-rw-r--r--drivers/staging/lustre/lnet/lnet/acceptor.c4
4 files changed, 4 insertions, 8 deletions
diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h
index e8695e4a39d1..fa0808d2953b 100644
--- a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h
+++ b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h
@@ -125,10 +125,6 @@ do { \
125 125
126#include <linux/capability.h> 126#include <linux/capability.h>
127 127
128/* long integer with size equal to pointer */
129typedef unsigned long ulong_ptr_t;
130typedef long long_ptr_t;
131
132#ifndef WITH_WATCHDOG 128#ifndef WITH_WATCHDOG
133#define WITH_WATCHDOG 129#define WITH_WATCHDOG
134#endif 130#endif
diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c
index 148db65185cb..f25de3d7f6e8 100644
--- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c
+++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c
@@ -2507,7 +2507,7 @@ ksocknal_base_startup(void)
2507 2507
2508 snprintf(name, sizeof(name), "socknal_cd%02d", i); 2508 snprintf(name, sizeof(name), "socknal_cd%02d", i);
2509 rc = ksocknal_thread_start(ksocknal_connd, 2509 rc = ksocknal_thread_start(ksocknal_connd,
2510 (void *)((ulong_ptr_t)i), name); 2510 (void *)((uintptr_t)i), name);
2511 if (rc) { 2511 if (rc) {
2512 spin_lock_bh(&ksocknal_data.ksnd_connd_lock); 2512 spin_lock_bh(&ksocknal_data.ksnd_connd_lock);
2513 ksocknal_data.ksnd_connd_starting--; 2513 ksocknal_data.ksnd_connd_starting--;
diff --git a/drivers/staging/lustre/lnet/libcfs/debug.c b/drivers/staging/lustre/lnet/libcfs/debug.c
index a38db2322225..3408041355e3 100644
--- a/drivers/staging/lustre/lnet/libcfs/debug.c
+++ b/drivers/staging/lustre/lnet/libcfs/debug.c
@@ -343,7 +343,7 @@ void libcfs_debug_dumplog_internal(void *arg)
343 last_dump_time = current_time; 343 last_dump_time = current_time;
344 snprintf(debug_file_name, sizeof(debug_file_name) - 1, 344 snprintf(debug_file_name, sizeof(debug_file_name) - 1,
345 "%s.%lld.%ld", libcfs_debug_file_path_arr, 345 "%s.%lld.%ld", libcfs_debug_file_path_arr,
346 (s64)current_time, (long_ptr_t)arg); 346 (s64)current_time, (long)arg);
347 pr_alert("LustreError: dumping log to %s\n", debug_file_name); 347 pr_alert("LustreError: dumping log to %s\n", debug_file_name);
348 cfs_tracefile_dump_all_pages(debug_file_name); 348 cfs_tracefile_dump_all_pages(debug_file_name);
349 libcfs_run_debug_log_upcall(debug_file_name); 349 libcfs_run_debug_log_upcall(debug_file_name);
diff --git a/drivers/staging/lustre/lnet/lnet/acceptor.c b/drivers/staging/lustre/lnet/lnet/acceptor.c
index d5d27e534919..69bbd594b9bd 100644
--- a/drivers/staging/lustre/lnet/lnet/acceptor.c
+++ b/drivers/staging/lustre/lnet/lnet/acceptor.c
@@ -330,7 +330,7 @@ lnet_acceptor(void *arg)
330 __u32 magic; 330 __u32 magic;
331 __u32 peer_ip; 331 __u32 peer_ip;
332 int peer_port; 332 int peer_port;
333 int secure = (int)((long_ptr_t)arg); 333 int secure = (int)((long)arg);
334 334
335 LASSERT(!lnet_acceptor_state.pta_sock); 335 LASSERT(!lnet_acceptor_state.pta_sock);
336 336
@@ -459,7 +459,7 @@ lnet_acceptor_start(void)
459 if (!lnet_count_acceptor_nis()) /* not required */ 459 if (!lnet_count_acceptor_nis()) /* not required */
460 return 0; 460 return 0;
461 461
462 task = kthread_run(lnet_acceptor, (void *)(ulong_ptr_t)secure, 462 task = kthread_run(lnet_acceptor, (void *)(uintptr_t)secure,
463 "acceptor_%03ld", secure); 463 "acceptor_%03ld", secure);
464 if (IS_ERR(task)) { 464 if (IS_ERR(task)) {
465 rc2 = PTR_ERR(task); 465 rc2 = PTR_ERR(task);