summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2018-03-29 15:26:48 +1100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-23 14:52:52 +0200
commit346544d80b951498ab0ba5e8e8923134074e9746 (patch)
tree692729e47a28b44a09a6163e9eb5c86884ade9a2
parentde15ec21bd644a79257079f5d3083fbfcb9655c6 (diff)
downloadop-kernel-dev-346544d80b951498ab0ba5e8e8923134074e9746.zip
op-kernel-dev-346544d80b951498ab0ba5e8e8923134074e9746.tar.gz
staging: lustre: discard linux-time.h
Very little is left in linux-time.h. Move CFS_TICK to libcfs.h discard the test. Signed-off-by: NeilBrown <neilb@suse.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/lustre/include/linux/libcfs/libcfs.h5
-rw-r--r--drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h1
-rw-r--r--drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h66
-rw-r--r--drivers/staging/lustre/lustre/ptlrpc/pinger.c2
4 files changed, 6 insertions, 68 deletions
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
index d5f1783..aed74ba 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
@@ -53,6 +53,11 @@
#define LOWEST_BIT_SET(x) ((x) & ~((x) - 1))
/*
+ * One jiffy
+ */
+#define CFS_TICK (1UL)
+
+/*
* Lustre Error Checksum: calculates checksum
* of Hex number by XORing each bit.
*/
diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h
index 30e333a..c39c34d 100644
--- a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h
+++ b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h
@@ -80,7 +80,6 @@
#include <linux/uaccess.h>
#include <stdarg.h>
#include "linux-cpu.h"
-#include "linux-time.h"
#define LUSTRE_TRACE_SIZE (THREAD_SIZE >> 5)
diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h
deleted file mode 100644
index ecdebcc..0000000
--- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * GPL HEADER START
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 only,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License version 2 for more details (a copy is included
- * in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see
- * http://www.gnu.org/licenses/gpl-2.0.html
- *
- * GPL HEADER END
- */
-/*
- * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
- * Use is subject to license terms.
- */
-/*
- * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
- *
- * libcfs/include/libcfs/linux/linux-time.h
- *
- * Implementation of portable time API for Linux (kernel and user-level).
- *
- * Author: Nikita Danilov <nikita@clusterfs.com>
- */
-
-#ifndef __LIBCFS_LINUX_LINUX_TIME_H__
-#define __LIBCFS_LINUX_LINUX_TIME_H__
-
-#ifndef __LIBCFS_LIBCFS_H__
-#error Do not #include this file directly. #include <linux/libcfs/libcfs.h> instead
-#endif
-
-#define ONE_BILLION ((u_int64_t)1000000000)
-#define ONE_MILLION 1000000
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/time.h>
-#include <asm/div64.h>
-
-/*
- * post 2.5 kernels.
- */
-
-#include <linux/jiffies.h>
-
-/*
- * One jiffy
- */
-#define CFS_TICK (1UL)
-
-#define CFS_DURATION_T "%ld"
-
-#endif /* __LIBCFS_LINUX_LINUX_TIME_H__ */
diff --git a/drivers/staging/lustre/lustre/ptlrpc/pinger.c b/drivers/staging/lustre/lustre/ptlrpc/pinger.c
index 3f17c67..89eef8e 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/pinger.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/pinger.c
@@ -251,7 +251,7 @@ static void ptlrpc_pinger_main(struct work_struct *ws)
* we will SKIP the next ping at next_ping, and the
* ping will get sent 2 timeouts from now! Beware.
*/
- CDEBUG(D_INFO, "next wakeup in " CFS_DURATION_T " (%ld)\n",
+ CDEBUG(D_INFO, "next wakeup in %ld (%ld)\n",
time_to_next_wake,
this_ping + PING_INTERVAL * HZ);
} while (time_to_next_wake <= 0);
OpenPOWER on IntegriCloud