mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.com>
To: Oleg Drokin <oleg.drokin@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	James Simmons <jsimmons@infradead.org>,
	Andreas Dilger <andreas.dilger@intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Lustre Development List <lustre-devel@lists.lustre.org>
Subject: [PATCH 16/17] staging: lustre: discard linux-time.h
Date: Thu, 29 Mar 2018 15:26:48 +1100	[thread overview]
Message-ID: <152229760884.27689.2832237566424423407.stgit@noble> (raw)
In-Reply-To: <152229732768.27689.4800156943561963977.stgit@noble>

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>
---
 .../staging/lustre/include/linux/libcfs/libcfs.h   |    5 ++
 .../lustre/include/linux/libcfs/linux/libcfs.h     |    1 
 .../lustre/include/linux/libcfs/linux/linux-time.h |   66 --------------------
 drivers/staging/lustre/lustre/ptlrpc/pinger.c      |    2 -
 4 files changed, 6 insertions(+), 68 deletions(-)
 delete mode 100644 drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h

diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
index 3d3fa52858e5..f183f31da387 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
@@ -52,6 +52,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 30e333af8d0d..c39c34d74382 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 ecdebccf2b44..000000000000
--- 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 3f17c673d1b8..89eef8ec7df4 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);

  parent reply	other threads:[~2018-03-29  4:26 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-29  4:26 [PATCH 00/17] staging: Assorted lustre cleanup NeilBrown
2018-03-29  4:26 ` [PATCH 03/17] staging: lustre: LNET excludes USERIO NeilBrown
2018-03-30 19:09   ` James Simmons
2018-03-29  4:26 ` [PATCH 13/17] staging: lustre: libcfs: remove cfs_timeout_cap() NeilBrown
2018-03-30 19:03   ` James Simmons
2018-04-02 19:38   ` Dilger, Andreas
2018-04-02 22:34     ` NeilBrown
2018-03-29  4:26 ` [PATCH 10/17] staging: lustre: libcfs: discard cfs_time_add/sub NeilBrown
2018-03-30 19:00   ` James Simmons
2018-03-29  4:26 ` [PATCH 12/17] staging: lustre: libcfs: discard cfs_time_after() NeilBrown
2018-03-30 19:01   ` James Simmons
2018-03-29  4:26 ` [PATCH 02/17] staging: lustre: remove unused ldlm_completion_ast_async() NeilBrown
2018-03-30 18:57   ` James Simmons
2018-03-29  4:26 ` [PATCH 08/17] staging: lustre: add container_of_safe() NeilBrown
2018-03-30 18:59   ` James Simmons
2018-04-23 13:16   ` Greg Kroah-Hartman
2018-03-29  4:26 ` [PATCH 06/17] staging: lustre: tidy up ldlm_resource_putref() NeilBrown
2018-03-30 18:58   ` James Simmons
2018-03-29  4:26 ` [PATCH 09/17] staging: lustre: cfs_time_current() -> jiffies NeilBrown
2018-03-30 19:00   ` James Simmons
2018-03-29  4:26 ` [PATCH 17/17] staging: lustre: remove cruft from libcfs/linux/libcfs.h NeilBrown
2018-03-30 19:07   ` James Simmons
2018-03-29  4:26 ` [PATCH 15/17] staging: lustre: discard cfs_time_before_64() NeilBrown
2018-03-30 19:03   ` James Simmons
2018-03-29  4:26 ` NeilBrown [this message]
2018-03-30 19:03   ` [PATCH 16/17] staging: lustre: discard linux-time.h James Simmons
2018-03-29  4:26 ` [PATCH 01/17] staging: lustre: remove invariant in cl_io_read_ahead() NeilBrown
2018-03-30 18:56   ` James Simmons
2018-03-29  4:26 ` [PATCH 14/17] staging: lustre: discard cfs_duration_sec() NeilBrown
2018-03-30 19:02   ` James Simmons
2018-03-29  4:26 ` [PATCH 11/17] staging: lustre: libcfs: discard cfs_time_shift() NeilBrown
2018-03-30 19:02   ` James Simmons
2018-04-02 19:34     ` Dilger, Andreas
2018-04-02 22:26       ` NeilBrown
2018-04-04  8:10         ` [lustre-devel] " Dilger, Andreas
2018-04-04 22:00           ` NeilBrown
2018-03-29  4:26 ` [PATCH 05/17] staging: lustre: remove unneeded include NeilBrown
2018-03-30 18:57   ` James Simmons
2018-03-29  4:26 ` [PATCH 04/17] staging: lustre: remove unused hash tables NeilBrown
2018-03-30 18:57   ` James Simmons
2018-03-29  4:26 ` [PATCH 07/17] staging: lustre: ldlm: free resource when ldlm_lock_create() fails NeilBrown
2018-03-30 18:58   ` James Simmons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=152229760884.27689.2832237566424423407.stgit@noble \
    --to=neilb@suse.com \
    --cc=andreas.dilger@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jsimmons@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lustre-devel@lists.lustre.org \
    --cc=oleg.drokin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®