All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] dvb: mantis: use '%pM' format to print MAC address
@ 2010-09-11 13:59 Andy Shevchenko
  2010-09-11 13:59 ` [PATCH 2/2] media: cx23885: " Andy Shevchenko
  2010-09-11 16:47 ` [PATCH 1/2] dvb: mantis: " Joe Perches
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2010-09-11 13:59 UTC (permalink / raw)
  To: linux-media, linux-kernel; +Cc: Mauro Carvalho Chehab, Andy Shevchenko

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
---
 drivers/media/dvb/mantis/mantis_core.c |    5 +----
 drivers/media/dvb/mantis/mantis_ioc.c  |    9 +--------
 2 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/drivers/media/dvb/mantis/mantis_core.c b/drivers/media/dvb/mantis/mantis_core.c
index 8113b23..0163e8e 100644
--- a/drivers/media/dvb/mantis/mantis_core.c
+++ b/drivers/media/dvb/mantis/mantis_core.c
@@ -91,10 +91,7 @@ static int get_mac_address(struct mantis_pci *mantis)
 		return err;
 	}
 	dprintk(verbose, MANTIS_ERROR, 0,
-		"    MAC Address=[%02x:%02x:%02x:%02x:%02x:%02x]\n",
-		mantis->mac_address[0], mantis->mac_address[1],
-		mantis->mac_address[2],	mantis->mac_address[3],
-		mantis->mac_address[4], mantis->mac_address[5]);
+		"    MAC Address=[%pM]\n", &mantis->mac_address[0]);
 
 	return 0;
 }
diff --git a/drivers/media/dvb/mantis/mantis_ioc.c b/drivers/media/dvb/mantis/mantis_ioc.c
index de148de..8932f34 100644
--- a/drivers/media/dvb/mantis/mantis_ioc.c
+++ b/drivers/media/dvb/mantis/mantis_ioc.c
@@ -68,14 +68,7 @@ int mantis_get_mac(struct mantis_pci *mantis)
 		return err;
 	}
 
-	dprintk(MANTIS_ERROR, 0,
-		"    MAC Address=[%02x:%02x:%02x:%02x:%02x:%02x]\n",
-		mac_addr[0],
-		mac_addr[1],
-		mac_addr[2],
-		mac_addr[3],
-		mac_addr[4],
-		mac_addr[5]);
+	dprintk(MANTIS_ERROR, 0, "    MAC Address=[%pM]\n", &mac_addr[0]);
 
 	return 0;
 }
-- 
1.7.2.2


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

* [PATCH 2/2] media: cx23885: use '%pM' format to print MAC address
  2010-09-11 13:59 [PATCH 1/2] dvb: mantis: use '%pM' format to print MAC address Andy Shevchenko
@ 2010-09-11 13:59 ` Andy Shevchenko
  2010-09-11 16:47 ` [PATCH 1/2] dvb: mantis: " Joe Perches
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2010-09-11 13:59 UTC (permalink / raw)
  To: linux-media, linux-kernel; +Cc: Mauro Carvalho Chehab, Andy Shevchenko

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
---
 drivers/media/video/cx23885/cx23885-dvb.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c
index 3d70af2..eca7247 100644
--- a/drivers/media/video/cx23885/cx23885-dvb.c
+++ b/drivers/media/video/cx23885/cx23885-dvb.c
@@ -1017,10 +1017,7 @@ static int dvb_register(struct cx23885_tsport *port)
 		/* Read entire EEPROM */
 		dev->i2c_bus[0].i2c_client.addr = 0xa0 >> 1;
 		tveeprom_read(&dev->i2c_bus[0].i2c_client, eeprom, sizeof(eeprom));
-		printk(KERN_INFO "TeVii S470 MAC= "
-				"%02X:%02X:%02X:%02X:%02X:%02X\n",
-				eeprom[0xa0], eeprom[0xa1], eeprom[0xa2],
-				eeprom[0xa3], eeprom[0xa4], eeprom[0xa5]);
+		printk(KERN_INFO "TeVii S470 MAC= %pM\n", &eeprom[0xa0]);
 		memcpy(port->frontends.adapter.proposed_mac, eeprom + 0xa0, 6);
 		break;
 		}
-- 
1.7.2.2


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

* Re: [PATCH 1/2] dvb: mantis: use '%pM' format to print MAC address
  2010-09-11 13:59 [PATCH 1/2] dvb: mantis: use '%pM' format to print MAC address Andy Shevchenko
  2010-09-11 13:59 ` [PATCH 2/2] media: cx23885: " Andy Shevchenko
@ 2010-09-11 16:47 ` Joe Perches
  1 sibling, 0 replies; 3+ messages in thread
From: Joe Perches @ 2010-09-11 16:47 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-media, linux-kernel, Mauro Carvalho Chehab

On Sat, 2010-09-11 at 16:59 +0300, Andy Shevchenko wrote:
>  drivers/media/dvb/mantis/mantis_core.c |    5 +----
>  drivers/media/dvb/mantis/mantis_ioc.c  |    9 +--------

Hi Andy.

I think these are clearer and more commonly used as:

>  	dprintk(verbose, MANTIS_ERROR, 0,
> +		"    MAC Address=[%pM]\n", &mantis->mac_address[0]);

		"    MAC Address=[%pM]\n", mantis->mac_address);

and

> +	dprintk(MANTIS_ERROR, 0, "    MAC Address=[%pM]\n", &mac_addr[0]);

	dprintk(MANTIS_ERROR, 0, "    MAC Address=[%pM]\n", mac_addr);



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

end of thread, other threads:[~2010-09-11 16:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-11 13:59 [PATCH 1/2] dvb: mantis: use '%pM' format to print MAC address Andy Shevchenko
2010-09-11 13:59 ` [PATCH 2/2] media: cx23885: " Andy Shevchenko
2010-09-11 16:47 ` [PATCH 1/2] dvb: mantis: " Joe Perches

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.