Re: [PATCH v1 2/5] saa7164: convert to seq_hex_dump()

2014-07-26 Thread Mauro Carvalho Chehab
Em Wed, 9 Jul 2014 14:24:29 -0400
Steven Toth  escreveu:

> On Wed, Jul 9, 2014 at 11:24 AM, Andy Shevchenko
>  wrote:
> > Instead of custom approach let's use recently added seq_hex_dump() helper.
> >
> > Signed-off-by: Andy Shevchenko 
> 
> ack
> 
> Reviewed-by: Steven Toth 
> 
Acked-by: Mauro Carvalho Chehab 

Regards,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v1 2/5] saa7164: convert to seq_hex_dump()

2014-07-09 Thread Steven Toth
On Wed, Jul 9, 2014 at 11:24 AM, Andy Shevchenko
 wrote:
> Instead of custom approach let's use recently added seq_hex_dump() helper.
>
> Signed-off-by: Andy Shevchenko 

ack

Reviewed-by: Steven Toth 

-- 
Steven Toth - Kernel Labs
http://www.kernellabs.com
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v1 2/5] saa7164: convert to seq_hex_dump()

2014-07-09 Thread Andy Shevchenko
Instead of custom approach let's use recently added seq_hex_dump() helper.

Signed-off-by: Andy Shevchenko 
---
 drivers/media/pci/saa7164/saa7164-core.c | 31 ---
 1 file changed, 4 insertions(+), 27 deletions(-)

diff --git a/drivers/media/pci/saa7164/saa7164-core.c 
b/drivers/media/pci/saa7164/saa7164-core.c
index 1bf0697..6f81584 100644
--- a/drivers/media/pci/saa7164/saa7164-core.c
+++ b/drivers/media/pci/saa7164/saa7164-core.c
@@ -1065,7 +1065,6 @@ static int saa7164_proc_show(struct seq_file *m, void *v)
struct saa7164_dev *dev;
struct tmComResBusInfo *b;
struct list_head *list;
-   int i, c;
 
if (saa7164_devcount == 0)
return 0;
@@ -1089,35 +1088,13 @@ static int saa7164_proc_show(struct seq_file *m, void 
*v)
 
seq_printf(m, " .m_pdwGetReadPos  = 0x%x (0x%08x)\n",
b->m_dwGetWritePos, saa7164_readl(b->m_dwGetWritePos));
-   c = 0;
seq_printf(m, "\n  Set Ring:\n");
-   seq_printf(m, "\n addr  00 01 02 03 04 05 06 07 08 09 0a 0b 0c 
0d 0e 0f\n");
-   for (i = 0; i < b->m_dwSizeSetRing; i++) {
-   if (c == 0)
-   seq_printf(m, " %04x:", i);
+   seq_hex_dump(m, " ", DUMP_PREFIX_OFFSET, 16, 1,
+b->m_pdwSetRing, b->m_dwSizeSetRing, false);
 
-   seq_printf(m, " %02x", *(b->m_pdwSetRing + i));
-
-   if (++c == 16) {
-   seq_printf(m, "\n");
-   c = 0;
-   }
-   }
-
-   c = 0;
seq_printf(m, "\n  Get Ring:\n");
-   seq_printf(m, "\n addr  00 01 02 03 04 05 06 07 08 09 0a 0b 0c 
0d 0e 0f\n");
-   for (i = 0; i < b->m_dwSizeGetRing; i++) {
-   if (c == 0)
-   seq_printf(m, " %04x:", i);
-
-   seq_printf(m, " %02x", *(b->m_pdwGetRing + i));
-
-   if (++c == 16) {
-   seq_printf(m, "\n");
-   c = 0;
-   }
-   }
+   seq_hex_dump(m, " ", DUMP_PREFIX_OFFSET, 16, 1,
+b->m_pdwGetRing, b->m_dwSizeGetRing, false);
 
mutex_unlock(&b->lock);
 
-- 
2.0.1

--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html