提交 fc0c8b36 编写于 作者: B Benjamin Herrenschmidt 提交者: Michael Ellerman

macintosh/windfarm_smu_sat: Fix debug output

There's some antiquated debug output that's trying
to do a hand-made hexdump and turning into horrible
1-byte-per-line output these days.

Use print_hex_dump() instead
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
上级 bd03fd84
...@@ -22,14 +22,6 @@ ...@@ -22,14 +22,6 @@
#define VERSION "1.0" #define VERSION "1.0"
#define DEBUG
#ifdef DEBUG
#define DBG(args...) printk(args)
#else
#define DBG(args...) do { } while(0)
#endif
/* If the cache is older than 800ms we'll refetch it */ /* If the cache is older than 800ms we'll refetch it */
#define MAX_AGE msecs_to_jiffies(800) #define MAX_AGE msecs_to_jiffies(800)
...@@ -106,13 +98,10 @@ struct smu_sdbp_header *smu_sat_get_sdb_partition(unsigned int sat_id, int id, ...@@ -106,13 +98,10 @@ struct smu_sdbp_header *smu_sat_get_sdb_partition(unsigned int sat_id, int id,
buf[i+2] = data[3]; buf[i+2] = data[3];
buf[i+3] = data[2]; buf[i+3] = data[2];
} }
#ifdef DEBUG
DBG(KERN_DEBUG "sat %d partition %x:", sat_id, id);
for (i = 0; i < len; ++i)
DBG(" %x", buf[i]);
DBG("\n");
#endif
printk(KERN_DEBUG "sat %d partition %x:", sat_id, id);
print_hex_dump(KERN_DEBUG, " ", DUMP_PREFIX_OFFSET,
16, 1, buf, len, false);
if (size) if (size)
*size = len; *size = len;
return (struct smu_sdbp_header *) buf; return (struct smu_sdbp_header *) buf;
...@@ -132,13 +121,13 @@ static int wf_sat_read_cache(struct wf_sat *sat) ...@@ -132,13 +121,13 @@ static int wf_sat_read_cache(struct wf_sat *sat)
if (err < 0) if (err < 0)
return err; return err;
sat->last_read = jiffies; sat->last_read = jiffies;
#ifdef LOTSA_DEBUG #ifdef LOTSA_DEBUG
{ {
int i; int i;
DBG(KERN_DEBUG "wf_sat_get: data is"); printk(KERN_DEBUG "wf_sat_get: data is");
for (i = 0; i < 16; ++i) print_hex_dump(KERN_DEBUG, " ", DUMP_PREFIX_OFFSET,
DBG(" %.2x", sat->cache[i]); 16, 1, sat->cache, 16, false);
DBG("\n");
} }
#endif #endif
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册