staging: libcfs: remove integer types abstraction from libcfs
authorJames Simmons <jsimmons@infradead.org>
Sun, 29 Jan 2017 00:05:07 +0000 (19:05 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Feb 2017 12:01:38 +0000 (13:01 +0100)
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>
drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h
drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c
drivers/staging/lustre/lnet/libcfs/debug.c
drivers/staging/lustre/lnet/lnet/acceptor.c

index e8695e4a39d178b3b9ef1a419c30e11211cb379f..fa0808d2953b677493580e36fda19f44a389c148 100644 (file)
@@ -125,10 +125,6 @@ do {                                                                   \
 
 #include <linux/capability.h>
 
-/* long integer with size equal to pointer */
-typedef unsigned long ulong_ptr_t;
-typedef long long_ptr_t;
-
 #ifndef WITH_WATCHDOG
 #define WITH_WATCHDOG
 #endif
index 148db65185cbc1c570ec96ac4ada193d3bf9c6d5..f25de3d7f6e8308296c49f6e3339a1d5807c7a81 100644 (file)
@@ -2507,7 +2507,7 @@ ksocknal_base_startup(void)
 
                snprintf(name, sizeof(name), "socknal_cd%02d", i);
                rc = ksocknal_thread_start(ksocknal_connd,
-                                          (void *)((ulong_ptr_t)i), name);
+                                          (void *)((uintptr_t)i), name);
                if (rc) {
                        spin_lock_bh(&ksocknal_data.ksnd_connd_lock);
                        ksocknal_data.ksnd_connd_starting--;
index a38db23222251d4011d3228815b9694c96dde7de..3408041355e372432d0745083edc25898148bb16 100644 (file)
@@ -343,7 +343,7 @@ void libcfs_debug_dumplog_internal(void *arg)
                last_dump_time = current_time;
                snprintf(debug_file_name, sizeof(debug_file_name) - 1,
                         "%s.%lld.%ld", libcfs_debug_file_path_arr,
-                        (s64)current_time, (long_ptr_t)arg);
+                        (s64)current_time, (long)arg);
                pr_alert("LustreError: dumping log to %s\n", debug_file_name);
                cfs_tracefile_dump_all_pages(debug_file_name);
                libcfs_run_debug_log_upcall(debug_file_name);
index d5d27e534919d67c63facc54a26263037817c3ce..69bbd594b9bddf2ede2b7a3395ccb35848ffb5b1 100644 (file)
@@ -330,7 +330,7 @@ lnet_acceptor(void *arg)
        __u32 magic;
        __u32 peer_ip;
        int peer_port;
-       int secure = (int)((long_ptr_t)arg);
+       int secure = (int)((long)arg);
 
        LASSERT(!lnet_acceptor_state.pta_sock);
 
@@ -459,7 +459,7 @@ lnet_acceptor_start(void)
        if (!lnet_count_acceptor_nis())  /* not required */
                return 0;
 
-       task = kthread_run(lnet_acceptor, (void *)(ulong_ptr_t)secure,
+       task = kthread_run(lnet_acceptor, (void *)(uintptr_t)secure,
                           "acceptor_%03ld", secure);
        if (IS_ERR(task)) {
                rc2 = PTR_ERR(task);