summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaaira Gupta <kgupta@es.iitr.ac.in>2020-02-23 23:01:32 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-23 19:18:54 +0100
commit64e4965942e68526485e3d6a8eb7a0f716f42bf5 (patch)
treec3d226f5cb23f4c458c710a45d9d8e071092b051
parent67e6cf7338e162d981b53c2432ebd48a465e694e (diff)
staging: qlge: emit debug and dump at same level
Simplify code in ql_mpi_core_to_log() by calling print_hex_dump() instead of existing functions so that the debug and dump are emitted at the same KERN_<LEVEL> Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in> Link: https://lore.kernel.org/r/20200223173132.GA13649@kaaira-HP-Pavilion-Notebook Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/qlge/qlge_dbg.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/drivers/staging/qlge/qlge_dbg.c b/drivers/staging/qlge/qlge_dbg.c
index c7af2548d119..44fb3a317b8d 100644
--- a/drivers/staging/qlge/qlge_dbg.c
+++ b/drivers/staging/qlge/qlge_dbg.c
@@ -1324,27 +1324,10 @@ void ql_mpi_core_to_log(struct work_struct *work)
{
struct ql_adapter *qdev =
container_of(work, struct ql_adapter, mpi_core_to_log.work);
- u32 *tmp, count;
- int i;
- count = sizeof(struct ql_mpi_coredump) / sizeof(u32);
- tmp = (u32 *)qdev->mpi_coredump;
- netif_printk(qdev, drv, KERN_DEBUG, qdev->ndev,
- "Core is dumping to log file!\n");
-
- for (i = 0; i < count; i += 8) {
- pr_err("%.08x: %.08x %.08x %.08x %.08x %.08x "
- "%.08x %.08x %.08x\n", i,
- tmp[i + 0],
- tmp[i + 1],
- tmp[i + 2],
- tmp[i + 3],
- tmp[i + 4],
- tmp[i + 5],
- tmp[i + 6],
- tmp[i + 7]);
- msleep(5);
- }
+ print_hex_dump(KERN_DEBUG, "Core is dumping to log file!\n",
+ DUMP_PREFIX_OFFSET, 32, 4, qdev->mpi_coredump,
+ sizeof(*qdev->mpi_coredump), false);
}
#ifdef QL_REG_DUMP