public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] isapnp: remove debug leftovers
@ 2013-04-23 13:37 Andy Shevchenko
  2013-04-23 13:37 ` [PATCH v2 2/2] pnp: use %*phC to dump small buffers Andy Shevchenko
  2013-04-23 14:34 ` [PATCH v2 1/2] isapnp: remove debug leftovers Rafael J. Wysocki
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2013-04-23 13:37 UTC (permalink / raw)
  To: Rafael J. Wysocki, linux-kernel; +Cc: Andy Shevchenko

There are couple of #if 0's to avoid debug printing. Let's remove them as
Rafael suggested.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pnp/isapnp/core.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c
index 918d5f0..cf88f9b6 100644
--- a/drivers/pnp/isapnp/core.c
+++ b/drivers/pnp/isapnp/core.c
@@ -379,10 +379,6 @@ static int __init isapnp_read_tag(unsigned char *type, unsigned short *size)
 		*type = (tag >> 3) & 0x0f;
 		*size = tag & 0x07;
 	}
-#if 0
-	printk(KERN_DEBUG "tag = 0x%x, type = 0x%x, size = %i\n", tag, *type,
-	       *size);
-#endif
 	if (*type == 0xff && *size == 0xffff)	/* probably invalid data */
 		return -1;
 	return 0;
@@ -813,13 +809,6 @@ static int __init isapnp_build_device_list(void)
 		if (!card)
 			continue;
 
-#if 0
-		dev_info(&card->dev,
-		       "vendor: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",
-		       header[0], header[1], header[2], header[3], header[4],
-		       header[5], header[6], header[7], header[8]);
-		dev_info(&card->dev, "checksum = %#x\n", checksum);
-#endif
 		INIT_LIST_HEAD(&card->devices);
 		card->serial =
 		    (header[7] << 24) | (header[6] << 16) | (header[5] << 8) |
-- 
1.8.2.rc0.22.gb3600c3


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

* [PATCH v2 2/2] pnp: use %*phC to dump small buffers
  2013-04-23 13:37 [PATCH v2 1/2] isapnp: remove debug leftovers Andy Shevchenko
@ 2013-04-23 13:37 ` Andy Shevchenko
  2013-04-23 14:34 ` [PATCH v2 1/2] isapnp: remove debug leftovers Rafael J. Wysocki
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2013-04-23 13:37 UTC (permalink / raw)
  To: Rafael J. Wysocki, linux-kernel; +Cc: Andy Shevchenko

Instead of pronting buffer byte-by-byte let's use native specificator to do the
job.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pnp/pnpbios/proc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/pnp/pnpbios/proc.c b/drivers/pnp/pnpbios/proc.c
index 8dafd65..c212db0 100644
--- a/drivers/pnp/pnpbios/proc.c
+++ b/drivers/pnp/pnpbios/proc.c
@@ -185,10 +185,9 @@ static int pnp_devices_proc_show(struct seq_file *m, void *v)
 
 		if (pnp_bios_get_dev_node(&nodenum, PNPMODE_DYNAMIC, node))
 			break;
-		seq_printf(m, "%02x\t%08x\t%02x:%02x:%02x\t%04x\n",
+		seq_printf(m, "%02x\t%08x\t%3phC\t%04x\n",
 			     node->handle, node->eisa_id,
-			     node->type_code[0], node->type_code[1],
-			     node->type_code[2], node->flags);
+			     node->type_code, node->flags);
 		if (nodenum <= thisnodenum) {
 			printk(KERN_ERR
 			       "%s Node number 0x%x is out of sequence following node 0x%x. Aborting.\n",
-- 
1.8.2.rc0.22.gb3600c3


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

* Re: [PATCH v2 1/2] isapnp: remove debug leftovers
  2013-04-23 13:37 [PATCH v2 1/2] isapnp: remove debug leftovers Andy Shevchenko
  2013-04-23 13:37 ` [PATCH v2 2/2] pnp: use %*phC to dump small buffers Andy Shevchenko
@ 2013-04-23 14:34 ` Rafael J. Wysocki
  1 sibling, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2013-04-23 14:34 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-kernel

On Tuesday, April 23, 2013 04:37:18 PM Andy Shevchenko wrote:
> There are couple of #if 0's to avoid debug printing. Let's remove them as
> Rafael suggested.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Both patches applied.

Thanks,
Rafael


> ---
>  drivers/pnp/isapnp/core.c | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c
> index 918d5f0..cf88f9b6 100644
> --- a/drivers/pnp/isapnp/core.c
> +++ b/drivers/pnp/isapnp/core.c
> @@ -379,10 +379,6 @@ static int __init isapnp_read_tag(unsigned char *type, unsigned short *size)
>  		*type = (tag >> 3) & 0x0f;
>  		*size = tag & 0x07;
>  	}
> -#if 0
> -	printk(KERN_DEBUG "tag = 0x%x, type = 0x%x, size = %i\n", tag, *type,
> -	       *size);
> -#endif
>  	if (*type == 0xff && *size == 0xffff)	/* probably invalid data */
>  		return -1;
>  	return 0;
> @@ -813,13 +809,6 @@ static int __init isapnp_build_device_list(void)
>  		if (!card)
>  			continue;
>  
> -#if 0
> -		dev_info(&card->dev,
> -		       "vendor: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",
> -		       header[0], header[1], header[2], header[3], header[4],
> -		       header[5], header[6], header[7], header[8]);
> -		dev_info(&card->dev, "checksum = %#x\n", checksum);
> -#endif
>  		INIT_LIST_HEAD(&card->devices);
>  		card->serial =
>  		    (header[7] << 24) | (header[6] << 16) | (header[5] << 8) |
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

end of thread, other threads:[~2013-04-23 14:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-23 13:37 [PATCH v2 1/2] isapnp: remove debug leftovers Andy Shevchenko
2013-04-23 13:37 ` [PATCH v2 2/2] pnp: use %*phC to dump small buffers Andy Shevchenko
2013-04-23 14:34 ` [PATCH v2 1/2] isapnp: remove debug leftovers Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox