linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Kershner <david.kershner@unisys.com>
To: <corbet@lwn.net>, <tglx@linutronix.de>, <mingo@redhat.com>,
	<hpa@zytor.com>, <david.kershner@unisys.com>,
	<gregkh@linuxfoundation.org>, <erik.arfvidson@unisys.com>,
	<timothy.sell@unisys.com>, <hofrat@osadl.org>,
	<dzickus@redhat.com>, <jes.sorensen@redhat.com>,
	<alexander.curtin@unisys.com>, <janani.rvchndrn@gmail.com>,
	<sudipm.mukherjee@gmail.com>, <prarit@redhat.com>,
	<david.binder@unisys.com>, <nhorman@redhat.com>,
	<dan.j.williams@intel.com>, <linux-kernel@vger.kernel.org>,
	<linux-doc@vger.kernel.org>,
	<driverdev-devel@linuxdriverproject.org>,
	<sparmaintainer@unisys.com>
Cc: Bryan Thompson <bryan.thompson@unisys.com>
Subject: [PATCH 12/24] staging: unisys: visorbus: Remove unused functions
Date: Tue, 24 May 2016 23:45:50 -0400	[thread overview]
Message-ID: <1464147962-26650-13-git-send-email-david.kershner@unisys.com> (raw)
In-Reply-To: <1464147962-26650-1-git-send-email-david.kershner@unisys.com>

From: Bryan Thompson <bryan.thompson@unisys.com>

Remove visorbus_clear_channel, visorchannel_signalqueue_slots_avail,
visorchannel_signalqueue_max_slots, visorchannel_clear, and
visorchannel_debug which are no longer called by any driver.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
---
 drivers/staging/unisys/include/visorbus.h       |   9 --
 drivers/staging/unisys/visorbus/visorbus_main.c |   7 --
 drivers/staging/unisys/visorbus/visorchannel.c  | 161 ------------------------
 3 files changed, 177 deletions(-)

diff --git a/drivers/staging/unisys/include/visorbus.h b/drivers/staging/unisys/include/visorbus.h
index 9da25c0..2fd3016 100644
--- a/drivers/staging/unisys/include/visorbus.h
+++ b/drivers/staging/unisys/include/visorbus.h
@@ -186,8 +186,6 @@ int visorbus_read_channel(struct visor_device *dev,
 int visorbus_write_channel(struct visor_device *dev,
 			   unsigned long offset, void *src,
 			   unsigned long nbytes);
-int visorbus_clear_channel(struct visor_device *dev,
-			   unsigned long offset, u8 ch, unsigned long nbytes);
 void visorbus_enable_channel_interrupts(struct visor_device *dev);
 void visorbus_disable_channel_interrupts(struct visor_device *dev);
 #endif
@@ -207,17 +205,12 @@ int visorchannel_read(struct visorchannel *channel, ulong offset,
 		      void *local, ulong nbytes);
 int visorchannel_write(struct visorchannel *channel, ulong offset,
 		       void *local, ulong nbytes);
-int visorchannel_clear(struct visorchannel *channel, ulong offset,
-		       u8 ch, ulong nbytes);
 bool visorchannel_signalremove(struct visorchannel *channel, u32 queue,
 			       void *msg);
 bool visorchannel_signalinsert(struct visorchannel *channel, u32 queue,
 			       void *msg);
 bool visorchannel_signalempty(struct visorchannel *channel, u32 queue);
 
-int visorchannel_signalqueue_slots_avail(struct visorchannel *channel,
-					 u32 queue);
-int visorchannel_signalqueue_max_slots(struct visorchannel *channel, u32 queue);
 u64 visorchannel_get_physaddr(struct visorchannel *channel);
 ulong visorchannel_get_nbytes(struct visorchannel *channel);
 char *visorchannel_id(struct visorchannel *channel, char *s);
@@ -227,8 +220,6 @@ int visorchannel_set_clientpartition(struct visorchannel *channel,
 				     u64 partition_handle);
 uuid_le visorchannel_get_uuid(struct visorchannel *channel);
 char *visorchannel_uuid_id(uuid_le *guid, char *s);
-void visorchannel_debug(struct visorchannel *channel, int num_queues,
-			struct seq_file *seq, u32 off);
 void __iomem *visorchannel_get_header(struct visorchannel *channel);
 
 #define BUS_ROOT_DEVICE		UINT_MAX
diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index 247a9ad..c3f53fb 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -715,13 +715,6 @@ visorbus_write_channel(struct visor_device *dev, unsigned long offset,
 }
 EXPORT_SYMBOL_GPL(visorbus_write_channel);
 
-int
-visorbus_clear_channel(struct visor_device *dev, unsigned long offset, u8 ch,
-		       unsigned long nbytes)
-{
-	return visorchannel_clear(dev->visorchannel, offset, ch, nbytes);
-}
-
 /** We don't really have a real interrupt, so for now we just call the
  *  interrupt function periodically...
  */
diff --git a/drivers/staging/unisys/visorbus/visorchannel.c b/drivers/staging/unisys/visorbus/visorchannel.c
index 1f626c3..43315c2 100644
--- a/drivers/staging/unisys/visorbus/visorchannel.c
+++ b/drivers/staging/unisys/visorbus/visorchannel.c
@@ -255,41 +255,6 @@ visorchannel_write(struct visorchannel *channel, ulong offset,
 	return 0;
 }
 
-int
-visorchannel_clear(struct visorchannel *channel, ulong offset, u8 ch,
-		   ulong nbytes)
-{
-	int err;
-	int bufsize = PAGE_SIZE;
-	int written = 0;
-	u8 *buf;
-
-	buf = (u8 *)__get_free_page(GFP_KERNEL);
-	if (!buf)
-		return -ENOMEM;
-
-	memset(buf, ch, bufsize);
-
-	while (nbytes > 0) {
-		int thisbytes = bufsize;
-
-		if (nbytes < thisbytes)
-			thisbytes = nbytes;
-		err = visorchannel_write(channel, offset + written,
-					 buf, thisbytes);
-		if (err)
-			goto out_free_page;
-
-		written += thisbytes;
-		nbytes -= thisbytes;
-	}
-	err = 0;
-
-out_free_page:
-	free_page((unsigned long)buf);
-	return err;
-}
-
 void __iomem  *
 visorchannel_get_header(struct visorchannel *channel)
 {
@@ -490,129 +455,3 @@ visorchannel_signalinsert(struct visorchannel *channel, u32 queue, void *msg)
 	return rc;
 }
 EXPORT_SYMBOL_GPL(visorchannel_signalinsert);
-
-int
-visorchannel_signalqueue_slots_avail(struct visorchannel *channel, u32 queue)
-{
-	struct signal_queue_header sig_hdr;
-	u32 slots_avail, slots_used;
-	u32 head, tail;
-
-	if (!sig_read_header(channel, queue, &sig_hdr))
-		return 0;
-	head = sig_hdr.head;
-	tail = sig_hdr.tail;
-	if (head < tail)
-		head = head + sig_hdr.max_slots;
-	slots_used = head - tail;
-	slots_avail = sig_hdr.max_signals - slots_used;
-	return (int)slots_avail;
-}
-
-int
-visorchannel_signalqueue_max_slots(struct visorchannel *channel, u32 queue)
-{
-	struct signal_queue_header sig_hdr;
-
-	if (!sig_read_header(channel, queue, &sig_hdr))
-		return 0;
-	return (int)sig_hdr.max_signals;
-}
-
-static void
-sigqueue_debug(struct signal_queue_header *q, int which, struct seq_file *seq)
-{
-	seq_printf(seq, "Signal Queue #%d\n", which);
-	seq_printf(seq, "   VersionId          = %lu\n", (ulong)q->version);
-	seq_printf(seq, "   Type               = %lu\n", (ulong)q->chtype);
-	seq_printf(seq, "   oSignalBase        = %llu\n",
-		   (long long)q->sig_base_offset);
-	seq_printf(seq, "   SignalSize         = %lu\n", (ulong)q->signal_size);
-	seq_printf(seq, "   MaxSignalSlots     = %lu\n",
-		   (ulong)q->max_slots);
-	seq_printf(seq, "   MaxSignals         = %lu\n", (ulong)q->max_signals);
-	seq_printf(seq, "   FeatureFlags       = %-16.16Lx\n",
-		   (long long)q->features);
-	seq_printf(seq, "   NumSignalsSent     = %llu\n",
-		   (long long)q->num_sent);
-	seq_printf(seq, "   NumSignalsReceived = %llu\n",
-		   (long long)q->num_received);
-	seq_printf(seq, "   NumOverflows       = %llu\n",
-		   (long long)q->num_overflows);
-	seq_printf(seq, "   Head               = %lu\n", (ulong)q->head);
-	seq_printf(seq, "   Tail               = %lu\n", (ulong)q->tail);
-}
-
-void
-visorchannel_debug(struct visorchannel *channel, int num_queues,
-		   struct seq_file *seq, u32 off)
-{
-	u64 addr = 0;
-	ulong nbytes = 0, nbytes_region = 0;
-	struct channel_header hdr;
-	struct channel_header *phdr = &hdr;
-	int i = 0;
-	int errcode = 0;
-
-	if (!channel)
-		return;
-
-	addr = visorchannel_get_physaddr(channel);
-	nbytes_region = visorchannel_get_nbytes(channel);
-	errcode = visorchannel_read(channel, off,
-				    phdr, sizeof(struct channel_header));
-	if (errcode < 0) {
-		seq_printf(seq,
-			   "Read of channel header failed with errcode=%d)\n",
-			   errcode);
-		if (off == 0) {
-			phdr = &channel->chan_hdr;
-			seq_puts(seq, "(following data may be stale)\n");
-		} else {
-			return;
-		}
-	}
-	nbytes = (ulong)(phdr->size);
-	seq_printf(seq, "--- Begin channel @0x%-16.16Lx for 0x%lx bytes (region=0x%lx bytes) ---\n",
-		   addr + off, nbytes, nbytes_region);
-	seq_printf(seq, "Type            = %pUL\n", &phdr->chtype);
-	seq_printf(seq, "ZoneGuid        = %pUL\n", &phdr->zone_uuid);
-	seq_printf(seq, "Signature       = 0x%-16.16Lx\n",
-		   (long long)phdr->signature);
-	seq_printf(seq, "LegacyState     = %lu\n", (ulong)phdr->legacy_state);
-	seq_printf(seq, "SrvState        = %lu\n", (ulong)phdr->srv_state);
-	seq_printf(seq, "CliStateBoot    = %lu\n", (ulong)phdr->cli_state_boot);
-	seq_printf(seq, "CliStateOS      = %lu\n", (ulong)phdr->cli_state_os);
-	seq_printf(seq, "HeaderSize      = %lu\n", (ulong)phdr->header_size);
-	seq_printf(seq, "Size            = %llu\n", (long long)phdr->size);
-	seq_printf(seq, "Features        = 0x%-16.16llx\n",
-		   (long long)phdr->features);
-	seq_printf(seq, "PartitionHandle = 0x%-16.16llx\n",
-		   (long long)phdr->partition_handle);
-	seq_printf(seq, "Handle          = 0x%-16.16llx\n",
-		   (long long)phdr->handle);
-	seq_printf(seq, "VersionId       = %lu\n", (ulong)phdr->version_id);
-	seq_printf(seq, "oChannelSpace   = %llu\n",
-		   (long long)phdr->ch_space_offset);
-	if ((phdr->ch_space_offset == 0) || (errcode < 0))
-		;
-	else
-		for (i = 0; i < num_queues; i++) {
-			struct signal_queue_header q;
-
-			errcode = visorchannel_read(channel,
-						    off +
-						    phdr->ch_space_offset +
-						    (i * sizeof(q)),
-						    &q, sizeof(q));
-			if (errcode < 0) {
-				seq_printf(seq,
-					   "failed to read signal queue #%d from channel @0x%-16.16Lx errcode=%d\n",
-					   i, addr, errcode);
-				continue;
-			}
-			sigqueue_debug(&q, i, seq);
-		}
-	seq_printf(seq, "--- End   channel @0x%-16.16Lx for 0x%lx bytes ---\n",
-		   addr + off, nbytes);
-}
-- 
1.9.1

  parent reply	other threads:[~2016-05-25  3:51 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-25  3:45 [PATCH 00/24] Fixes comments made by tglx, then move visorbus to drivers/virt David Kershner
2016-05-25  3:45 ` [PATCH 01/24] staging: unisys: visorbus: remove unused module parameters David Kershner
2016-05-25  3:45 ` [PATCH 02/24] staging: unisys: visorbus: remove unused struct David Kershner
2016-05-25  3:45 ` [PATCH 03/24] staging: unisys: visorbus: modify format string to match argument David Kershner
2016-05-25  3:45 ` [PATCH 04/24] staging: unisys: visornic: Correct comment spelling mistake David Kershner
2016-05-25  3:45 ` [PATCH 05/24] staging: unisys: include: Remove thread-related enum members David Kershner
2016-05-25  3:45 ` [PATCH 06/24] staging: unisys: visorbus: removed unused periodic_test_workqueue David Kershner
2016-05-25  3:45 ` [PATCH 07/24] staging: unisys: visorinput: remove unnecessary locking David Kershner
2016-05-25  3:45 ` [PATCH 08/24] staging: unisys: visorbus: use kernel timer instead of workqueue David Kershner
2016-05-25  3:45 ` [PATCH 09/24] staging: unisys: visorbus: remove periodic_work.h/.c David Kershner
2016-05-25  3:45 ` [PATCH 10/24] staging: unisys: visorbus: Make visordriver_callback_lock a mutex David Kershner
2016-05-25  3:45 ` [PATCH 11/24] staging: unisys: visorbus: Remove unnecessary EXPORT_SYMBOL statements David Kershner
2016-05-25  3:45 ` David Kershner [this message]
2016-05-25  3:45 ` [PATCH 13/24] staging: unisys: Remove reference to unused STANDALONE_CLIENT David Kershner
2016-05-25  3:45 ` [PATCH 14/24] staging: unisys: visorbus: vbusdeviceinfo function descriptions more kerneldoc-like David Kershner
2016-05-25  3:45 ` [PATCH 15/24] staging: unisys: visorbus: make " David Kershner
2016-05-25  3:45 ` [PATCH 16/24] staging: unisys: visorbus: make visorbus_private.h " David Kershner
2016-05-25  3:45 ` [PATCH 17/24] staging: unisys: visorbus: make visorchannel " David Kershner
2016-05-25  3:45 ` [PATCH 18/24] staging: unisys: visorbus: make visorchipset " David Kershner
2016-05-25  3:45 ` [PATCH 19/24] staging: unisys: visorbus: Move visorbus-unique functions to private header David Kershner
2016-05-25  3:45 ` [PATCH 20/24] staging: unisys: visorbus: Add kerneldoc-style comments for visorbus API David Kershner
2016-05-25  3:45 ` [PATCH 21/24] staging: unisys: Move vbushelper.h to visorbus directory David Kershner
2016-05-25  3:46 ` [PATCH 22/24] include: linux: visorbus: Add visorbus to include/linux directory David Kershner
2016-05-25  3:46 ` [PATCH 23/24] Documentation: Move visorbus documentation from staging to Documentation/ David Kershner
2016-05-25  3:46 ` [PATCH 24/24] drivers: Add visorbus to the drivers directory David Kershner

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=1464147962-26650-13-git-send-email-david.kershner@unisys.com \
    --to=david.kershner@unisys.com \
    --cc=alexander.curtin@unisys.com \
    --cc=bryan.thompson@unisys.com \
    --cc=corbet@lwn.net \
    --cc=dan.j.williams@intel.com \
    --cc=david.binder@unisys.com \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=dzickus@redhat.com \
    --cc=erik.arfvidson@unisys.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hofrat@osadl.org \
    --cc=hpa@zytor.com \
    --cc=janani.rvchndrn@gmail.com \
    --cc=jes.sorensen@redhat.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=nhorman@redhat.com \
    --cc=prarit@redhat.com \
    --cc=sparmaintainer@unisys.com \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=timothy.sell@unisys.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;
as well as URLs for NNTP newsgroup(s).