All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: unisys: Remove function visorchannel_debug
@ 2016-02-28  8:22 Bhumika Goyal
  2016-03-02 16:25 ` [Outreachy kernel] " Greg KH
  2016-03-02 18:48 ` Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Bhumika Goyal @ 2016-02-28  8:22 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Bhumika Goyal

The function visorchannel_debug is not used anywhere in the kernel so
remove the function definition, prototype and the export symbol.
Grepped to find the occurences.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/staging/unisys/include/visorbus.h      |  2 -
 drivers/staging/unisys/visorbus/visorchannel.c | 74 --------------------------
 2 files changed, 76 deletions(-)

diff --git a/drivers/staging/unisys/include/visorbus.h b/drivers/staging/unisys/include/visorbus.h
index 2a64a9c..2c3e99c 100644
--- a/drivers/staging/unisys/include/visorbus.h
+++ b/drivers/staging/unisys/include/visorbus.h
@@ -215,8 +215,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/visorchannel.c b/drivers/staging/unisys/visorbus/visorchannel.c
index a80d72c..8ce9cd9 100644
--- a/drivers/staging/unisys/visorbus/visorchannel.c
+++ b/drivers/staging/unisys/visorbus/visorchannel.c
@@ -562,77 +562,3 @@ sigqueue_debug(struct signal_queue_header *q, int which, struct seq_file *seq)
 	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);
-}
-EXPORT_SYMBOL_GPL(visorchannel_debug);
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Outreachy kernel] [PATCH] Staging: unisys: Remove function visorchannel_debug
  2016-02-28  8:22 [PATCH] Staging: unisys: Remove function visorchannel_debug Bhumika Goyal
@ 2016-03-02 16:25 ` Greg KH
  2016-03-02 18:48 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2016-03-02 16:25 UTC (permalink / raw)
  To: Bhumika Goyal; +Cc: outreachy-kernel

On Sun, Feb 28, 2016 at 01:52:15PM +0530, Bhumika Goyal wrote:
> The function visorchannel_debug is not used anywhere in the kernel so
> remove the function definition, prototype and the export symbol.
> Grepped to find the occurences.
> 
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
>  drivers/staging/unisys/include/visorbus.h      |  2 -
>  drivers/staging/unisys/visorbus/visorchannel.c | 74 --------------------------
>  2 files changed, 76 deletions(-)

This patch adds a build warning to the build, so I can't take it.
Please fix that up :(

thanks,

greg k-h


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Outreachy kernel] [PATCH] Staging: unisys: Remove function visorchannel_debug
  2016-02-28  8:22 [PATCH] Staging: unisys: Remove function visorchannel_debug Bhumika Goyal
  2016-03-02 16:25 ` [Outreachy kernel] " Greg KH
@ 2016-03-02 18:48 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2016-03-02 18:48 UTC (permalink / raw)
  To: Bhumika Goyal; +Cc: outreachy-kernel

On Sun, Feb 28, 2016 at 01:52:15PM +0530, Bhumika Goyal wrote:
> The function visorchannel_debug is not used anywhere in the kernel so
> remove the function definition, prototype and the export symbol.
> Grepped to find the occurences.
> 
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
>  drivers/staging/unisys/include/visorbus.h      |  2 -
>  drivers/staging/unisys/visorbus/visorchannel.c | 74 --------------------------
>  2 files changed, 76 deletions(-)

This patch adds a build warning to the build, so I can't take it.
Please fix that up :(

thanks,

greg k-h


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-02 18:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-28  8:22 [PATCH] Staging: unisys: Remove function visorchannel_debug Bhumika Goyal
2016-03-02 16:25 ` [Outreachy kernel] " Greg KH
2016-03-02 18:48 ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.